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

Side by Side Diff: content/public/browser/content_browser_client.h

Issue 2182633007: Avoid using ContentBrowserClient::IsIllegalOrigin in ResourceDispatcherHost. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove the IsIllegalOrigin function from ContentBrowserClient Created 4 years, 4 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
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_BROWSER_CONTENT_BROWSER_CLIENT_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_
6 #define CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ 6 #define CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 // protocol handlers. 224 // protocol handlers.
225 virtual bool IsHandledURL(const GURL& url); 225 virtual bool IsHandledURL(const GURL& url);
226 226
227 // Returns whether the given process is allowed to commit |url|. This is a 227 // Returns whether the given process is allowed to commit |url|. This is a
228 // more conservative check than IsSuitableHost, since it is used after a 228 // more conservative check than IsSuitableHost, since it is used after a
229 // navigation has committed to ensure that the process did not exceed its 229 // navigation has committed to ensure that the process did not exceed its
230 // authority. 230 // authority.
231 // This is called on the UI thread. 231 // This is called on the UI thread.
232 virtual bool CanCommitURL(RenderProcessHost* process_host, const GURL& url); 232 virtual bool CanCommitURL(RenderProcessHost* process_host, const GURL& url);
233 233
234 // Returns true if no URL within |origin| is allowed to commit in the given
235 // process. Must return false if there exists at least one URL in |origin|
236 // that is allowed to commit.
237 // This is called on the IO thread.
238 virtual bool IsIllegalOrigin(ResourceContext* resource_context,
239 int child_process_id,
240 const GURL& origin);
241
242 // Returns whether a URL should be allowed to open from a specific context. 234 // Returns whether a URL should be allowed to open from a specific context.
243 // This also applies in cases where the new URL will open in another process. 235 // This also applies in cases where the new URL will open in another process.
244 virtual bool ShouldAllowOpenURL(SiteInstance* site_instance, const GURL& url); 236 virtual bool ShouldAllowOpenURL(SiteInstance* site_instance, const GURL& url);
245 237
246 // Allows the embedder to override OpenURLParams. 238 // Allows the embedder to override OpenURLParams.
247 virtual void OverrideOpenURLParams(SiteInstance* site_instance, 239 virtual void OverrideOpenURLParams(SiteInstance* site_instance,
248 OpenURLParams* params) {} 240 OpenURLParams* params) {}
249 241
250 // Returns whether a new view for a given |site_url| can be launched in a 242 // Returns whether a new view for a given |site_url| can be launched in a
251 // given |process_host|. 243 // given |process_host|.
(...skipping 523 matching lines...) Expand 10 before | Expand all | Expand 10 after
775 // Allows an embedder to provide its own ExternalVideoSurfaceContainer 767 // Allows an embedder to provide its own ExternalVideoSurfaceContainer
776 // implementation. Return nullptr to disable external surface video. 768 // implementation. Return nullptr to disable external surface video.
777 virtual ExternalVideoSurfaceContainer* 769 virtual ExternalVideoSurfaceContainer*
778 OverrideCreateExternalVideoSurfaceContainer(WebContents* web_contents); 770 OverrideCreateExternalVideoSurfaceContainer(WebContents* web_contents);
779 #endif 771 #endif
780 }; 772 };
781 773
782 } // namespace content 774 } // namespace content
783 775
784 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ 776 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698