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

Unified Diff: content/public/browser/content_browser_client.h

Issue 9837074: Make it so that allow_js_access: false can be used with background pages created by window.open. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Revised approach based on http://crrev.com/125180. Created 8 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: content/public/browser/content_browser_client.h
diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h
index c9303d93a919ac054531146147151a5625e623ee..78d095cf7a78bba024ce16f52b25bbcc51468c95 100644
--- a/content/public/browser/content_browser_client.h
+++ b/content/public/browser/content_browser_client.h
@@ -91,6 +91,16 @@ class ContentBrowserClient {
public:
virtual ~ContentBrowserClient() {}
+ enum CanCreateWindowResult {
jam 2012/03/28 02:38:26 nit: see hte other enums in content API to see the
Mihai Parparita -not on Chrome 2012/03/28 20:29:01 Went with the boolean out parameter approach.
+ // The given window canot be created.
Charlie Reis 2012/03/27 23:19:27 nit: cannot
Mihai Parparita -not on Chrome 2012/03/28 20:29:01 Obsolete, this enum is gone per John's comments.
+ CANNOT_CREATE_WINDOW,
+ // The given window can be created.
+ CAN_CREATE_WINDOW,
+ // The given window can be created, but it is not allowed to be scriptable,
+ // and should be put in a separate process.
+ CAN_CREATE_WINDOW_NO_JS_ACCESS
+ };
+
// Allows the embedder to set any number of custom BrowserMainParts
// implementations for the browser startup code. See comments in
// browser_main_parts.h.
@@ -330,10 +340,10 @@ class ContentBrowserClient {
int render_view_id,
int notification_id) = 0;
- // Returns true if the given page is allowed to open a window of the given
+ // Returns whether the given page is allowed to open a window of the given
// type.
// This is called on the IO thread.
- virtual bool CanCreateWindow(
+ virtual CanCreateWindowResult CanCreateWindow(
const GURL& opener_url,
const GURL& source_origin,
WindowContainerType container_type,

Powered by Google App Engine
This is Rietveld 408576698