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

Issue 136453005: app_shell: Make renderer run background page JavaScript (Closed)

Created:
6 years, 11 months ago by James Cook
Modified:
6 years, 9 months ago
Reviewers:
Yoyo Zhou
CC:
chromium-reviews, extensions-reviews_chromium.org, tfarina, jam, joi+watch-content_chromium.org, darin-cc_chromium.org, chromium-apps-reviews_chromium.org, app-shell-reviews_chromium.org
Visibility:
Public.

Description

app_shell: Make renderer run background page JavaScript * Install URL protocol handler for chrome-extension:// and chrome-extension-resource:// * Allow extension urls to be handled. * Register extensions with IO thread extension InfoMap. * Bonus: app_shell no longer crashes on startup. With this change an extension background page can print "Hello world" using console.log(). BUG=288226, 332982 TEST=browser_tests. Also run app_shell --app=/path/to/extension with an extension with background.js. The JavaScript executes and console.log() works. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=245325

Patch Set 1 #

Patch Set 2 : IsHandledURL tweaks, ExtensionResourceHandler #

Patch Set 3 : cleanup (load_background_page) #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+179 lines, -17 lines) Patch
M apps/shell/DEPS View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M apps/shell/shell_browser_main_parts.h View 1 chunk +4 lines, -0 lines 0 comments Download
M apps/shell/shell_content_browser_client.h View 2 chunks +17 lines, -0 lines 0 comments Download
M apps/shell/shell_content_browser_client.cc View 1 2 2 chunks +109 lines, -1 line 2 comments Download
M apps/shell/shell_extension_system.h View 1 2 2 chunks +4 lines, -0 lines 0 comments Download
M apps/shell/shell_extension_system.cc View 1 2 6 chunks +19 lines, -7 lines 0 comments Download
M chrome/browser/extensions/extension_host.h View 1 2 chunks +4 lines, -0 lines 0 comments Download
M chrome/browser/extensions/extension_host.cc View 1 2 3 chunks +18 lines, -5 lines 2 comments Download
M chrome/browser/extensions/extension_service.cc View 1 2 2 chunks +2 lines, -4 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
James Cook
yoz, PTAL. This patch gets us to Milestone 3. https://codereview.chromium.org/136453005/diff/50001/apps/shell/shell_content_browser_client.cc File apps/shell/shell_content_browser_client.cc (right): https://codereview.chromium.org/136453005/diff/50001/apps/shell/shell_content_browser_client.cc#newcode51 apps/shell/shell_content_browser_client.cc:51: ...
6 years, 11 months ago (2014-01-15 18:49:27 UTC) #1
Yoyo Zhou
LGTM https://chromiumcodereview.appspot.com/136453005/diff/50001/apps/shell/shell_content_browser_client.cc File apps/shell/shell_content_browser_client.cc (right): https://chromiumcodereview.appspot.com/136453005/diff/50001/apps/shell/shell_content_browser_client.cc#newcode129 apps/shell/shell_content_browser_client.cc:129: // service process map, or can we assume ...
6 years, 11 months ago (2014-01-16 01:44:11 UTC) #2
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jamescook@chromium.org/136453005/50001
6 years, 11 months ago (2014-01-16 17:37:47 UTC) #3
commit-bot: I haz the power
Change committed as 245325
6 years, 11 months ago (2014-01-16 21:23:49 UTC) #4
kirr
https://codereview.chromium.org/136453005/diff/50001/chrome/browser/extensions/extension_host.cc File chrome/browser/extensions/extension_host.cc (right): https://codereview.chromium.org/136453005/diff/50001/chrome/browser/extensions/extension_host.cc#newcode196 chrome/browser/extensions/extension_host.cc:196: if (!IsBackgroundPage()) { Is it a misprint in condition? ...
6 years, 9 months ago (2014-03-07 12:23:40 UTC) #5
James Cook
6 years, 9 months ago (2014-03-07 17:14:47 UTC) #6
Message was sent while issue was closed.
https://codereview.chromium.org/136453005/diff/50001/chrome/browser/extension...
File chrome/browser/extensions/extension_host.cc (right):

https://codereview.chromium.org/136453005/diff/50001/chrome/browser/extension...
chrome/browser/extensions/extension_host.cc:196: if (!IsBackgroundPage()) {
On 2014/03/07 12:23:40, kirr wrote:
> Is it a misprint in condition? Seems like DidCreateRenderViewForBackgroundPage
> is only for background pages.

Yeah, that looks wrong. I'm taking a closer look at the code now.  Is there a
bug you think is caused by this problem?

Powered by Google App Engine
This is Rietveld 408576698