Chromium Code Reviews| 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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 107 | 107 |
| 108 // Return the contents of a resource in a StringPiece given the resource id. | 108 // Return the contents of a resource in a StringPiece given the resource id. |
| 109 virtual base::StringPiece GetDataResource(int resource_id) const = 0; | 109 virtual base::StringPiece GetDataResource(int resource_id) const = 0; |
| 110 | 110 |
| 111 #if defined(OS_WIN) | 111 #if defined(OS_WIN) |
| 112 // Allows the embedder to sandbox a plugin, and apply a custom policy. | 112 // Allows the embedder to sandbox a plugin, and apply a custom policy. |
| 113 virtual bool SandboxPlugin(CommandLine* command_line, | 113 virtual bool SandboxPlugin(CommandLine* command_line, |
| 114 sandbox::TargetPolicy* policy) = 0; | 114 sandbox::TargetPolicy* policy) = 0; |
| 115 #endif | 115 #endif |
| 116 | 116 |
| 117 #if defined(OS_MACOSX) | |
| 118 // Allows the embedder to define a new |sandbox_type| by mapping it to the | |
| 119 // resource ID corresponding to the sandbox profile to use. The legal values | |
| 120 // for |sandbox_type| are defined by the embedder and should start with | |
| 121 // SandboxType::SANDBOX_TYPE_AFTER_LAST_TYPE. Returns false if no sandbox | |
| 122 // profile for the given |sandbox_type| exists. Otherwise, | |
| 123 // |sandbox_profile_resource_id| is set to the resource ID corresponding to | |
| 124 // the sandbox profile to use. | |
|
jeremy
2011/11/25 19:53:16
nit: and true is returned.
jochen (gone - plz use gerrit)
2011/11/25 20:30:16
Done.
| |
| 125 virtual bool GetSandboxProfileForSandboxType( | |
| 126 int sandbox_type, | |
| 127 int* sandbox_profile_resource_id) const = 0; | |
| 128 #endif | |
| 129 | |
| 117 private: | 130 private: |
| 118 // The embedder API for participating in browser logic. | 131 // The embedder API for participating in browser logic. |
| 119 ContentBrowserClient* browser_; | 132 ContentBrowserClient* browser_; |
| 120 // The embedder API for participating in plugin logic. | 133 // The embedder API for participating in plugin logic. |
| 121 ContentPluginClient* plugin_; | 134 ContentPluginClient* plugin_; |
| 122 // The embedder API for participating in renderer logic. | 135 // The embedder API for participating in renderer logic. |
| 123 ContentRendererClient* renderer_; | 136 ContentRendererClient* renderer_; |
| 124 // The embedder API for participating in utility logic. | 137 // The embedder API for participating in utility logic. |
| 125 ContentUtilityClient* utility_; | 138 ContentUtilityClient* utility_; |
| 126 }; | 139 }; |
| 127 | 140 |
| 128 } // namespace content | 141 } // namespace content |
| 129 | 142 |
| 130 #endif // CONTENT_PUBLIC_COMMON_CONTENT_CLIENT_H_ | 143 #endif // CONTENT_PUBLIC_COMMON_CONTENT_CLIENT_H_ |
| OLD | NEW |