• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights
2 // reserved. Use of this source code is governed by a BSD-style license that
3 // can be found in the LICENSE file.
4 //
5 // ---------------------------------------------------------------------------
6 //
7 // This file was generated by the CEF translator tool. If making changes by
8 // hand only do so within the body of existing method and function
9 // implementations. See the translator.README.txt file in the tools directory
10 // for more information.
11 //
12 // $hash=693f5845874072abc324f643981531ed08d17b37$
13 //
14 
15 #ifndef CEF_LIBCEF_DLL_CTOCPP_REQUEST_CONTEXT_CTOCPP_H_
16 #define CEF_LIBCEF_DLL_CTOCPP_REQUEST_CONTEXT_CTOCPP_H_
17 #pragma once
18 
19 #if !defined(WRAPPING_CEF_SHARED)
20 #error This file can be included wrapper-side only
21 #endif
22 
23 #include <vector>
24 #include "include/capi/cef_request_context_capi.h"
25 #include "include/capi/cef_request_context_handler_capi.h"
26 #include "include/capi/cef_scheme_capi.h"
27 #include "include/cef_request_context.h"
28 #include "include/cef_request_context_handler.h"
29 #include "include/cef_scheme.h"
30 #include "libcef_dll/ctocpp/ctocpp_ref_counted.h"
31 
32 // Wrap a C structure with a C++ class.
33 // This class may be instantiated and accessed wrapper-side only.
34 class CefRequestContextCToCpp
35     : public CefCToCppRefCounted<CefRequestContextCToCpp,
36                                  CefRequestContext,
37                                  cef_request_context_t> {
38  public:
39   CefRequestContextCToCpp();
40   virtual ~CefRequestContextCToCpp();
41 
42   // CefRequestContext methods.
43   bool IsSame(CefRefPtr<CefRequestContext> other) override;
44   bool IsSharingWith(CefRefPtr<CefRequestContext> other) override;
45   bool IsGlobal() override;
46   CefRefPtr<CefRequestContextHandler> GetHandler() override;
47   CefString GetCachePath() override;
48   CefRefPtr<CefCookieManager> GetCookieManager(
49       CefRefPtr<CefCompletionCallback> callback) override;
50   bool RegisterSchemeHandlerFactory(
51       const CefString& scheme_name,
52       const CefString& domain_name,
53       CefRefPtr<CefSchemeHandlerFactory> factory) override;
54   bool ClearSchemeHandlerFactories() override;
55   bool HasPreference(const CefString& name) override;
56   CefRefPtr<CefValue> GetPreference(const CefString& name) override;
57   CefRefPtr<CefDictionaryValue> GetAllPreferences(
58       bool include_defaults) override;
59   bool CanSetPreference(const CefString& name) override;
60   bool SetPreference(const CefString& name,
61                      CefRefPtr<CefValue> value,
62                      CefString& error) override;
63   void ClearCertificateExceptions(
64       CefRefPtr<CefCompletionCallback> callback) override;
65   void ClearHttpAuthCredentials(
66       CefRefPtr<CefCompletionCallback> callback) override;
67   void CloseAllConnections(CefRefPtr<CefCompletionCallback> callback) override;
68   void ResolveHost(const CefString& origin,
69                    CefRefPtr<CefResolveCallback> callback) override;
70   void LoadExtension(const CefString& root_directory,
71                      CefRefPtr<CefDictionaryValue> manifest,
72                      CefRefPtr<CefExtensionHandler> handler) override;
73   bool DidLoadExtension(const CefString& extension_id) override;
74   bool HasExtension(const CefString& extension_id) override;
75   bool GetExtensions(std::vector<CefString>& extension_ids) override;
76   CefRefPtr<CefExtension> GetExtension(const CefString& extension_id) override;
77   CefRefPtr<CefMediaRouter> GetMediaRouter(
78       CefRefPtr<CefCompletionCallback> callback) override;
79 };
80 
81 #endif  // CEF_LIBCEF_DLL_CTOCPP_REQUEST_CONTEXT_CTOCPP_H_
82