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

Issue 1476643002: mustash: Enable connections to mus from the Chrome renderer [take 2] (Closed)

Created:
5 years ago by Fady Samuel
Modified:
5 years ago
CC:
Aaron Boodman, abarth-chromium, ben+mojo_chromium.org, chromium-reviews, creis+watch_chromium.org, darin (slow to review), darin-cc_chromium.org, jam, nasko+codewatch_chromium.org, nona+watch_chromium.org, qsr+mojo_chromium.org, shuchen+watch_chromium.org, James Su, tfarina, viettrungluu+watch_chromium.org, yusukes+watch_chromium.org, yzshen+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

mustash: Enable connections to mus from the Chrome renderer [take 2] This CL introduces the initial plumbing to enable connections to mus from the Chrome renderer. The connection is established as follows: 1. RenderWidgetHostViewMus requests a RenderWidgetWindowTreeClientFactory interface from the renderer. It uses that client ptr to issue an CreateWindowTreeClientForRenderWidget with the host routing ID and an interface request to a WindowTreeClient. 2. The renderer receives the request for RenderWidgetWindowTreeClientFactory and handles it in RenderWidgetWindowTreeClientFactoryImpl. The renderer sees the subsequent CreateWindowTreeClientForRenderWidget call, and creates a RenderWidgetMusConnection. 3. RenderWidgetMusConnection uses the WindowTreeClient interface request to establish a WindowTreeConnection. 4. RenderWidgetMusConnection receives an OnEmbed from mus with a mus::Window as its root and starts putting things on screen inside this window. BUG=551250 Committed: https://crrev.com/6c6da0233c011d29cc7c43221fb8f5482405dfb6 Cr-Commit-Position: refs/heads/master@{#361820}

Patch Set 1 #

Patch Set 2 : Removed params #

Patch Set 3 : Works but need to rename something #

Patch Set 4 : RenderWidgetMus => RenderWidgetMusConnection #

Total comments: 28

Patch Set 5 : Addressed Ben's comments #

Patch Set 6 : Updated a comment #

Total comments: 9

Patch Set 7 : Addressed Ben's comments #

Patch Set 8 : Added comment on RenderWidgetWindowTreeClientFactory lifetime #

Total comments: 1

Patch Set 9 : Moved MojoShellConnection methods to MojoShellConnectionImpl #

Patch Set 10 : Fixed comment #

Total comments: 2

Patch Set 11 : Added missing include guard #

Total comments: 2

Patch Set 12 : Remove unnecessary include #

Patch Set 13 : Don't create a RenderWidgetWindowTreeeClientFactory in tests #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+456 lines, -32 lines) Patch
M content/browser/BUILD.gn View 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M content/browser/DEPS View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/browser_main_loop.cc View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/mojo/mojo_shell_client_host.h View 1 2 3 4 5 6 2 chunks +6 lines, -4 lines 0 comments Download
M content/browser/mojo/mojo_shell_client_host.cc View 1 2 3 4 5 6 4 chunks +33 lines, -3 lines 0 comments Download
M content/browser/renderer_host/DEPS View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/renderer_host/render_process_host_impl.cc View 1 2 3 4 5 6 2 chunks +6 lines, -3 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_mus.h View 1 2 3 4 3 chunks +5 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_mus.cc View 1 2 3 4 3 chunks +26 lines, -0 lines 0 comments Download
M content/browser/web_contents/web_contents_impl.h View 1 chunk +0 lines, -2 lines 0 comments Download
M content/browser/web_contents/web_contents_impl.cc View 1 2 3 4 2 chunks +6 lines, -2 lines 0 comments Download
M content/browser/web_contents/web_contents_view_mus.h View 3 chunks +5 lines, -0 lines 0 comments Download
M content/browser/web_contents/web_contents_view_mus.cc View 4 chunks +11 lines, -1 line 0 comments Download
M content/child/child_thread_impl.cc View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M content/common/BUILD.gn View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M content/common/mojo/mojo_shell_connection_impl.h View 1 2 3 4 5 6 7 8 9 1 chunk +15 lines, -6 lines 0 comments Download
M content/common/mojo/mojo_shell_connection_impl.cc View 1 2 3 4 5 6 7 8 2 chunks +22 lines, -8 lines 0 comments Download
A content/common/render_widget_window_tree_client_factory.mojom View 1 2 3 4 1 chunk +13 lines, -0 lines 1 comment Download
M content/public/common/mojo_shell_connection.h View 1 2 5 6 7 8 9 10 11 2 chunks +1 line, -1 line 0 comments Download
M content/renderer/BUILD.gn View 1 2 3 4 2 chunks +10 lines, -0 lines 0 comments Download
M content/renderer/DEPS View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M content/renderer/render_thread_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +12 lines, -0 lines 0 comments Download
A content/renderer/render_widget_mus_connection.h View 1 2 3 4 1 chunk +46 lines, -0 lines 0 comments Download
A content/renderer/render_widget_mus_connection.cc View 1 2 3 1 chunk +88 lines, -0 lines 0 comments Download
A content/renderer/render_widget_window_tree_client_factory.h View 1 2 3 4 1 chunk +14 lines, -0 lines 0 comments Download
A content/renderer/render_widget_window_tree_client_factory.cc View 1 2 3 4 5 6 7 1 chunk +69 lines, -0 lines 0 comments Download
M content/renderer/renderer_main.cc View 1 2 3 4 2 chunks +8 lines, -0 lines 0 comments Download
M ui/aura/BUILD.gn View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
A ui/aura/mus/mus_util.h View 1 2 3 4 5 6 1 chunk +24 lines, -0 lines 0 comments Download
A ui/aura/mus/mus_util.cc View 1 2 3 4 1 chunk +21 lines, -0 lines 0 comments Download
M ui/views/mus/native_widget_mus.cc View 1 2 3 4 2 chunks +5 lines, -1 line 0 comments Download

Messages

Total messages: 52 (26 generated)
Fady Samuel
5 years ago (2015-11-25 03:18:05 UTC) #5
Ben Goodger (Google)
https://codereview.chromium.org/1476643002/diff/60001/content/browser/mojo/mojo_shell_client_host.cc File content/browser/mojo/mojo_shell_client_host.cc (right): https://codereview.chromium.org/1476643002/diff/60001/content/browser/mojo/mojo_shell_client_host.cc#newcode111 content/browser/mojo/mojo_shell_client_host.cc:111: SetMojoPlatformFile(render_process_host, client_file); Instead of structuring it this way, I'd ...
5 years ago (2015-11-25 04:07:28 UTC) #8
Fady Samuel
PTAL Ben! https://codereview.chromium.org/1476643002/diff/60001/content/browser/mojo/mojo_shell_client_host.cc File content/browser/mojo/mojo_shell_client_host.cc (right): https://codereview.chromium.org/1476643002/diff/60001/content/browser/mojo/mojo_shell_client_host.cc#newcode111 content/browser/mojo/mojo_shell_client_host.cc:111: SetMojoPlatformFile(render_process_host, client_file); On 2015/11/25 04:07:28, Ben Goodger ...
5 years ago (2015-11-25 17:45:53 UTC) #9
Ben Goodger (Google)
https://codereview.chromium.org/1476643002/diff/100001/content/browser/mojo/mojo_shell_client_host.h File content/browser/mojo/mojo_shell_client_host.h (right): https://codereview.chromium.org/1476643002/diff/100001/content/browser/mojo/mojo_shell_client_host.h#newcode30 content/browser/mojo/mojo_shell_client_host.h:30: void BindExternalMojoShellHandle(base::ProcessHandle process_handle, SendExternalShellHandleToChild() https://codereview.chromium.org/1476643002/diff/100001/content/public/browser/BUILD.gn File content/public/browser/BUILD.gn (right): https://codereview.chromium.org/1476643002/diff/100001/content/public/browser/BUILD.gn#newcode49 ...
5 years ago (2015-11-25 20:28:15 UTC) #12
Fady Samuel
PTAL Ben! Once you're happy with this I'll pass it to jam@ for OWNER approval. ...
5 years ago (2015-11-25 20:46:50 UTC) #13
Ben Goodger (Google)
lgtm https://codereview.chromium.org/1476643002/diff/100001/content/renderer/render_widget_window_tree_client_factory.cc File content/renderer/render_widget_window_tree_client_factory.cc (right): https://codereview.chromium.org/1476643002/diff/100001/content/renderer/render_widget_window_tree_client_factory.cc#newcode35 content/renderer/render_widget_window_tree_client_factory.cc:35: ~RenderWidgetWindowTreeClientFactoryImpl() override {} On 2015/11/25 20:46:50, Fady Samuel ...
5 years ago (2015-11-25 20:50:56 UTC) #14
Fady Samuel
On 2015/11/25 20:50:56, Ben Goodger (Google) wrote: > lgtm > > https://codereview.chromium.org/1476643002/diff/100001/content/renderer/render_widget_window_tree_client_factory.cc > File content/renderer/render_widget_window_tree_client_factory.cc ...
5 years ago (2015-11-25 20:56:13 UTC) #15
Fady Samuel
Hi John! The Chrome renderer can now talk to Mus! w00t! Please review!
5 years ago (2015-11-25 20:56:38 UTC) #17
jam
lgtm with comment https://codereview.chromium.org/1476643002/diff/50031/content/public/common/mojo_shell_connection.h File content/public/common/mojo_shell_connection.h (right): https://codereview.chromium.org/1476643002/diff/50031/content/public/common/mojo_shell_connection.h#newcode48 content/public/common/mojo_shell_connection.h:48: virtual void BindToCommandLinePlatformChannel() = 0; these ...
5 years ago (2015-11-25 21:26:15 UTC) #18
Fady Samuel
+palmer@ for mojom review.
5 years ago (2015-11-25 22:04:46 UTC) #20
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1476643002/170001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1476643002/170001
5 years ago (2015-11-25 23:15:56 UTC) #22
palmer
LGTM. 1 note about that static_cast, though. https://codereview.chromium.org/1476643002/diff/170001/content/browser/mojo/mojo_shell_client_host.cc File content/browser/mojo/mojo_shell_client_host.cc (right): https://codereview.chromium.org/1476643002/diff/170001/content/browser/mojo/mojo_shell_client_host.cc#newcode128 content/browser/mojo/mojo_shell_client_host.cc:128: InstanceShellHandle* client_file ...
5 years ago (2015-11-25 23:48:00 UTC) #23
Fady Samuel
CQ'ing now. https://codereview.chromium.org/1476643002/diff/170001/content/browser/mojo/mojo_shell_client_host.cc File content/browser/mojo/mojo_shell_client_host.cc (right): https://codereview.chromium.org/1476643002/diff/170001/content/browser/mojo/mojo_shell_client_host.cc#newcode128 content/browser/mojo/mojo_shell_client_host.cc:128: InstanceShellHandle* client_file = static_cast<InstanceShellHandle*>( On 2015/11/25 23:48:00, ...
5 years ago (2015-11-25 23:57:24 UTC) #24
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/146463)
5 years ago (2015-11-26 00:25:16 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1476643002/190001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1476643002/190001
5 years ago (2015-11-26 00:57:00 UTC) #29
jam
https://codereview.chromium.org/1476643002/diff/190001/content/public/common/mojo_shell_connection.h File content/public/common/mojo_shell_connection.h (right): https://codereview.chromium.org/1476643002/diff/190001/content/public/common/mojo_shell_connection.h#newcode9 content/public/common/mojo_shell_connection.h:9: #include "mojo/public/cpp/system/message_pipe.h" no need for this anymore.
5 years ago (2015-11-26 01:04:30 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1476643002/190001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1476643002/190001
5 years ago (2015-11-26 01:08:14 UTC) #33
Fady Samuel
CQ'ing. https://codereview.chromium.org/1476643002/diff/190001/content/public/common/mojo_shell_connection.h File content/public/common/mojo_shell_connection.h (right): https://codereview.chromium.org/1476643002/diff/190001/content/public/common/mojo_shell_connection.h#newcode9 content/public/common/mojo_shell_connection.h:9: #include "mojo/public/cpp/system/message_pipe.h" On 2015/11/26 01:04:30, jam wrote: > ...
5 years ago (2015-11-26 01:13:54 UTC) #34
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1476643002/210001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1476643002/210001
5 years ago (2015-11-26 01:15:24 UTC) #37
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/146519)
5 years ago (2015-11-26 02:18:14 UTC) #39
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1476643002/230001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1476643002/230001
5 years ago (2015-11-26 02:25:09 UTC) #42
commit-bot: I haz the power
Try jobs failed on following builders: ios_dbg_simulator_ninja on tryserver.chromium.mac (JOB_TIMED_OUT, no build URL) ios_rel_device_ninja on ...
5 years ago (2015-11-26 04:27:38 UTC) #44
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1476643002/230001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1476643002/230001
5 years ago (2015-11-26 04:29:08 UTC) #46
commit-bot: I haz the power
Committed patchset #13 (id:230001)
5 years ago (2015-11-26 05:13:53 UTC) #48
commit-bot: I haz the power
Patchset 13 (id:??) landed as https://crrev.com/6c6da0233c011d29cc7c43221fb8f5482405dfb6 Cr-Commit-Position: refs/heads/master@{#361820}
5 years ago (2015-11-26 05:14:33 UTC) #50
jochen (gone - plz use gerrit)
5 years ago (2015-12-01 10:33:13 UTC) #52
Message was sent while issue was closed.
https://codereview.chromium.org/1476643002/diff/230001/content/common/render_...
File content/common/render_widget_window_tree_client_factory.mojom (right):

https://codereview.chromium.org/1476643002/diff/230001/content/common/render_...
content/common/render_widget_window_tree_client_factory.mojom:7: import
"components/mus/public/interfaces/window_tree.mojom";
hum, the gn target of this file does not depend on the mus/public/interfaces,
nor on ui/mojo/imi (which the public interfaces depend on)

Powered by Google App Engine
This is Rietveld 408576698