| 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 <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 } | 23 } |
| 24 | 24 |
| 25 namespace IPC { | 25 namespace IPC { |
| 26 class Message; | 26 class Message; |
| 27 } | 27 } |
| 28 | 28 |
| 29 namespace gfx { | 29 namespace gfx { |
| 30 class Image; | 30 class Image; |
| 31 } | 31 } |
| 32 | 32 |
| 33 namespace gpu { |
| 34 struct GPUInfo; |
| 35 } |
| 36 |
| 33 namespace sandbox { | 37 namespace sandbox { |
| 34 class TargetPolicy; | 38 class TargetPolicy; |
| 35 } | 39 } |
| 36 | 40 |
| 37 namespace webkit { | 41 namespace webkit { |
| 38 namespace npapi { | 42 namespace npapi { |
| 39 class PluginList; | 43 class PluginList; |
| 40 } | 44 } |
| 41 | 45 |
| 42 namespace ppapi { | 46 namespace ppapi { |
| 43 class HostGlobals; | 47 class HostGlobals; |
| 44 } | 48 } |
| 45 } | 49 } |
| 46 | 50 |
| 47 namespace content { | 51 namespace content { |
| 48 | 52 |
| 49 class ContentBrowserClient; | 53 class ContentBrowserClient; |
| 50 class ContentClient; | 54 class ContentClient; |
| 51 class ContentPluginClient; | 55 class ContentPluginClient; |
| 52 class ContentRendererClient; | 56 class ContentRendererClient; |
| 53 class ContentUtilityClient; | 57 class ContentUtilityClient; |
| 54 struct GPUInfo; | |
| 55 struct PepperPluginInfo; | 58 struct PepperPluginInfo; |
| 56 | 59 |
| 57 // Setter and getter for the client. The client should be set early, before any | 60 // Setter and getter for the client. The client should be set early, before any |
| 58 // content code is called. | 61 // content code is called. |
| 59 CONTENT_EXPORT void SetContentClient(ContentClient* client); | 62 CONTENT_EXPORT void SetContentClient(ContentClient* client); |
| 60 | 63 |
| 61 #if defined(CONTENT_IMPLEMENTATION) | 64 #if defined(CONTENT_IMPLEMENTATION) |
| 62 // Content's embedder API should only be used by content. | 65 // Content's embedder API should only be used by content. |
| 63 ContentClient* GetContentClient(); | 66 ContentClient* GetContentClient(); |
| 64 #endif | 67 #endif |
| (...skipping 27 matching lines...) Expand all Loading... |
| 92 | 95 |
| 93 ContentBrowserClient* browser() { return browser_; } | 96 ContentBrowserClient* browser() { return browser_; } |
| 94 ContentPluginClient* plugin() { return plugin_; } | 97 ContentPluginClient* plugin() { return plugin_; } |
| 95 ContentRendererClient* renderer() { return renderer_; } | 98 ContentRendererClient* renderer() { return renderer_; } |
| 96 ContentUtilityClient* utility() { return utility_; } | 99 ContentUtilityClient* utility() { return utility_; } |
| 97 | 100 |
| 98 // Sets the currently active URL. Use GURL() to clear the URL. | 101 // Sets the currently active URL. Use GURL() to clear the URL. |
| 99 virtual void SetActiveURL(const GURL& url) {} | 102 virtual void SetActiveURL(const GURL& url) {} |
| 100 | 103 |
| 101 // Sets the data on the current gpu. | 104 // Sets the data on the current gpu. |
| 102 virtual void SetGpuInfo(const content::GPUInfo& gpu_info) {} | 105 virtual void SetGpuInfo(const gpu::GPUInfo& gpu_info) {} |
| 103 | 106 |
| 104 // Gives the embedder a chance to register its own pepper plugins. | 107 // Gives the embedder a chance to register its own pepper plugins. |
| 105 virtual void AddPepperPlugins( | 108 virtual void AddPepperPlugins( |
| 106 std::vector<content::PepperPluginInfo>* plugins) {} | 109 std::vector<content::PepperPluginInfo>* plugins) {} |
| 107 | 110 |
| 108 // Gives the embedder a chance to register its own internal NPAPI plugins. | 111 // Gives the embedder a chance to register its own internal NPAPI plugins. |
| 109 virtual void AddNPAPIPlugins( | 112 virtual void AddNPAPIPlugins( |
| 110 webkit::npapi::PluginList* plugin_list) {} | 113 webkit::npapi::PluginList* plugin_list) {} |
| 111 | 114 |
| 112 // Gives the embedder a chance to register its own standard and saveable | 115 // Gives the embedder a chance to register its own standard and saveable |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 ContentPluginClient* plugin_; | 178 ContentPluginClient* plugin_; |
| 176 // The embedder API for participating in renderer logic. | 179 // The embedder API for participating in renderer logic. |
| 177 ContentRendererClient* renderer_; | 180 ContentRendererClient* renderer_; |
| 178 // The embedder API for participating in utility logic. | 181 // The embedder API for participating in utility logic. |
| 179 ContentUtilityClient* utility_; | 182 ContentUtilityClient* utility_; |
| 180 }; | 183 }; |
| 181 | 184 |
| 182 } // namespace content | 185 } // namespace content |
| 183 | 186 |
| 184 #endif // CONTENT_PUBLIC_COMMON_CONTENT_CLIENT_H_ | 187 #endif // CONTENT_PUBLIC_COMMON_CONTENT_CLIENT_H_ |
| OLD | NEW |