Overte C++ Documentation
HFWebEngineProfile.h
1 //
2 // HFWebEngineProfile.h
3 // interface/src/networking
4 //
5 // Created by Stephen Birarda on 2016-10-17.
6 // Copyright 2016 High Fidelity, Inc.
7 //
8 // Distributed under the Apache License, Version 2.0.
9 // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
10 //
11 
12 #pragma once
13 
14 #ifndef hifi_HFWebEngineProfile_h
15 #define hifi_HFWebEngineProfile_h
16 
17 #include "ContextAwareProfile.h"
18 
19 #if !defined(Q_OS_ANDROID)
20 
21 class HFWebEngineProfile : public ContextAwareProfile {
22  using Parent = ContextAwareProfile;
23 public:
24  static void registerWithContext(QQmlContext* parent);
25 
26  static void clearCache();
27 
28 protected:
29  HFWebEngineProfile(QQmlContext* parent);
30  virtual ~HFWebEngineProfile();
31 
32  class RequestInterceptor : public Parent::RequestInterceptor {
33  public:
34  RequestInterceptor(ContextAwareProfile* parent) : Parent::RequestInterceptor(parent) {}
35  void interceptRequest(QWebEngineUrlRequestInfo& info) override;
36  };
37 };
38 
39 #endif
40 
41 #endif // hifi_HFWebEngineProfile_h