| 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 24 matching lines...) Expand all Loading... |
| 35 } | 35 } |
| 36 | 36 |
| 37 namespace sandbox { | 37 namespace sandbox { |
| 38 class TargetPolicy; | 38 class TargetPolicy; |
| 39 } | 39 } |
| 40 | 40 |
| 41 namespace content { | 41 namespace content { |
| 42 | 42 |
| 43 class ContentBrowserClient; | 43 class ContentBrowserClient; |
| 44 class ContentClient; | 44 class ContentClient; |
| 45 class ContentGpuClient; |
| 45 class ContentPluginClient; | 46 class ContentPluginClient; |
| 46 class ContentRendererClient; | 47 class ContentRendererClient; |
| 47 class ContentUtilityClient; | 48 class ContentUtilityClient; |
| 48 struct PepperPluginInfo; | 49 struct PepperPluginInfo; |
| 49 | 50 |
| 50 // Setter and getter for the client. The client should be set early, before any | 51 // Setter and getter for the client. The client should be set early, before any |
| 51 // content code is called. | 52 // content code is called. |
| 52 CONTENT_EXPORT void SetContentClient(ContentClient* client); | 53 CONTENT_EXPORT void SetContentClient(ContentClient* client); |
| 53 | 54 |
| 54 #if defined(CONTENT_IMPLEMENTATION) | 55 #if defined(CONTENT_IMPLEMENTATION) |
| (...skipping 10 matching lines...) Expand all Loading... |
| 65 CONTENT_EXPORT ContentUtilityClient* SetUtilityClientForTesting( | 66 CONTENT_EXPORT ContentUtilityClient* SetUtilityClientForTesting( |
| 66 ContentUtilityClient* u); | 67 ContentUtilityClient* u); |
| 67 | 68 |
| 68 // Interface that the embedder implements. | 69 // Interface that the embedder implements. |
| 69 class CONTENT_EXPORT ContentClient { | 70 class CONTENT_EXPORT ContentClient { |
| 70 public: | 71 public: |
| 71 ContentClient(); | 72 ContentClient(); |
| 72 virtual ~ContentClient(); | 73 virtual ~ContentClient(); |
| 73 | 74 |
| 74 ContentBrowserClient* browser() { return browser_; } | 75 ContentBrowserClient* browser() { return browser_; } |
| 76 ContentGpuClient* gpu() { return gpu_; } |
| 75 ContentPluginClient* plugin() { return plugin_; } | 77 ContentPluginClient* plugin() { return plugin_; } |
| 76 ContentRendererClient* renderer() { return renderer_; } | 78 ContentRendererClient* renderer() { return renderer_; } |
| 77 ContentUtilityClient* utility() { return utility_; } | 79 ContentUtilityClient* utility() { return utility_; } |
| 78 | 80 |
| 79 // Sets the currently active URL. Use GURL() to clear the URL. | 81 // Sets the currently active URL. Use GURL() to clear the URL. |
| 80 virtual void SetActiveURL(const GURL& url) {} | 82 virtual void SetActiveURL(const GURL& url) {} |
| 81 | 83 |
| 82 // Sets the data on the current gpu. | 84 // Sets the data on the current gpu. |
| 83 virtual void SetGpuInfo(const gpu::GPUInfo& gpu_info) {} | 85 virtual void SetGpuInfo(const gpu::GPUInfo& gpu_info) {} |
| 84 | 86 |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 // ContentBrowserClient::DoesSiteRequireDedicatedProcess() when making process | 154 // ContentBrowserClient::DoesSiteRequireDedicatedProcess() when making process |
| 153 // model decisions. | 155 // model decisions. |
| 154 virtual bool IsSupplementarySiteIsolationModeEnabled(); | 156 virtual bool IsSupplementarySiteIsolationModeEnabled(); |
| 155 | 157 |
| 156 private: | 158 private: |
| 157 friend class ContentClientInitializer; // To set these pointers. | 159 friend class ContentClientInitializer; // To set these pointers. |
| 158 friend class InternalTestInitializer; | 160 friend class InternalTestInitializer; |
| 159 | 161 |
| 160 // The embedder API for participating in browser logic. | 162 // The embedder API for participating in browser logic. |
| 161 ContentBrowserClient* browser_; | 163 ContentBrowserClient* browser_; |
| 164 // The embedder API for participating in gpu logic. |
| 165 ContentGpuClient* gpu_; |
| 162 // The embedder API for participating in plugin logic. | 166 // The embedder API for participating in plugin logic. |
| 163 ContentPluginClient* plugin_; | 167 ContentPluginClient* plugin_; |
| 164 // The embedder API for participating in renderer logic. | 168 // The embedder API for participating in renderer logic. |
| 165 ContentRendererClient* renderer_; | 169 ContentRendererClient* renderer_; |
| 166 // The embedder API for participating in utility logic. | 170 // The embedder API for participating in utility logic. |
| 167 ContentUtilityClient* utility_; | 171 ContentUtilityClient* utility_; |
| 168 }; | 172 }; |
| 169 | 173 |
| 170 } // namespace content | 174 } // namespace content |
| 171 | 175 |
| 172 #endif // CONTENT_PUBLIC_COMMON_CONTENT_CLIENT_H_ | 176 #endif // CONTENT_PUBLIC_COMMON_CONTENT_CLIENT_H_ |
| OLD | NEW |