OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CONTENT_PUBLIC_COMMON_CONTENT_CLIENT_H_ | 5 #ifndef CONTENT_PUBLIC_COMMON_CONTENT_CLIENT_H_ |
6 #define CONTENT_PUBLIC_COMMON_CONTENT_CLIENT_H_ | 6 #define CONTENT_PUBLIC_COMMON_CONTENT_CLIENT_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 27 matching lines...) Expand all Loading... |
38 } | 38 } |
39 | 39 |
40 namespace content { | 40 namespace content { |
41 | 41 |
42 class ContentBrowserClient; | 42 class ContentBrowserClient; |
43 class ContentClient; | 43 class ContentClient; |
44 class ContentGpuClient; | 44 class ContentGpuClient; |
45 class ContentRendererClient; | 45 class ContentRendererClient; |
46 class ContentUtilityClient; | 46 class ContentUtilityClient; |
47 class OriginTrialPolicy; | 47 class OriginTrialPolicy; |
| 48 struct CdmHostFilePath; |
48 struct CdmInfo; | 49 struct CdmInfo; |
49 struct PepperPluginInfo; | 50 struct PepperPluginInfo; |
50 | 51 |
51 // Setter and getter for the client. The client should be set early, before any | 52 // Setter and getter for the client. The client should be set early, before any |
52 // content code is called. | 53 // content code is called. |
53 CONTENT_EXPORT void SetContentClient(ContentClient* client); | 54 CONTENT_EXPORT void SetContentClient(ContentClient* client); |
54 | 55 |
55 #if defined(CONTENT_IMPLEMENTATION) | 56 #if defined(CONTENT_IMPLEMENTATION) |
56 // Content's embedder API should only be used by content. | 57 // Content's embedder API should only be used by content. |
57 ContentClient* GetContentClient(); | 58 ContentClient* GetContentClient(); |
(...skipping 22 matching lines...) Expand all Loading... |
80 // Sets the currently active URL. Use GURL() to clear the URL. | 81 // Sets the currently active URL. Use GURL() to clear the URL. |
81 virtual void SetActiveURL(const GURL& url) {} | 82 virtual void SetActiveURL(const GURL& url) {} |
82 | 83 |
83 // Sets the data on the current gpu. | 84 // Sets the data on the current gpu. |
84 virtual void SetGpuInfo(const gpu::GPUInfo& gpu_info) {} | 85 virtual void SetGpuInfo(const gpu::GPUInfo& gpu_info) {} |
85 | 86 |
86 // Gives the embedder a chance to register its own pepper plugins. | 87 // Gives the embedder a chance to register its own pepper plugins. |
87 virtual void AddPepperPlugins( | 88 virtual void AddPepperPlugins( |
88 std::vector<content::PepperPluginInfo>* plugins) {} | 89 std::vector<content::PepperPluginInfo>* plugins) {} |
89 | 90 |
90 // Gives the embedder a chance to register the content decryption | 91 // Gives the embedder a chance to register the Content Decryption |
91 // modules it supports. | 92 // Modules (CDM) it supports. |
92 virtual void AddContentDecryptionModules( | 93 virtual void AddContentDecryptionModules( |
93 std::vector<content::CdmInfo>* cdms) {} | 94 std::vector<content::CdmInfo>* cdms) {} |
94 | 95 |
| 96 // Gives the embedder a chance to register Content Decryption Module (CDM) |
| 97 // host file paths. |
| 98 virtual void AddContentDecryptionModuleHostFilePaths( |
| 99 std::vector<content::CdmHostFilePath>* cdm_host_file_paths) {} |
| 100 |
95 // Gives the embedder a chance to register its own schemes early in the | 101 // Gives the embedder a chance to register its own schemes early in the |
96 // startup sequence. | 102 // startup sequence. |
97 // For the secure schemes and origins that need to be considered trustworthy, | 103 // For the secure schemes and origins that need to be considered trustworthy, |
98 // see https://www.w3.org/TR/powerful-features/#is-origin-trustworthy. | 104 // see https://www.w3.org/TR/powerful-features/#is-origin-trustworthy. |
99 // |service_workers_schemes| are additional schemes that should be allowed to | 105 // |service_workers_schemes| are additional schemes that should be allowed to |
100 // register service workers. Only secure and trustworthy schemes should be | 106 // register service workers. Only secure and trustworthy schemes should be |
101 // added. | 107 // added. |
102 struct Schemes { | 108 struct Schemes { |
103 Schemes(); | 109 Schemes(); |
104 ~Schemes(); | 110 ~Schemes(); |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 ContentGpuClient* gpu_; | 196 ContentGpuClient* gpu_; |
191 // The embedder API for participating in renderer logic. | 197 // The embedder API for participating in renderer logic. |
192 ContentRendererClient* renderer_; | 198 ContentRendererClient* renderer_; |
193 // The embedder API for participating in utility logic. | 199 // The embedder API for participating in utility logic. |
194 ContentUtilityClient* utility_; | 200 ContentUtilityClient* utility_; |
195 }; | 201 }; |
196 | 202 |
197 } // namespace content | 203 } // namespace content |
198 | 204 |
199 #endif // CONTENT_PUBLIC_COMMON_CONTENT_CLIENT_H_ | 205 #endif // CONTENT_PUBLIC_COMMON_CONTENT_CLIENT_H_ |
OLD | NEW |