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 <string> | 9 #include <string> |
9 #include <vector> | 10 #include <vector> |
10 | 11 |
11 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
12 #include "base/strings/string16.h" | 13 #include "base/strings/string16.h" |
13 #include "base/strings/string_piece.h" | 14 #include "base/strings/string_piece.h" |
14 #include "build/build_config.h" | 15 #include "build/build_config.h" |
15 #include "content/common/content_export.h" | 16 #include "content/common/content_export.h" |
16 #include "ui/base/layout.h" | 17 #include "ui/base/layout.h" |
17 | 18 |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 // for |sandbox_type| are defined by the embedder and should start with | 128 // for |sandbox_type| are defined by the embedder and should start with |
128 // SandboxType::SANDBOX_TYPE_AFTER_LAST_TYPE. Returns false if no sandbox | 129 // SandboxType::SANDBOX_TYPE_AFTER_LAST_TYPE. Returns false if no sandbox |
129 // profile for the given |sandbox_type| exists. Otherwise, | 130 // profile for the given |sandbox_type| exists. Otherwise, |
130 // |sandbox_profile_resource_id| is set to the resource ID corresponding to | 131 // |sandbox_profile_resource_id| is set to the resource ID corresponding to |
131 // the sandbox profile to use and true is returned. | 132 // the sandbox profile to use and true is returned. |
132 virtual bool GetSandboxProfileForSandboxType( | 133 virtual bool GetSandboxProfileForSandboxType( |
133 int sandbox_type, | 134 int sandbox_type, |
134 int* sandbox_profile_resource_id) const; | 135 int* sandbox_profile_resource_id) const; |
135 #endif | 136 #endif |
136 | 137 |
| 138 // Gives the embedder a chance to register additional schemes and origins |
| 139 // that need to be considered trustworthy. |
| 140 // See https://www.w3.org/TR/powerful-features/#is-origin-trustworthy. |
| 141 virtual void AddSecureSchemesAndOrigins(std::set<std::string>* schemes, |
| 142 std::set<GURL>* origins) {} |
| 143 |
137 private: | 144 private: |
138 friend class ContentClientInitializer; // To set these pointers. | 145 friend class ContentClientInitializer; // To set these pointers. |
139 friend class InternalTestInitializer; | 146 friend class InternalTestInitializer; |
140 | 147 |
141 // The embedder API for participating in browser logic. | 148 // The embedder API for participating in browser logic. |
142 ContentBrowserClient* browser_; | 149 ContentBrowserClient* browser_; |
143 // The embedder API for participating in plugin logic. | 150 // The embedder API for participating in plugin logic. |
144 ContentPluginClient* plugin_; | 151 ContentPluginClient* plugin_; |
145 // The embedder API for participating in renderer logic. | 152 // The embedder API for participating in renderer logic. |
146 ContentRendererClient* renderer_; | 153 ContentRendererClient* renderer_; |
147 // The embedder API for participating in utility logic. | 154 // The embedder API for participating in utility logic. |
148 ContentUtilityClient* utility_; | 155 ContentUtilityClient* utility_; |
149 }; | 156 }; |
150 | 157 |
151 } // namespace content | 158 } // namespace content |
152 | 159 |
153 #endif // CONTENT_PUBLIC_COMMON_CONTENT_CLIENT_H_ | 160 #endif // CONTENT_PUBLIC_COMMON_CONTENT_CLIENT_H_ |
OLD | NEW |