| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 std::vector<content::PepperPluginInfo>* plugins) = 0; | 91 std::vector<content::PepperPluginInfo>* plugins) = 0; |
| 92 | 92 |
| 93 // Gives the embedder a chance to register its own internal NPAPI plugins. | 93 // Gives the embedder a chance to register its own internal NPAPI plugins. |
| 94 virtual void AddNPAPIPlugins( | 94 virtual void AddNPAPIPlugins( |
| 95 webkit::npapi::PluginList* plugin_list) = 0; | 95 webkit::npapi::PluginList* plugin_list) = 0; |
| 96 | 96 |
| 97 // Returns whether the given message should be processed in the browser on | 97 // Returns whether the given message should be processed in the browser on |
| 98 // behalf of a swapped out renderer. | 98 // behalf of a swapped out renderer. |
| 99 virtual bool CanHandleWhileSwappedOut(const IPC::Message& msg) = 0; | 99 virtual bool CanHandleWhileSwappedOut(const IPC::Message& msg) = 0; |
| 100 | 100 |
| 101 // Returns the user agent and a flag indicating whether the returned | 101 // Returns the user agent. |
| 102 // string should always be used (if false, callers may override the | 102 virtual std::string GetUserAgent() const = 0; |
| 103 // value as needed to work around various user agent sniffing bugs). | |
| 104 virtual std::string GetUserAgent(bool *overriding) const = 0; | |
| 105 | 103 |
| 106 // Returns a string resource given its id. | 104 // Returns a string resource given its id. |
| 107 virtual string16 GetLocalizedString(int message_id) const = 0; | 105 virtual string16 GetLocalizedString(int message_id) const = 0; |
| 108 | 106 |
| 109 // Return the contents of a resource in a StringPiece given the resource id. | 107 // Return the contents of a resource in a StringPiece given the resource id. |
| 110 virtual base::StringPiece GetDataResource(int resource_id) const = 0; | 108 virtual base::StringPiece GetDataResource(int resource_id) const = 0; |
| 111 | 109 |
| 112 #if defined(OS_WIN) | 110 #if defined(OS_WIN) |
| 113 // Allows the embedder to sandbox a plugin, and apply a custom policy. | 111 // Allows the embedder to sandbox a plugin, and apply a custom policy. |
| 114 virtual bool SandboxPlugin(CommandLine* command_line, | 112 virtual bool SandboxPlugin(CommandLine* command_line, |
| (...skipping 20 matching lines...) Expand all Loading... |
| 135 ContentPluginClient* plugin_; | 133 ContentPluginClient* plugin_; |
| 136 // The embedder API for participating in renderer logic. | 134 // The embedder API for participating in renderer logic. |
| 137 ContentRendererClient* renderer_; | 135 ContentRendererClient* renderer_; |
| 138 // The embedder API for participating in utility logic. | 136 // The embedder API for participating in utility logic. |
| 139 ContentUtilityClient* utility_; | 137 ContentUtilityClient* utility_; |
| 140 }; | 138 }; |
| 141 | 139 |
| 142 } // namespace content | 140 } // namespace content |
| 143 | 141 |
| 144 #endif // CONTENT_PUBLIC_COMMON_CONTENT_CLIENT_H_ | 142 #endif // CONTENT_PUBLIC_COMMON_CONTENT_CLIENT_H_ |
| OLD | NEW |