|
|
Descriptionmus: Use a barebone mus client-lib in chrome-renderer.
Notable changes:
. Add RendererWindowTreeClient that implements ui.mojom.WindowTreeClient
interface for chrome-renderer. It currently supports the most basic
functionalities. For example, it does not receive events (the events
instead are routed through chrome-browser), it does not support more
than one window, window state changes (e.g. bounds, visibility etc.)
are ignored (the corresponding messages from chrome-browser are used
instead) etc. Over time however, this implementation will grow.
. When chrome-renderer is running as a mus-client, it immediately creates
a RendererWindowTreeClient instance for a RenderWidget, instead of
waiting for a creation request from chrome-browser.
. Remove RenderWidgetMusConnection, since it's no longer needed.
BUG=672913
Review-Url: https://codereview.chromium.org/2648213002
Cr-Commit-Position: refs/heads/master@{#446257}
Committed: https://chromium.googlesource.com/chromium/src/+/602ce136fcac0b2a338a5708f857cf12f8a77467
Patch Set 1 #Patch Set 2 : . #Patch Set 3 : . #Patch Set 4 : . #Patch Set 5 : . #Patch Set 6 : . #
Total comments: 8
Patch Set 7 : . #
Messages
Total messages: 55 (31 generated)
The CQ bit was checked by sadrul@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: mac_chromium_compile_dbg_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_comp...)
The CQ bit was checked by sadrul@chromium.org to run a CQ dry run
The CQ bit was checked by sadrul@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: cast_shell_android on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/cast_shell_a...) chromeos_amd64-generic_chromium_compile_only_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromeos_amd64-...)
The CQ bit was checked by sadrul@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Description was changed from ========== [exp] mus: Use a barebone mus client-lib in chrome-renderer. BUG=672913 ========== to ========== mus: Use a barebone mus client-lib in chrome-renderer. Notable changes: . Add RendererWindowTreeClient that implements ui.mojom.WindowTreeClient interface for chrome-renderer. It currently supports the most basic functionalities. For example, it does not receive events (the events instead are routed through chrome-browser), it does not support more than one window, window state changes (e.g. bounds, visibility etc.) are ignored (the corresponding messages from chrome-browser are used instead) etc. Over time however, this implementation will grow. . When chrome-renderer is running as a mus-client, it immediately creates a RendererWindowTreeClient instance for a RenderWidget, instead of waiting for a creation request from chrome-browser. . Remove RenderWidgetMusConnection, since it's no longer needed. BUG=672913 ==========
sadrul@chromium.org changed reviewers: + fsamuel@chromium.org, sky@chromium.org
https://codereview.chromium.org/2648213002/diff/100001/content/renderer/mus/r... File content/renderer/mus/renderer_window_tree_client.cc (right): https://codereview.chromium.org/2648213002/diff/100001/content/renderer/mus/r... content/renderer/mus/renderer_window_tree_client.cc:127: NOTIMPLEMENTED(); We would get to here when an OOPIF submits a CompositorFrame on resize. The parent should embed that SurfaceInfo. Basically this should make its way to ChildFrameCompositingHelper. Speaking of which, ChildFrameCompositingHelper should probably take in a SurfaceReferenceFactory at construction.
This LGTM though. There's a bunch of work to do for OOPIF but we can deal with that when we get to it.
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
Nice! https://codereview.chromium.org/2648213002/diff/100001/content/renderer/mus/r... File content/renderer/mus/renderer_window_tree_client.h (right): https://codereview.chromium.org/2648213002/diff/100001/content/renderer/mus/r... content/renderer/mus/renderer_window_tree_client.h:28: class RendererWindowTreeClient : public ui::mojom::WindowTreeClient { Add description. Also, document what threading assumptions are. https://codereview.chromium.org/2648213002/diff/100001/content/renderer/mus/r... content/renderer/mus/renderer_window_tree_client.h:77: const std::vector<gfx::Rect>& new_additional_client_areas) override {} Style guide says not to inline virtual overriden functions. https://codereview.chromium.org/2648213002/diff/100001/content/renderer/mus/r... content/renderer/mus/renderer_window_tree_client.h:140: int routing_id_; const
The CQ bit was checked by sadrul@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
https://codereview.chromium.org/2648213002/diff/100001/content/renderer/mus/r... File content/renderer/mus/renderer_window_tree_client.cc (right): https://codereview.chromium.org/2648213002/diff/100001/content/renderer/mus/r... content/renderer/mus/renderer_window_tree_client.cc:127: NOTIMPLEMENTED(); On 2017/01/24 02:04:38, Fady Samuel wrote: > We would get to here when an OOPIF submits a CompositorFrame on resize. The > parent should embed that SurfaceInfo. Basically this should make its way to > ChildFrameCompositingHelper. Speaking of which, ChildFrameCompositingHelper > should probably take in a SurfaceReferenceFactory at construction. Acknowledged. https://codereview.chromium.org/2648213002/diff/100001/content/renderer/mus/r... File content/renderer/mus/renderer_window_tree_client.h (right): https://codereview.chromium.org/2648213002/diff/100001/content/renderer/mus/r... content/renderer/mus/renderer_window_tree_client.h:28: class RendererWindowTreeClient : public ui::mojom::WindowTreeClient { On 2017/01/24 17:39:31, sky wrote: > Add description. Also, document what threading assumptions are. Done. https://codereview.chromium.org/2648213002/diff/100001/content/renderer/mus/r... content/renderer/mus/renderer_window_tree_client.h:77: const std::vector<gfx::Rect>& new_additional_client_areas) override {} On 2017/01/24 17:39:31, sky wrote: > Style guide says not to inline virtual overriden functions. Done. https://codereview.chromium.org/2648213002/diff/100001/content/renderer/mus/r... content/renderer/mus/renderer_window_tree_client.h:140: int routing_id_; On 2017/01/24 17:39:31, sky wrote: > const Done.
LGTM
sadrul@chromium.org changed reviewers: + creis@chromium.org
+creis@ as content owner for render_widget.cc and render_thread_impl.cc changes.
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
Sanity check: the new RendererWindowTreeClient class will work with OOPIFs, where the RenderWidget may be for a subframe (or an A-B-A case with multiple widgets for A in the same process), right? If so, sounds good. Other than that, render_widget.cc and render_thread_impl.cc LGTM.
On 2017/01/24 21:21:45, Charlie Reis wrote: > Sanity check: the new RendererWindowTreeClient class will work with OOPIFs, > where the RenderWidget may be for a subframe (or an A-B-A case with multiple > widgets for A in the same process), right? If so, sounds good. The new RendererWindowTreeClient class is expected to handle the OOPIF cases too, yes. But those are yet unimplemented (see TODO in OnEmbeddedAppDisconnected(), OnWindowDeleted() etc., for example). Although, for RenderWidget that host oopif, I think we would not want a RendererWindowTreeClient() to be created (i.e. it should be created only for the 'root' frame in that process). In that case, looks like I should move the creation of RendererWindowTreeClient into RenderWidget::Init() so that it's not created when |for_oopif_| is set? > > Other than that, render_widget.cc and render_thread_impl.cc LGTM.
On 2017/01/24 21:41:17, sadrul wrote: > On 2017/01/24 21:21:45, Charlie Reis wrote: > > Sanity check: the new RendererWindowTreeClient class will work with OOPIFs, > > where the RenderWidget may be for a subframe (or an A-B-A case with multiple > > widgets for A in the same process), right? If so, sounds good. > > The new RendererWindowTreeClient class is expected to handle the OOPIF cases > too, yes. But those are yet unimplemented (see TODO in > OnEmbeddedAppDisconnected(), OnWindowDeleted() etc., for example). Although, for > RenderWidget that host oopif, I think we would not want a > RendererWindowTreeClient() to be created (i.e. it should be created only for the > 'root' frame in that process). In that case, looks like I should move the > creation of RendererWindowTreeClient into RenderWidget::Init() so that it's not > created when |for_oopif_| is set? Just to be super-clear, in the A-B-A case: . In A, there are three RenderWidget objects, with |for_oopif_| set to true for one, and to false for two. . In B, there are two RenderWidget objects, with |for_oopif_| set to true for one, and to false for the other. Is that correct? If so, in A, for the two RenderWidgets with |for_oopif_| set to false, is it possible to tell which is the 'root' in the hierarchy?
creis@chromium.org changed reviewers: + dcheng@chromium.org, kenrb@chromium.org
[+dcheng, kenrb] On 2017/01/24 21:41:17, sadrul wrote: > On 2017/01/24 21:21:45, Charlie Reis wrote: > > Sanity check: the new RendererWindowTreeClient class will work with OOPIFs, > > where the RenderWidget may be for a subframe (or an A-B-A case with multiple > > widgets for A in the same process), right? If so, sounds good. > > The new RendererWindowTreeClient class is expected to handle the OOPIF cases > too, yes. But those are yet unimplemented (see TODO in > OnEmbeddedAppDisconnected(), OnWindowDeleted() etc., for example). Although, for > RenderWidget that host oopif, I think we would not want a > RendererWindowTreeClient() to be created (i.e. it should be created only for the > 'root' frame in that process). In that case, looks like I should move the > creation of RendererWindowTreeClient into RenderWidget::Init() so that it's not > created when |for_oopif_| is set? Hmm, your reply raises more questions than answers. :) You mention that RendererWindowTreeClient is expected to handle OOPIF cases, but then you say that we shouldn't create a RendererWindowTreeClient for OOPIF RenderWidgets, which I don't understand. To clarify, assume we have a frame A1, with subframe B1, with nested subframe A2. A1 and A2 are in process A, and B1 is in process B. Process A has a RenderFrame and RenderWidget for A1, a RenderFrameProxy for B1 (no RenderWidget), and a RenderFrame and RenderWidget for A2. Conversely, process B has a RenderFrameProxy for A1, a RenderFrame and RenderWidget for B1, and a RenderFrameProxy for A2. Previously, I assumed you wanted each of those 3 RenderWidgets to each have its own RendererWindowTreeClient, but now I'm unclear. Should there be a RendererWindowTreeClient for B1? Should there be one for A2?
[+site-isolation-reviews]
On 2017/01/24 21:47:31, sadrul wrote: > On 2017/01/24 21:41:17, sadrul wrote: > > On 2017/01/24 21:21:45, Charlie Reis wrote: > > > Sanity check: the new RendererWindowTreeClient class will work with OOPIFs, > > > where the RenderWidget may be for a subframe (or an A-B-A case with multiple > > > widgets for A in the same process), right? If so, sounds good. > > > > The new RendererWindowTreeClient class is expected to handle the OOPIF cases > > too, yes. But those are yet unimplemented (see TODO in > > OnEmbeddedAppDisconnected(), OnWindowDeleted() etc., for example). Although, > for > > RenderWidget that host oopif, I think we would not want a > > RendererWindowTreeClient() to be created (i.e. it should be created only for > the > > 'root' frame in that process). In that case, looks like I should move the > > creation of RendererWindowTreeClient into RenderWidget::Init() so that it's > not > > created when |for_oopif_| is set? > > Just to be super-clear, in the A-B-A case: > > . In A, there are three RenderWidget objects, with |for_oopif_| set to true for > one, and to false for two. > . In B, there are two RenderWidget objects, with |for_oopif_| set to true for > one, and to false for the other. > > Is that correct? If so, in A, for the two RenderWidgets with |for_oopif_| set to > false, is it possible to tell which is the 'root' in the hierarchy? Ah, our replies crossed paths. No, A has 2 RenderWidgets and B has 1. for_oopif_ is true for B1 and A2, and false for A1.
On 2017/01/24 21:55:59, Charlie Reis wrote: > On 2017/01/24 21:47:31, sadrul wrote: > > On 2017/01/24 21:41:17, sadrul wrote: > > > On 2017/01/24 21:21:45, Charlie Reis wrote: > > > > Sanity check: the new RendererWindowTreeClient class will work with > OOPIFs, > > > > where the RenderWidget may be for a subframe (or an A-B-A case with > multiple > > > > widgets for A in the same process), right? If so, sounds good. > > > > > > The new RendererWindowTreeClient class is expected to handle the OOPIF cases > > > too, yes. But those are yet unimplemented (see TODO in > > > OnEmbeddedAppDisconnected(), OnWindowDeleted() etc., for example). Although, > > for > > > RenderWidget that host oopif, I think we would not want a > > > RendererWindowTreeClient() to be created (i.e. it should be created only for > > the > > > 'root' frame in that process). In that case, looks like I should move the > > > creation of RendererWindowTreeClient into RenderWidget::Init() so that it's > > not > > > created when |for_oopif_| is set? > > > > Just to be super-clear, in the A-B-A case: > > > > . In A, there are three RenderWidget objects, with |for_oopif_| set to true > for > > one, and to false for two. > > . In B, there are two RenderWidget objects, with |for_oopif_| set to true for > > one, and to false for the other. > > > > Is that correct? If so, in A, for the two RenderWidgets with |for_oopif_| set > to > > false, is it possible to tell which is the 'root' in the hierarchy? > > Ah, our replies crossed paths. No, A has 2 RenderWidgets and B has 1. > for_oopif_ is true for B1 and A2, and false for A1. OK, then yes, I think the current CL is OK, i.e. we should be creating a RendererWindowTreeClient per RenderWidget (regardless of whether |for_oopif_| is set or not). Thanks for the explanation! Do you have any other concerns? Or should I put this in the CQ?
On 2017/01/25 01:09:33, sadrul wrote: > On 2017/01/24 21:55:59, Charlie Reis wrote: > > On 2017/01/24 21:47:31, sadrul wrote: > > > On 2017/01/24 21:41:17, sadrul wrote: > > > > On 2017/01/24 21:21:45, Charlie Reis wrote: > > > > > Sanity check: the new RendererWindowTreeClient class will work with > > OOPIFs, > > > > > where the RenderWidget may be for a subframe (or an A-B-A case with > > multiple > > > > > widgets for A in the same process), right? If so, sounds good. > > > > > > > > The new RendererWindowTreeClient class is expected to handle the OOPIF > cases > > > > too, yes. But those are yet unimplemented (see TODO in > > > > OnEmbeddedAppDisconnected(), OnWindowDeleted() etc., for example). > Although, > > > for > > > > RenderWidget that host oopif, I think we would not want a > > > > RendererWindowTreeClient() to be created (i.e. it should be created only > for > > > the > > > > 'root' frame in that process). In that case, looks like I should move the > > > > creation of RendererWindowTreeClient into RenderWidget::Init() so that > it's > > > not > > > > created when |for_oopif_| is set? > > > > > > Just to be super-clear, in the A-B-A case: > > > > > > . In A, there are three RenderWidget objects, with |for_oopif_| set to true > > for > > > one, and to false for two. > > > . In B, there are two RenderWidget objects, with |for_oopif_| set to true > for > > > one, and to false for the other. > > > > > > Is that correct? If so, in A, for the two RenderWidgets with |for_oopif_| > set > > to > > > false, is it possible to tell which is the 'root' in the hierarchy? > > > > Ah, our replies crossed paths. No, A has 2 RenderWidgets and B has 1. > > for_oopif_ is true for B1 and A2, and false for A1. > > OK, then yes, I think the current CL is OK, i.e. we should be creating a > RendererWindowTreeClient per RenderWidget (regardless of whether |for_oopif_| is > set or not). Thanks for the explanation! > > Do you have any other concerns? Or should I put this in the CQ? Great-- LGTM then. (Sorry for the delayed reply!)
The CQ bit was checked by sadrul@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from fsamuel@chromium.org Link to the patchset: https://codereview.chromium.org/2648213002/#ps120001 (title: ".")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
On 2017/01/25 20:54:14, Charlie Reis wrote: > On 2017/01/25 01:09:33, sadrul wrote: > > On 2017/01/24 21:55:59, Charlie Reis wrote: > > > On 2017/01/24 21:47:31, sadrul wrote: > > > > On 2017/01/24 21:41:17, sadrul wrote: > > > > > On 2017/01/24 21:21:45, Charlie Reis wrote: > > > > > > Sanity check: the new RendererWindowTreeClient class will work with > > > OOPIFs, > > > > > > where the RenderWidget may be for a subframe (or an A-B-A case with > > > multiple > > > > > > widgets for A in the same process), right? If so, sounds good. > > > > > > > > > > The new RendererWindowTreeClient class is expected to handle the OOPIF > > cases > > > > > too, yes. But those are yet unimplemented (see TODO in > > > > > OnEmbeddedAppDisconnected(), OnWindowDeleted() etc., for example). > > Although, > > > > for > > > > > RenderWidget that host oopif, I think we would not want a > > > > > RendererWindowTreeClient() to be created (i.e. it should be created only > > for > > > > the > > > > > 'root' frame in that process). In that case, looks like I should move > the > > > > > creation of RendererWindowTreeClient into RenderWidget::Init() so that > > it's > > > > not > > > > > created when |for_oopif_| is set? > > > > > > > > Just to be super-clear, in the A-B-A case: > > > > > > > > . In A, there are three RenderWidget objects, with |for_oopif_| set to > true > > > for > > > > one, and to false for two. > > > > . In B, there are two RenderWidget objects, with |for_oopif_| set to true > > for > > > > one, and to false for the other. > > > > > > > > Is that correct? If so, in A, for the two RenderWidgets with |for_oopif_| > > set > > > to > > > > false, is it possible to tell which is the 'root' in the hierarchy? > > > > > > Ah, our replies crossed paths. No, A has 2 RenderWidgets and B has 1. > > > for_oopif_ is true for B1 and A2, and false for A1. > > > > OK, then yes, I think the current CL is OK, i.e. we should be creating a > > RendererWindowTreeClient per RenderWidget (regardless of whether |for_oopif_| > is > > set or not). Thanks for the explanation! > > > > Do you have any other concerns? Or should I put this in the CQ? > > Great-- LGTM then. (Sorry for the delayed reply!) (Not at all! Thank you for the quick review!)
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: linux_android_rel_ng on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_androi...)
The CQ bit was checked by sadrul@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presub...)
The CQ bit was checked by sadrul@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: linux_android_rel_ng on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_androi...)
The CQ bit was checked by sadrul@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch. Bot data: {"patchset_id": 120001, "attempt_start_ts": 1485410121775740, "parent_rev": "271891581a5ffa67adb2abb15c856cd15b5a0e6c", "commit_rev": "602ce136fcac0b2a338a5708f857cf12f8a77467"}
Message was sent while issue was closed.
Description was changed from ========== mus: Use a barebone mus client-lib in chrome-renderer. Notable changes: . Add RendererWindowTreeClient that implements ui.mojom.WindowTreeClient interface for chrome-renderer. It currently supports the most basic functionalities. For example, it does not receive events (the events instead are routed through chrome-browser), it does not support more than one window, window state changes (e.g. bounds, visibility etc.) are ignored (the corresponding messages from chrome-browser are used instead) etc. Over time however, this implementation will grow. . When chrome-renderer is running as a mus-client, it immediately creates a RendererWindowTreeClient instance for a RenderWidget, instead of waiting for a creation request from chrome-browser. . Remove RenderWidgetMusConnection, since it's no longer needed. BUG=672913 ========== to ========== mus: Use a barebone mus client-lib in chrome-renderer. Notable changes: . Add RendererWindowTreeClient that implements ui.mojom.WindowTreeClient interface for chrome-renderer. It currently supports the most basic functionalities. For example, it does not receive events (the events instead are routed through chrome-browser), it does not support more than one window, window state changes (e.g. bounds, visibility etc.) are ignored (the corresponding messages from chrome-browser are used instead) etc. Over time however, this implementation will grow. . When chrome-renderer is running as a mus-client, it immediately creates a RendererWindowTreeClient instance for a RenderWidget, instead of waiting for a creation request from chrome-browser. . Remove RenderWidgetMusConnection, since it's no longer needed. BUG=672913 Review-Url: https://codereview.chromium.org/2648213002 Cr-Commit-Position: refs/heads/master@{#446257} Committed: https://chromium.googlesource.com/chromium/src/+/602ce136fcac0b2a338a5708f857... ==========
Message was sent while issue was closed.
Committed patchset #7 (id:120001) as https://chromium.googlesource.com/chromium/src/+/602ce136fcac0b2a338a5708f857... |