Chromium Code Reviews
[email protected] (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(175)

Issue 1734014: Initial support for web-extent background pages (Closed)

Created:
10 years, 7 months ago by rafaelw
Modified:
9 years, 7 months ago
CC:
chromium-reviews, jam+cc_chromium.org, ben+cc_chromium.org, Erik does not do reviews, Aaron Boodman, pam+watch_chromium.org, brettw-cc_chromium.org, darin-cc_chromium.org, darin_chrromium.org
Base URL:
http://src.chromium.org/git/chromium.git
Visibility:
Public.

Description

Initial support for web-extent background pages. This patch adds a new RVH container: BackgroundContents. The idea is that apps can open a live web-page as a "background" page using window.open('<url>', '<name>', 'background'); If 'background' is specified and the opener is within the app's extent, a BackgroundContents will be used. Otherwise, the 'background' feature is ignored and it is treated as a regular popup call. Note that as of this patch the following are explicitly not-yet addressed: 1) Session storage for BackgroundContents 2) SSL (or other failures) requiring UI 3) Javascript messages (alert, etc...) 4) Session restore TEST=All tests should pass BUG=41275 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=46544

Patch Set 1 #

Patch Set 2 : pre review #

Total comments: 8

Patch Set 3 : cr changes #

Patch Set 4 : spacing #

Total comments: 25

Patch Set 5 : cr changes + add support for chrome://extensions active-views #

Total comments: 2

Patch Set 6 : remove newline #

Patch Set 7 : missed review comments. #

Patch Set 8 : implement background permission #

Total comments: 19

Patch Set 9 : more cr changes #

Patch Set 10 : sigh..missed on #

Patch Set 11 : pre-commit #

Unified diffs Side-by-side diffs Delta from patch set Stats (+494 lines, -73 lines) Patch
M chrome/browser/extensions/extension_host.cc View 1 2 3 4 5 6 7 8 9 10 7 chunks +18 lines, -14 lines 0 comments Download
M chrome/browser/extensions/extension_process_manager.cc View 1 chunk +2 lines, -4 lines 0 comments Download
M chrome/browser/extensions/extensions_ui.cc View 5 6 7 8 9 10 4 chunks +14 lines, -6 lines 0 comments Download
M chrome/browser/notifications/balloon_host.h View 2 chunks +4 lines, -1 line 0 comments Download
M chrome/browser/notifications/balloon_host.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +12 lines, -6 lines 0 comments Download
M chrome/browser/renderer_host/render_view_host.h View 9 10 1 chunk +3 lines, -3 lines 0 comments Download
M chrome/browser/renderer_host/render_view_host.cc View 9 10 1 chunk +2 lines, -2 lines 0 comments Download
A chrome/browser/tab_contents/background_contents.h View 1 2 3 4 1 chunk +126 lines, -0 lines 0 comments Download
A chrome/browser/tab_contents/background_contents.cc View 1 2 3 4 5 6 7 8 9 1 chunk +192 lines, -0 lines 0 comments Download
M chrome/browser/tab_contents/render_view_host_delegate_helper.h View 1 2 3 4 5 6 2 chunks +30 lines, -5 lines 0 comments Download
M chrome/browser/tab_contents/render_view_host_delegate_helper.cc View 1 2 3 4 5 6 7 8 4 chunks +47 lines, -11 lines 0 comments Download
M chrome/browser/tab_contents/tab_contents.cc View 9 10 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/tab_contents/tab_contents_view.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +3 lines, -2 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/common/extensions/extension.h View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/common/extensions/extension.cc View 2 chunks +2 lines, -0 lines 0 comments Download
M chrome/common/extensions/extension_constants.h View 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/common/notification_type.h View 1 chunk +10 lines, -0 lines 0 comments Download
M chrome/common/render_messages_internal.h View 1 chunk +4 lines, -4 lines 0 comments Download
M chrome/common/view_types.h View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/renderer/extensions/extension_process_bindings.cc View 3 chunks +6 lines, -4 lines 0 comments Download
M chrome/renderer/render_view.h View 2 chunks +3 lines, -3 lines 0 comments Download
M chrome/renderer/render_view.cc View 9 10 5 chunks +7 lines, -7 lines 0 comments Download

Messages

Total messages: 15 (0 generated)
Aaron Boodman
Did not review BackgroundContents yet, but I think the GetAs* methods should be removed. http://codereview.chromium.org/1734014/diff/2001/3005 ...
10 years, 7 months ago (2010-04-29 16:57:52 UTC) #1
rafaelw
Ok, I've addressed your concerns (thanks to Matt for helping me brainstorm a good approach ...
10 years, 7 months ago (2010-04-30 20:44:01 UTC) #2
Aaron Boodman
Yes, this seems better now. Will look at BackgroundContents later. http://codereview.chromium.org/1734014/diff/10001/11002 File chrome/browser/notifications/balloon_host.cc (right): http://codereview.chromium.org/1734014/diff/10001/11002#newcode94 ...
10 years, 7 months ago (2010-05-01 01:05:00 UTC) #3
Aaron Boodman
On Fri, Apr 30, 2010 at 6:05 PM, <[email protected]> wrote: > Yes, this seems better ...
10 years, 7 months ago (2010-05-01 01:35:15 UTC) #4
Aaron Boodman
http://codereview.chromium.org/1734014/diff/10001/11003 File chrome/browser/tab_contents/background_contents.cc (right): http://codereview.chromium.org/1734014/diff/10001/11003#newcode53 chrome/browser/tab_contents/background_contents.cc:53: bool app_closing_non_mac = *Details<bool>(details).ptr(); The non_mac naming here seem ...
10 years, 7 months ago (2010-05-01 01:51:10 UTC) #5
rafaelw
http://codereview.chromium.org/1734014/diff/10001/11003 File chrome/browser/tab_contents/background_contents.cc (right): http://codereview.chromium.org/1734014/diff/10001/11003#newcode53 chrome/browser/tab_contents/background_contents.cc:53: bool app_closing_non_mac = *Details<bool>(details).ptr(); On 2010/05/01 01:51:10, Aaron Boodman ...
10 years, 7 months ago (2010-05-03 23:36:02 UTC) #6
Aaron Boodman
lgtm http://codereview.chromium.org/1734014/diff/18001/19003 File chrome/browser/extensions/extension_tabs_module_constants.h (right): http://codereview.chromium.org/1734014/diff/18001/19003#newcode72 chrome/browser/extensions/extension_tabs_module_constants.h:72: nop
10 years, 7 months ago (2010-05-03 23:43:34 UTC) #7
rafaelw
http://codereview.chromium.org/1734014/diff/18001/19003 File chrome/browser/extensions/extension_tabs_module_constants.h (right): http://codereview.chromium.org/1734014/diff/18001/19003#newcode72 chrome/browser/extensions/extension_tabs_module_constants.h:72: On 2010/05/03 23:43:35, Aaron Boodman wrote: > nop Thanks. ...
10 years, 7 months ago (2010-05-03 23:49:47 UTC) #8
rafaelw
almost forgot about these earlier comments. sorry. http://codereview.chromium.org/1734014/diff/10001/11002 File chrome/browser/notifications/balloon_host.cc (right): http://codereview.chromium.org/1734014/diff/10001/11002#newcode94 chrome/browser/notifications/balloon_host.cc:94: DOMUIFactory::GetDOMUIType(balloon_->notification().content_url()), NULL, ...
10 years, 7 months ago (2010-05-04 00:57:13 UTC) #9
rafaelw
http://codereview.chromium.org/1734014/diff/10001/11005 File chrome/browser/tab_contents/render_view_host_delegate_helper.cc (right): http://codereview.chromium.org/1734014/diff/10001/11005#newcode37 chrome/browser/tab_contents/render_view_host_delegate_helper.cc:37: return (extensions_service->GetExtensionByURL(opening_url) || > Also, do you want to ...
10 years, 7 months ago (2010-05-04 01:35:48 UTC) #10
Aaron Boodman
Still LGTM
10 years, 7 months ago (2010-05-04 02:29:31 UTC) #11
darin (slow to review)
http://codereview.chromium.org/1734014/diff/35001/36006 File chrome/browser/tab_contents/background_contents.cc (right): http://codereview.chromium.org/1734014/diff/35001/36006#newcode34 chrome/browser/tab_contents/background_contents.cc:34: render_view_host_->PopupNotificationVisibilityChanged(false); nit: it seems like this method is poorly ...
10 years, 7 months ago (2010-05-04 23:43:05 UTC) #12
Aaron Boodman
http://codereview.chromium.org/1734014/diff/35001/36006 File chrome/browser/tab_contents/background_contents.cc (right): http://codereview.chromium.org/1734014/diff/35001/36006#newcode88 chrome/browser/tab_contents/background_contents.cc:88: // Note: because BackgroundContents are only available to extension ...
10 years, 7 months ago (2010-05-05 00:14:04 UTC) #13
rafaelw
http://codereview.chromium.org/1734014/diff/35001/36006 File chrome/browser/tab_contents/background_contents.cc (right): http://codereview.chromium.org/1734014/diff/35001/36006#newcode34 chrome/browser/tab_contents/background_contents.cc:34: render_view_host_->PopupNotificationVisibilityChanged(false); On 2010/05/04 23:43:05, darin wrote: > nit: it ...
10 years, 7 months ago (2010-05-05 18:05:30 UTC) #14
darin (slow to review)
10 years, 7 months ago (2010-05-05 18:19:27 UTC) #15
LGTM

Powered by Google App Engine
This is Rietveld 408576698