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

Issue 1115363002: mojo: Use ContentHandlers to bundle multiple Applications into a module. (Closed)

Created:
5 years, 7 months ago by Elliot Glaysher
Modified:
5 years, 7 months ago
CC:
chromium-reviews, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, dcheng, abarth-chromium, Aaron Boodman, yzshen+watch_chromium.org, darin (slow to review), ben+mojo_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

mojo: Use ContentHandlers to bundle multiple Applications into a module. The previous way of implementing core_services worked by having a ServiceProvider as the external interface. This fell down because the boundary between Applications in mojo is meaningful and is used in the ViewManager and the WindowManager to restrict access to some services. The (possibly misnamed) ContentHandler interface, on the other hand, looks like a possible avenue of attack. ContentHandler's one method starts new Applications. So mojo:core_services should be a ContentHandler instead of a ServiceProvider and will spawn an Application for each internal service. This currently hard codes the mapping in context.cc, but eventually, we should do something more intelligent for the packaging. This patch also doesn't handle spawning new applications on new threads as we don't have multiple applications yet. BUG=477435 Committed: https://crrev.com/2cf387a31df4df41581982d28d964eb9e1607496 Cr-Commit-Position: refs/heads/master@{#327947}

Patch Set 1 #

Total comments: 4

Patch Set 2 : don't leak #

Total comments: 6

Patch Set 3 : Rename redirect -> alias #

Unified diffs Side-by-side diffs Delta from patch set Stats (+145 lines, -75 lines) Patch
M components/clipboard/BUILD.gn View 1 chunk +2 lines, -0 lines 0 comments Download
A components/clipboard/clipboard_application_delegate.h View 1 chunk +40 lines, -0 lines 0 comments Download
A components/clipboard/clipboard_application_delegate.cc View 1 chunk +30 lines, -0 lines 0 comments Download
M components/clipboard/main.cc View 1 chunk +3 lines, -27 lines 0 comments Download
M components/core_services/BUILD.gn View 1 chunk +1 line, -0 lines 0 comments Download
M components/core_services/DEPS View 1 chunk +1 line, -0 lines 0 comments Download
M components/core_services/core_services_application_delegate.h View 1 2 3 chunks +13 lines, -9 lines 0 comments Download
M components/core_services/core_services_application_delegate.cc View 1 2 chunks +18 lines, -30 lines 0 comments Download
M components/html_viewer/blink_platform_impl.cc View 1 chunk +1 line, -3 lines 0 comments Download
M mojo/runner/context.cc View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
M mojo/shell/application_manager.h View 1 2 3 chunks +14 lines, -6 lines 0 comments Download
M mojo/shell/application_manager.cc View 1 2 2 chunks +17 lines, -0 lines 0 comments Download

Messages

Total messages: 11 (2 generated)
Elliot Glaysher
This is the most basic implementation of a ContentHandler based service bundle. It does not ...
5 years, 7 months ago (2015-04-30 21:40:57 UTC) #2
sky
https://codereview.chromium.org/1115363002/diff/1/components/core_services/core_services_application_delegate.cc File components/core_services/core_services_application_delegate.cc (right): https://codereview.chromium.org/1115363002/diff/1/components/core_services/core_services_application_delegate.cc#newcode36 components/core_services/core_services_application_delegate.cc:36: new mojo::ApplicationImpl(new clipboard::ClipboardApplicationDelegate, I suspect this leaks. Can you ...
5 years, 7 months ago (2015-04-30 21:59:08 UTC) #3
Elliot Glaysher
ptal https://codereview.chromium.org/1115363002/diff/1/components/core_services/core_services_application_delegate.cc File components/core_services/core_services_application_delegate.cc (right): https://codereview.chromium.org/1115363002/diff/1/components/core_services/core_services_application_delegate.cc#newcode36 components/core_services/core_services_application_delegate.cc:36: new mojo::ApplicationImpl(new clipboard::ClipboardApplicationDelegate, On 2015/04/30 21:59:08, sky wrote: ...
5 years, 7 months ago (2015-05-01 17:00:04 UTC) #4
Ben Goodger (Google)
https://codereview.chromium.org/1115363002/diff/20001/components/core_services/core_services_application_delegate.h File components/core_services/core_services_application_delegate.h (right): https://codereview.chromium.org/1115363002/diff/20001/components/core_services/core_services_application_delegate.h#newcode17 components/core_services/core_services_application_delegate.h:17: class BundledApplication; ??? https://codereview.chromium.org/1115363002/diff/20001/components/core_services/core_services_application_delegate.h#newcode46 components/core_services/core_services_application_delegate.h:46: scoped_ptr<mojo::ApplicationImpl> clipboard_application_; when you ...
5 years, 7 months ago (2015-05-01 17:10:33 UTC) #5
Elliot Glaysher
https://codereview.chromium.org/1115363002/diff/20001/components/core_services/core_services_application_delegate.h File components/core_services/core_services_application_delegate.h (right): https://codereview.chromium.org/1115363002/diff/20001/components/core_services/core_services_application_delegate.h#newcode17 components/core_services/core_services_application_delegate.h:17: class BundledApplication; On 2015/05/01 17:10:33, Ben Goodger (Google) wrote: ...
5 years, 7 months ago (2015-05-01 17:28:44 UTC) #6
Ben Goodger (Google)
lgtm
5 years, 7 months ago (2015-05-01 18:15:14 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1115363002/40001
5 years, 7 months ago (2015-05-01 18:18:15 UTC) #9
commit-bot: I haz the power
Committed patchset #3 (id:40001)
5 years, 7 months ago (2015-05-01 18:26:02 UTC) #10
commit-bot: I haz the power
5 years, 7 months ago (2015-05-01 18:27:51 UTC) #11
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/2cf387a31df4df41581982d28d964eb9e1607496
Cr-Commit-Position: refs/heads/master@{#327947}

Powered by Google App Engine
This is Rietveld 408576698