Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1133)

Side by Side Diff: content/public/common/content_client.h

Issue 2049783002: Refactor OriginTrialPolicy to be an abstract interface in content/public/common (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ef-add-revoked-feature-list
Patch Set: Switch to lazy initialization in ChromeContentClient Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/content_shell.gypi ('k') | content/public/common/content_client.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 class TargetPolicy; 42 class TargetPolicy;
43 } 43 }
44 44
45 namespace content { 45 namespace content {
46 46
47 class ContentBrowserClient; 47 class ContentBrowserClient;
48 class ContentClient; 48 class ContentClient;
49 class ContentGpuClient; 49 class ContentGpuClient;
50 class ContentRendererClient; 50 class ContentRendererClient;
51 class ContentUtilityClient; 51 class ContentUtilityClient;
52 class OriginTrialPolicy;
52 struct CdmInfo; 53 struct CdmInfo;
53 struct PepperPluginInfo; 54 struct PepperPluginInfo;
54 55
55 // Setter and getter for the client. The client should be set early, before any 56 // Setter and getter for the client. The client should be set early, before any
56 // content code is called. 57 // content code is called.
57 CONTENT_EXPORT void SetContentClient(ContentClient* client); 58 CONTENT_EXPORT void SetContentClient(ContentClient* client);
58 59
59 #if defined(CONTENT_IMPLEMENTATION) 60 #if defined(CONTENT_IMPLEMENTATION)
60 // Content's embedder API should only be used by content. 61 // Content's embedder API should only be used by content.
61 ContentClient* GetContentClient(); 62 ContentClient* GetContentClient();
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 // service worker. 162 // service worker.
162 virtual bool AllowScriptExtensionForServiceWorker(const GURL& script_url); 163 virtual bool AllowScriptExtensionForServiceWorker(const GURL& script_url);
163 164
164 // Returns true if the embedder wishes to supplement the site isolation policy 165 // Returns true if the embedder wishes to supplement the site isolation policy
165 // used by the content layer. Returning true enables the infrastructure for 166 // used by the content layer. Returning true enables the infrastructure for
166 // out-of-process iframes, and causes the content layer to consult 167 // out-of-process iframes, and causes the content layer to consult
167 // ContentBrowserClient::DoesSiteRequireDedicatedProcess() when making process 168 // ContentBrowserClient::DoesSiteRequireDedicatedProcess() when making process
168 // model decisions. 169 // model decisions.
169 virtual bool IsSupplementarySiteIsolationModeEnabled(); 170 virtual bool IsSupplementarySiteIsolationModeEnabled();
170 171
171 // Returns the public key to be used for origin trials, or an empty string if 172 // Returns the origin trial policy, or nullptr if origin trials are not
172 // origin trials are not enabled in this context. 173 // supported by the embedder.
173 virtual base::StringPiece GetOriginTrialPublicKey(); 174 virtual OriginTrialPolicy* GetOriginTrialPolicy();
174 175
175 #if defined(OS_ANDROID) 176 #if defined(OS_ANDROID)
176 // Returns true for clients like Android WebView that uses synchronous 177 // Returns true for clients like Android WebView that uses synchronous
177 // compositor. Note setting this to true will permit synchronous IPCs from 178 // compositor. Note setting this to true will permit synchronous IPCs from
178 // the browser UI thread. 179 // the browser UI thread.
179 virtual bool UsingSynchronousCompositing(); 180 virtual bool UsingSynchronousCompositing();
180 181
181 // Returns the MediaClientAndroid to be used by media code on Android. 182 // Returns the MediaClientAndroid to be used by media code on Android.
182 virtual media::MediaClientAndroid* GetMediaClientAndroid(); 183 virtual media::MediaClientAndroid* GetMediaClientAndroid();
183 #endif // OS_ANDROID 184 #endif // OS_ANDROID
184 185
185 private: 186 private:
186 friend class ContentClientInitializer; // To set these pointers. 187 friend class ContentClientInitializer; // To set these pointers.
187 friend class InternalTestInitializer; 188 friend class InternalTestInitializer;
188 189
189 // The embedder API for participating in browser logic. 190 // The embedder API for participating in browser logic.
190 ContentBrowserClient* browser_; 191 ContentBrowserClient* browser_;
191 // The embedder API for participating in gpu logic. 192 // The embedder API for participating in gpu logic.
192 ContentGpuClient* gpu_; 193 ContentGpuClient* gpu_;
193 // The embedder API for participating in renderer logic. 194 // The embedder API for participating in renderer logic.
194 ContentRendererClient* renderer_; 195 ContentRendererClient* renderer_;
195 // The embedder API for participating in utility logic. 196 // The embedder API for participating in utility logic.
196 ContentUtilityClient* utility_; 197 ContentUtilityClient* utility_;
197 }; 198 };
198 199
199 } // namespace content 200 } // namespace content
200 201
201 #endif // CONTENT_PUBLIC_COMMON_CONTENT_CLIENT_H_ 202 #endif // CONTENT_PUBLIC_COMMON_CONTENT_CLIENT_H_
OLDNEW
« no previous file with comments | « content/content_shell.gypi ('k') | content/public/common/content_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698