• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright (c) 2021 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=0aff81f2ccc5881001e9fd61cc6e349253fb2ac5$
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   void PurgePluginListCache(bool reload_pages) OVERRIDE;
56   bool HasPreference(const CefString& name) OVERRIDE;
57   CefRefPtr<CefValue> GetPreference(const CefString& name) OVERRIDE;
58   CefRefPtr<CefDictionaryValue> GetAllPreferences(
59       bool include_defaults) OVERRIDE;
60   bool CanSetPreference(const CefString& name) OVERRIDE;
61   bool SetPreference(const CefString& name,
62                      CefRefPtr<CefValue> value,
63                      CefString& error) OVERRIDE;
64   void ClearCertificateExceptions(
65       CefRefPtr<CefCompletionCallback> callback) OVERRIDE;
66   void ClearHttpAuthCredentials(
67       CefRefPtr<CefCompletionCallback> callback) OVERRIDE;
68   void CloseAllConnections(CefRefPtr<CefCompletionCallback> callback) OVERRIDE;
69   void ResolveHost(const CefString& origin,
70                    CefRefPtr<CefResolveCallback> callback) OVERRIDE;
71   void LoadExtension(const CefString& root_directory,
72                      CefRefPtr<CefDictionaryValue> manifest,
73                      CefRefPtr<CefExtensionHandler> handler) OVERRIDE;
74   bool DidLoadExtension(const CefString& extension_id) OVERRIDE;
75   bool HasExtension(const CefString& extension_id) OVERRIDE;
76   bool GetExtensions(std::vector<CefString>& extension_ids) OVERRIDE;
77   CefRefPtr<CefExtension> GetExtension(const CefString& extension_id) OVERRIDE;
78   CefRefPtr<CefMediaRouter> GetMediaRouter(
79       CefRefPtr<CefCompletionCallback> callback) OVERRIDE;
80 };
81 
82 #endif  // CEF_LIBCEF_DLL_CTOCPP_REQUEST_CONTEXT_CTOCPP_H_
83