| 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 28 matching lines...) Expand all Loading... |
| 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 ContentGpuClient; |
| 46 class ContentPluginClient; | 46 class ContentPluginClient; |
| 47 class ContentRendererClient; | 47 class ContentRendererClient; |
| 48 class ContentUtilityClient; | 48 class ContentUtilityClient; |
| 49 struct ContentDecryptionModuleRegistration; |
| 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(); |
| 58 #endif | 59 #endif |
| (...skipping 22 matching lines...) Expand all Loading... |
| 81 // Sets the currently active URL. Use GURL() to clear the URL. | 82 // Sets the currently active URL. Use GURL() to clear the URL. |
| 82 virtual void SetActiveURL(const GURL& url) {} | 83 virtual void SetActiveURL(const GURL& url) {} |
| 83 | 84 |
| 84 // Sets the data on the current gpu. | 85 // Sets the data on the current gpu. |
| 85 virtual void SetGpuInfo(const gpu::GPUInfo& gpu_info) {} | 86 virtual void SetGpuInfo(const gpu::GPUInfo& gpu_info) {} |
| 86 | 87 |
| 87 // Gives the embedder a chance to register its own pepper plugins. | 88 // Gives the embedder a chance to register its own pepper plugins. |
| 88 virtual void AddPepperPlugins( | 89 virtual void AddPepperPlugins( |
| 89 std::vector<content::PepperPluginInfo>* plugins) {} | 90 std::vector<content::PepperPluginInfo>* plugins) {} |
| 90 | 91 |
| 92 // Gives the embedder a chance to register the content decryption |
| 93 // module(s) it supports. |
| 94 virtual void AddContentDecryptionModules( |
| 95 std::vector<content::ContentDecryptionModuleRegistration>* modules) {} |
| 96 |
| 91 // Gives the embedder a chance to register its own standard, referrer and | 97 // Gives the embedder a chance to register its own standard, referrer and |
| 92 // saveable url schemes early on in the startup sequence. | 98 // saveable url schemes early on in the startup sequence. |
| 93 virtual void AddAdditionalSchemes( | 99 virtual void AddAdditionalSchemes( |
| 94 std::vector<url::SchemeWithType>* standard_schemes, | 100 std::vector<url::SchemeWithType>* standard_schemes, |
| 95 std::vector<url::SchemeWithType>* referrer_schemes, | 101 std::vector<url::SchemeWithType>* referrer_schemes, |
| 96 std::vector<std::string>* savable_schemes) {} | 102 std::vector<std::string>* savable_schemes) {} |
| 97 | 103 |
| 98 // Returns whether the given message should be sent in a swapped out renderer. | 104 // Returns whether the given message should be sent in a swapped out renderer. |
| 99 virtual bool CanSendWhileSwappedOut(const IPC::Message* message); | 105 virtual bool CanSendWhileSwappedOut(const IPC::Message* message); |
| 100 | 106 |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 ContentPluginClient* plugin_; | 174 ContentPluginClient* plugin_; |
| 169 // The embedder API for participating in renderer logic. | 175 // The embedder API for participating in renderer logic. |
| 170 ContentRendererClient* renderer_; | 176 ContentRendererClient* renderer_; |
| 171 // The embedder API for participating in utility logic. | 177 // The embedder API for participating in utility logic. |
| 172 ContentUtilityClient* utility_; | 178 ContentUtilityClient* utility_; |
| 173 }; | 179 }; |
| 174 | 180 |
| 175 } // namespace content | 181 } // namespace content |
| 176 | 182 |
| 177 #endif // CONTENT_PUBLIC_COMMON_CONTENT_CLIENT_H_ | 183 #endif // CONTENT_PUBLIC_COMMON_CONTENT_CLIENT_H_ |
| OLD | NEW |