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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 int resource_id, | 126 int resource_id, |
127 ui::ScaleFactor scale_factor) const; | 127 ui::ScaleFactor scale_factor) const; |
128 | 128 |
129 // Returns the raw bytes of a scale independent data resource. | 129 // Returns the raw bytes of a scale independent data resource. |
130 virtual base::RefCountedStaticMemory* GetDataResourceBytes( | 130 virtual base::RefCountedStaticMemory* GetDataResourceBytes( |
131 int resource_id) const; | 131 int resource_id) const; |
132 | 132 |
133 // Returns a native image given its id. | 133 // Returns a native image given its id. |
134 virtual gfx::Image& GetNativeImageNamed(int resource_id) const; | 134 virtual gfx::Image& GetNativeImageNamed(int resource_id) const; |
135 | 135 |
136 #if defined(OS_MACOSX) && !defined(OS_IOS) | 136 #if defined(OS_WIN) |
| 137 // Allows the embedder to modify the sandbox policy of a process. |
| 138 virtual void AddPolicy(CommandLine* command_line, |
| 139 sandbox::TargetPolicy* policy) {} |
| 140 #elif defined(OS_MACOSX) && !defined(OS_IOS) |
137 // Allows the embedder to define a new |sandbox_type| by mapping it to the | 141 // Allows the embedder to define a new |sandbox_type| by mapping it to the |
138 // resource ID corresponding to the sandbox profile to use. The legal values | 142 // resource ID corresponding to the sandbox profile to use. The legal values |
139 // for |sandbox_type| are defined by the embedder and should start with | 143 // for |sandbox_type| are defined by the embedder and should start with |
140 // SandboxType::SANDBOX_TYPE_AFTER_LAST_TYPE. Returns false if no sandbox | 144 // SandboxType::SANDBOX_TYPE_AFTER_LAST_TYPE. Returns false if no sandbox |
141 // profile for the given |sandbox_type| exists. Otherwise, | 145 // profile for the given |sandbox_type| exists. Otherwise, |
142 // |sandbox_profile_resource_id| is set to the resource ID corresponding to | 146 // |sandbox_profile_resource_id| is set to the resource ID corresponding to |
143 // the sandbox profile to use and true is returned. | 147 // the sandbox profile to use and true is returned. |
144 virtual bool GetSandboxProfileForSandboxType( | 148 virtual bool GetSandboxProfileForSandboxType( |
145 int sandbox_type, | 149 int sandbox_type, |
146 int* sandbox_profile_resource_id) const; | 150 int* sandbox_profile_resource_id) const; |
(...skipping 15 matching lines...) Expand all Loading... |
162 ContentPluginClient* plugin_; | 166 ContentPluginClient* plugin_; |
163 // The embedder API for participating in renderer logic. | 167 // The embedder API for participating in renderer logic. |
164 ContentRendererClient* renderer_; | 168 ContentRendererClient* renderer_; |
165 // The embedder API for participating in utility logic. | 169 // The embedder API for participating in utility logic. |
166 ContentUtilityClient* utility_; | 170 ContentUtilityClient* utility_; |
167 }; | 171 }; |
168 | 172 |
169 } // namespace content | 173 } // namespace content |
170 | 174 |
171 #endif // CONTENT_PUBLIC_COMMON_CONTENT_CLIENT_H_ | 175 #endif // CONTENT_PUBLIC_COMMON_CONTENT_CLIENT_H_ |
OLD | NEW |