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

Issue 8447017: [DRAFT] Add new default stylesheet for platform apps. (Closed)

Created:
9 years, 1 month ago by miket_OOO
Modified:
9 years, 1 month ago
Reviewers:
Aaron Boodman
CC:
chromium-reviews, Erik does not do reviews, jam, mihaip+watch_chromium.org, Aaron Boodman, darin-cc_chromium.org, brettw-cc_chromium.org
Visibility:
Public.

Description

[DRAFT] not suitable for review/commit. This CL is dependent on http://codereview.chromium.org/8429023/, which at the time of this writing isn't yet approved. BUG=none TEST=none

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+108 lines, -1 line) Patch
M chrome/browser/renderer_host/chrome_render_view_host_observer.cc View 2 chunks +4 lines, -0 lines 0 comments Download
M chrome/chrome_renderer.gypi View 1 chunk +2 lines, -0 lines 0 comments Download
A chrome/common/extensions/platform_app_messages.h View 1 chunk +13 lines, -0 lines 0 comments Download
M chrome/renderer/chrome_content_renderer_client.h View 2 chunks +2 lines, -0 lines 0 comments Download
M chrome/renderer/chrome_content_renderer_client.cc View 4 chunks +5 lines, -1 line 0 comments Download
A chrome/renderer/extensions/platform_app_dispatcher.h View 1 chunk +24 lines, -0 lines 0 comments Download
A chrome/renderer/extensions/platform_app_dispatcher.cc View 1 chunk +44 lines, -0 lines 0 comments Download
M chrome/renderer/renderer_resources.grd View 1 chunk +1 line, -0 lines 0 comments Download
A chrome/renderer/resources/extensions/platform_app.css View 1 chunk +12 lines, -0 lines 0 comments Download
M ipc/ipc_message_utils.h View 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 1 (0 generated)
Aaron Boodman
9 years, 1 month ago (2011-11-06 23:28:41 UTC) #1
I don't think you want to add any code to the browser process.

The list of extensions is available in the renderer, too [1], so you can just
iterate the set of extensions, find the ones that are platform apps, and add
this new stylesheet using their url() as the basis for the pattern.

The list of extensions can be changed at runtime, so you will need to listen for
ExtensionMsg_Loaded and ExtensionMsg_Unloaded in order to call
WebView::addUserStyleSheet with the right values.

Note that I think there can be only one handler for each IPC message and we
already handle these in ExtensionDispatcher, so maybe my advice to create an
app-specific dispatcher was off, at least for now. Maybe what you really want is
a little PlatformAppStylesheetController object or something which
ExtensionDispatcher delegates to. 

[1] You will need to add an entry here:
http://git.chromium.org/gitweb/?p=chromium/chromium.git;a=blob;f=chrome/commo....

Powered by Google App Engine
This is Rietveld 408576698