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

Issue 9837074: Make it so that allow_js_access: false can be used with background pages created by window.open. (Closed)

Created:
8 years, 9 months ago by Mihai Parparita -not on Chrome
Modified:
8 years, 9 months ago
CC:
chromium-reviews, joi+watch-content_chromium.org, Aaron Boodman, jam, mihaip+watch_chromium.org, darin-cc_chromium.org, Andrew T Wilson (Slow)
Visibility:
Public.

Description

Make it so that allow_js_access: false can be used with background pages created by window.open. We want attempts to create those windows to succeed, but the window.open call should still return null. This is accomplished by opening the background contents in another process, in the same manner as r125180. BUG=120446 R=creis@chromium.org Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=129574

Patch Set 1 #

Total comments: 10

Patch Set 2 : Revised approach based on http://crrev.com/125180. #

Total comments: 8

Patch Set 3 : Review feedback #

Total comments: 2

Patch Set 4 : Fix ShellContentBrowserClient. #

Total comments: 4

Patch Set 5 : Fix indentation. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+256 lines, -85 lines) Patch
M chrome/browser/chrome_content_browser_client.h View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/chrome_content_browser_client.cc View 1 2 3 4 1 chunk +16 lines, -10 lines 0 comments Download
M chrome/browser/extensions/app_background_page_apitest.cc View 1 2 chunks +43 lines, -1 line 0 comments Download
M chrome/browser/prerender/prerender_contents.cc View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/ui/browser.h View 1 2 2 chunks +5 lines, -4 lines 0 comments Download
M chrome/browser/ui/browser.cc View 1 2 3 4 4 chunks +36 lines, -13 lines 0 comments Download
M chrome/common/extensions/extension.cc View 1 2 1 chunk +0 lines, -5 lines 0 comments Download
M chrome/common/extensions/extension_manifest_constants.h View 1 2 1 chunk +0 lines, -1 line 0 comments Download
M chrome/common/extensions/extension_manifest_constants.cc View 1 2 1 chunk +0 lines, -3 lines 0 comments Download
M chrome/common/extensions/extension_manifests_unittest.cc View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
A chrome/test/data/extensions/api_test/app_background_page/no_js/bg.html View 1 1 chunk +16 lines, -0 lines 0 comments Download
A chrome/test/data/extensions/api_test/app_background_page/no_js/launch.html View 1 1 chunk +23 lines, -0 lines 0 comments Download
M chrome/test/data/extensions/api_test/app_background_page/no_js/test.js View 1 2 chunks +14 lines, -27 lines 0 comments Download
A chrome/test/data/extensions/api_test/app_background_page/no_js_manifest/content_script.js View 1 1 chunk +18 lines, -0 lines 0 comments Download
A chrome/test/data/extensions/api_test/app_background_page/no_js_manifest/manifest.json View 1 1 chunk +17 lines, -0 lines 0 comments Download
A + chrome/test/data/extensions/api_test/app_background_page/no_js_manifest/test.js View 1 0 chunks +-1 lines, --1 lines 0 comments Download
A chrome/test/data/extensions/manifest_tests/background_allow_no_js_access2.json View 1 1 chunk +18 lines, -0 lines 0 comments Download
M content/browser/mock_content_browser_client.h View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/mock_content_browser_client.cc View 1 2 1 chunk +3 lines, -1 line 0 comments Download
M content/browser/renderer_host/render_message_filter.cc View 1 2 2 chunks +12 lines, -4 lines 0 comments Download
M content/browser/renderer_host/render_widget_helper.h View 1 2 2 chunks +2 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_widget_helper.cc View 1 2 1 chunk +7 lines, -6 lines 0 comments Download
M content/browser/tab_contents/tab_contents_view_helper.cc View 1 1 chunk +2 lines, -1 line 0 comments Download
M content/public/browser/content_browser_client.h View 1 2 1 chunk +4 lines, -2 lines 0 comments Download
M content/public/browser/web_contents_delegate.h View 1 2 1 chunk +4 lines, -2 lines 0 comments Download
M content/public/browser/web_contents_delegate.cc View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M content/shell/shell_content_browser_client.h View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M content/shell/shell_content_browser_client.cc View 1 2 3 1 chunk +3 lines, -1 line 0 comments Download

Messages

Total messages: 16 (0 generated)
Mihai Parparita -not on Chrome
8 years, 9 months ago (2012-03-24 01:01:53 UTC) #1
Mihai Parparita -not on Chrome
This still needs some work (a test, better behavior when calling window.open when a background ...
8 years, 9 months ago (2012-03-24 01:03:11 UTC) #2
Andrew T Wilson (Slow)
Looks like this is the right approach. A few nits. https://chromiumcodereview.appspot.com/9837074/diff/1/chrome/browser/chrome_content_browser_client.cc File chrome/browser/chrome_content_browser_client.cc (right): https://chromiumcodereview.appspot.com/9837074/diff/1/chrome/browser/chrome_content_browser_client.cc#newcode1277 ...
8 years, 9 months ago (2012-03-26 15:28:10 UTC) #3
Charlie Reis
https://chromiumcodereview.appspot.com/9837074/diff/1/chrome/common/extensions/extension.cc File chrome/common/extensions/extension.cc (left): https://chromiumcodereview.appspot.com/9837074/diff/1/chrome/common/extensions/extension.cc#oldcode1832 chrome/common/extensions/extension.cc:1832: *error = ASCIIToUTF16(errors::kInvalidBackgroundAllowJsAccessNoPage); Normally, we expect people to set ...
8 years, 9 months ago (2012-03-26 17:56:50 UTC) #4
Mihai Parparita -not on Chrome
PTAL. I've added tests as well. +John for content API changes. https://chromiumcodereview.appspot.com/9837074/diff/1/chrome/browser/chrome_content_browser_client.cc File chrome/browser/chrome_content_browser_client.cc (right): ...
8 years, 9 months ago (2012-03-27 01:16:07 UTC) #5
Charlie Reis
LGTM https://chromiumcodereview.appspot.com/9837074/diff/1/chrome/common/extensions/extension.cc File chrome/common/extensions/extension.cc (left): https://chromiumcodereview.appspot.com/9837074/diff/1/chrome/common/extensions/extension.cc#oldcode1832 chrome/common/extensions/extension.cc:1832: *error = ASCIIToUTF16(errors::kInvalidBackgroundAllowJsAccessNoPage); On 2012/03/27 01:16:07, Mihai Parparita ...
8 years, 9 months ago (2012-03-27 23:19:27 UTC) #6
jam
http://codereview.chromium.org/9837074/diff/1002/content/public/browser/content_browser_client.h File content/public/browser/content_browser_client.h (right): http://codereview.chromium.org/9837074/diff/1002/content/public/browser/content_browser_client.h#newcode94 content/public/browser/content_browser_client.h:94: enum CanCreateWindowResult { nit: see hte other enums in ...
8 years, 9 months ago (2012-03-28 02:38:26 UTC) #7
Mihai Parparita -not on Chrome
+Sky, for browser/ui OWNERS http://codereview.chromium.org/9837074/diff/1/chrome/common/extensions/extension.cc File chrome/common/extensions/extension.cc (left): http://codereview.chromium.org/9837074/diff/1/chrome/common/extensions/extension.cc#oldcode1832 chrome/common/extensions/extension.cc:1832: *error = ASCIIToUTF16(errors::kInvalidBackgroundAllowJsAccessNoPage); On 2012/03/27 ...
8 years, 9 months ago (2012-03-28 20:29:01 UTC) #8
sky
http://codereview.chromium.org/9837074/diff/6028/chrome/browser/ui/browser.cc File chrome/browser/ui/browser.cc (right): http://codereview.chromium.org/9837074/diff/6028/chrome/browser/ui/browser.cc#newcode2360 chrome/browser/ui/browser.cc:2360: content::PAGE_TRANSITION_LINK, Are you sure this is the right transition ...
8 years, 9 months ago (2012-03-28 20:43:13 UTC) #9
Mihai Parparita -not on Chrome
http://codereview.chromium.org/9837074/diff/6028/chrome/browser/ui/browser.cc File chrome/browser/ui/browser.cc (right): http://codereview.chromium.org/9837074/diff/6028/chrome/browser/ui/browser.cc#newcode2360 chrome/browser/ui/browser.cc:2360: content::PAGE_TRANSITION_LINK, On 2012/03/28 20:43:13, sky wrote: > Are you ...
8 years, 9 months ago (2012-03-28 20:47:50 UTC) #10
sky
Fair enough, LGTM
8 years, 9 months ago (2012-03-28 20:50:16 UTC) #11
jam
lgtm
8 years, 9 months ago (2012-03-28 21:29:10 UTC) #12
Andrew T Wilson (Slow)
drive by LGTM w/nits. http://codereview.chromium.org/9837074/diff/6030/chrome/browser/chrome_content_browser_client.cc File chrome/browser/chrome_content_browser_client.cc (right): http://codereview.chromium.org/9837074/diff/6030/chrome/browser/chrome_content_browser_client.cc#newcode1285 chrome/browser/chrome_content_browser_client.cc:1285: source_origin, nit:I think this indentation ...
8 years, 9 months ago (2012-03-28 22:01:30 UTC) #13
Mihai Parparita -not on Chrome
http://codereview.chromium.org/9837074/diff/6030/chrome/browser/chrome_content_browser_client.cc File chrome/browser/chrome_content_browser_client.cc (right): http://codereview.chromium.org/9837074/diff/6030/chrome/browser/chrome_content_browser_client.cc#newcode1285 chrome/browser/chrome_content_browser_client.cc:1285: source_origin, On 2012/03/28 22:01:30, Andrew T Wilson wrote: > ...
8 years, 9 months ago (2012-03-28 23:00:45 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mihaip@chromium.org/9837074/18001
8 years, 9 months ago (2012-03-29 01:40:41 UTC) #15
commit-bot: I haz the power
8 years, 9 months ago (2012-03-29 04:03:04 UTC) #16
Change committed as 129574

Powered by Google App Engine
This is Rietveld 408576698