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

Issue 6765011: Move the dispatching of extension messages out of RenderThread. This also moves a bunch of exten... (Closed)

Created:
9 years, 9 months ago by jam
Modified:
9 years, 7 months ago
Reviewers:
Matt Perry
CC:
chromium-reviews, Erik does not do reviews, Aaron Boodman, pam+watch_chromium.org, brettw-cc_chromium.org, darin-cc_chromium.org
Visibility:
Public.

Description

Move the dispatching of extension messages out of RenderThread. This also moves a bunch of extension related state out of RenderThread. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=79699

Patch Set 1 #

Total comments: 4

Patch Set 2 : fix browser_tests #

Patch Set 3 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+476 lines, -290 lines) Patch
M chrome/browser/renderer_host/browser_render_process_host.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/chrome_renderer.gypi View 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/common/extensions/extension_messages.h View 2 chunks +7 lines, -0 lines 0 comments Download
M chrome/common/render_messages.h View 1 chunk +0 lines, -6 lines 0 comments Download
M chrome/renderer/chrome_content_renderer_client.h View 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/renderer/chrome_content_renderer_client.cc View 3 chunks +14 lines, -2 lines 0 comments Download
M chrome/renderer/extensions/chrome_app_bindings.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/renderer/extensions/event_bindings.cc View 2 chunks +2 lines, -1 line 0 comments Download
A chrome/renderer/extensions/extension_dispatcher.h View 1 2 1 chunk +100 lines, -0 lines 0 comments Download
A chrome/renderer/extensions/extension_dispatcher.cc View 1 2 1 chunk +219 lines, -0 lines 0 comments Download
M chrome/renderer/extensions/extension_process_bindings.cc View 3 chunks +3 lines, -3 lines 0 comments Download
M chrome/renderer/mock_render_thread.h View 3 chunks +0 lines, -10 lines 0 comments Download
M chrome/renderer/mock_render_thread.cc View 2 chunks +0 lines, -8 lines 0 comments Download
M chrome/renderer/render_thread.h View 1 2 17 chunks +19 lines, -67 lines 0 comments Download
M chrome/renderer/render_thread.cc View 1 2 18 chunks +35 lines, -173 lines 0 comments Download
M chrome/test/render_view_test.h View 1 2 chunks +3 lines, -0 lines 0 comments Download
M chrome/test/render_view_test.cc View 1 4 chunks +6 lines, -1 line 0 comments Download
M content/renderer/content_renderer_client.h View 2 chunks +12 lines, -0 lines 0 comments Download
M content/renderer/content_renderer_client.cc View 1 chunk +8 lines, -0 lines 0 comments Download
M content/renderer/render_process_observer.h View 2 chunks +15 lines, -1 line 0 comments Download
M content/renderer/render_process_observer.cc View 2 chunks +16 lines, -0 lines 0 comments Download
M content/renderer/render_view.cc View 9 chunks +10 lines, -15 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
jam
9 years, 9 months ago (2011-03-29 00:04:36 UTC) #1
Matt Perry
LGTM with one small nit. http://codereview.chromium.org/6765011/diff/1/chrome/renderer/extensions/extension_dispatcher.cc File chrome/renderer/extensions/extension_dispatcher.cc (right): http://codereview.chromium.org/6765011/diff/1/chrome/renderer/extensions/extension_dispatcher.cc#newcode32 chrome/renderer/extensions/extension_dispatcher.cc:32: g_extension_dispatcher = this; CHECK ...
9 years, 9 months ago (2011-03-29 00:48:29 UTC) #2
jam
9 years, 9 months ago (2011-03-29 04:55:37 UTC) #3
http://codereview.chromium.org/6765011/diff/1/chrome/renderer/extensions/exte...
File chrome/renderer/extensions/extension_dispatcher.cc (right):

http://codereview.chromium.org/6765011/diff/1/chrome/renderer/extensions/exte...
chrome/renderer/extensions/extension_dispatcher.cc:32: g_extension_dispatcher =
this;
On 2011/03/29 00:48:29, Matt Perry wrote:
> CHECK that this is NULL beforehand?

DONE

> 
> It's weird that this is a singleton class, but has a public constructor.

I think that's fine, i.e. RenderThread and RenderProcess are both like that.

> Do you plan on changing that in an upcoming refactor?

I'm actually not sure yet how this class will be accessed.  It depends on how
the rest of the refactoring goes.  I would like to remove this getter though.

http://codereview.chromium.org/6765011/diff/1/chrome/renderer/render_thread.cc
File chrome/renderer/render_thread.cc (right):

http://codereview.chromium.org/6765011/diff/1/chrome/renderer/render_thread.c...
chrome/renderer/render_thread.cc:1047: bool restrict_to_extensions =
v8_extensions_[v8_extension_name];
On 2011/03/29 00:48:29, Matt Perry wrote:
> the restrict_to_extensions boolean is something that only the
> ExtensionDispatcher-registered extensions will use. So you might consider
moving
> it out of this class and into ExtensionDispatcher if you want to purge
extension
> references from this file. Up to you, if and when you want to do this.

good point, done

Powered by Google App Engine
This is Rietveld 408576698