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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 virtual string16 GetLocalizedString(int message_id) const; | 119 virtual string16 GetLocalizedString(int message_id) const; |
120 | 120 |
121 // Return the contents of a resource in a StringPiece given the resource id. | 121 // Return the contents of a resource in a StringPiece given the resource id. |
122 virtual base::StringPiece GetDataResource( | 122 virtual base::StringPiece GetDataResource( |
123 int resource_id, | 123 int resource_id, |
124 ui::ScaleFactor scale_factor) const; | 124 ui::ScaleFactor scale_factor) const; |
125 | 125 |
126 // Returns a native image given its id. | 126 // Returns a native image given its id. |
127 virtual gfx::Image& GetNativeImageNamed(int resource_id) const; | 127 virtual gfx::Image& GetNativeImageNamed(int resource_id) const; |
128 | 128 |
129 #if defined(OS_WIN) | |
130 // Allows the embedder to sandbox a plugin, and apply a custom policy. | |
131 virtual bool SandboxPlugin(CommandLine* command_line, | |
132 sandbox::TargetPolicy* policy); | |
133 #endif | |
134 | |
135 #if defined(OS_MACOSX) && !defined(OS_IOS) | 129 #if defined(OS_MACOSX) && !defined(OS_IOS) |
136 // Allows the embedder to define a new |sandbox_type| by mapping it to the | 130 // Allows the embedder to define a new |sandbox_type| by mapping it to the |
137 // resource ID corresponding to the sandbox profile to use. The legal values | 131 // resource ID corresponding to the sandbox profile to use. The legal values |
138 // for |sandbox_type| are defined by the embedder and should start with | 132 // for |sandbox_type| are defined by the embedder and should start with |
139 // SandboxType::SANDBOX_TYPE_AFTER_LAST_TYPE. Returns false if no sandbox | 133 // SandboxType::SANDBOX_TYPE_AFTER_LAST_TYPE. Returns false if no sandbox |
140 // profile for the given |sandbox_type| exists. Otherwise, | 134 // profile for the given |sandbox_type| exists. Otherwise, |
141 // |sandbox_profile_resource_id| is set to the resource ID corresponding to | 135 // |sandbox_profile_resource_id| is set to the resource ID corresponding to |
142 // the sandbox profile to use and true is returned. | 136 // the sandbox profile to use and true is returned. |
143 virtual bool GetSandboxProfileForSandboxType( | 137 virtual bool GetSandboxProfileForSandboxType( |
144 int sandbox_type, | 138 int sandbox_type, |
(...skipping 16 matching lines...) Expand all Loading... |
161 ContentPluginClient* plugin_; | 155 ContentPluginClient* plugin_; |
162 // The embedder API for participating in renderer logic. | 156 // The embedder API for participating in renderer logic. |
163 ContentRendererClient* renderer_; | 157 ContentRendererClient* renderer_; |
164 // The embedder API for participating in utility logic. | 158 // The embedder API for participating in utility logic. |
165 ContentUtilityClient* utility_; | 159 ContentUtilityClient* utility_; |
166 }; | 160 }; |
167 | 161 |
168 } // namespace content | 162 } // namespace content |
169 | 163 |
170 #endif // CONTENT_PUBLIC_COMMON_CONTENT_CLIENT_H_ | 164 #endif // CONTENT_PUBLIC_COMMON_CONTENT_CLIENT_H_ |
OLD | NEW |