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

Issue 2218843003: mustash chrome: Change how mus connection is set up in chrome. (Closed)

Created:
4 years, 4 months ago by sadrul
Modified:
4 years, 4 months ago
CC:
chromium-reviews, tfarina, darin-cc_chromium.org, Ben Goodger (Google)
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

mustash chrome: Change how mus connection is set up in chrome. Set up the mus connection (through WindowManagerConnection) in chrome a little earlier than before, so that its mus gpu service can be set up and injected into content cleanly (see more in crrev.com/2197613003). To make it possible without introducing additional API in content, move the WindowManagerConnection ownership into ChromeContentBrowserClient from ChromeBrowserMainExtraPartsViews. BUG=none

Patch Set 1 #

Patch Set 2 : . #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+33 lines, -20 lines) Patch
M chrome/browser/chrome_content_browser_client.h View 2 chunks +8 lines, -0 lines 0 comments Download
M chrome/browser/chrome_content_browser_client.cc View 1 3 chunks +24 lines, -0 lines 3 comments Download
M chrome/browser/ui/views/chrome_browser_main_extra_parts_views.h View 2 chunks +0 lines, -2 lines 0 comments Download
M chrome/browser/ui/views/chrome_browser_main_extra_parts_views.cc View 1 chunk +0 lines, -4 lines 0 comments Download
M content/browser/browser_main_loop.cc View 2 chunks +1 line, -14 lines 0 comments Download

Messages

Total messages: 18 (9 generated)
sadrul
Following up from our offline chat about https://codereview.chromium.org/2215353004/, this is the alternate solution I had ...
4 years, 4 months ago (2016-08-05 22:58:30 UTC) #7
Ben Goodger (Google)
https://codereview.chromium.org/2218843003/diff/2/chrome/browser/chrome_content_browser_client.cc File chrome/browser/chrome_content_browser_client.cc (right): https://codereview.chromium.org/2218843003/diff/2/chrome/browser/chrome_content_browser_client.cc#newcode2871 chrome/browser/chrome_content_browser_client.cc:2871: #if defined(USE_AURA) this seems like a really arbitrary place ...
4 years, 4 months ago (2016-08-05 23:01:21 UTC) #9
jam
https://codereview.chromium.org/2218843003/diff/2/chrome/browser/chrome_content_browser_client.cc File chrome/browser/chrome_content_browser_client.cc (right): https://codereview.chromium.org/2218843003/diff/2/chrome/browser/chrome_content_browser_client.cc#newcode2871 chrome/browser/chrome_content_browser_client.cc:2871: #if defined(USE_AURA) On 2016/08/05 23:01:21, Ben Goodger (Google) wrote: ...
4 years, 4 months ago (2016-08-05 23:07:07 UTC) #10
sadrul
https://codereview.chromium.org/2218843003/diff/2/chrome/browser/chrome_content_browser_client.cc File chrome/browser/chrome_content_browser_client.cc (right): https://codereview.chromium.org/2218843003/diff/2/chrome/browser/chrome_content_browser_client.cc#newcode2871 chrome/browser/chrome_content_browser_client.cc:2871: #if defined(USE_AURA) On 2016/08/05 23:07:07, jam wrote: > On ...
4 years, 4 months ago (2016-08-05 23:24:39 UTC) #13
jam
On 2016/08/05 23:24:39, sadrul wrote: > https://codereview.chromium.org/2218843003/diff/2/chrome/browser/chrome_content_browser_client.cc > File chrome/browser/chrome_content_browser_client.cc (right): > > https://codereview.chromium.org/2218843003/diff/2/chrome/browser/chrome_content_browser_client.cc#newcode2871 > ...
4 years, 4 months ago (2016-08-08 16:53:58 UTC) #14
sadrul
On 2016/08/08 16:53:58, jam wrote: > On 2016/08/05 23:24:39, sadrul wrote: > > > https://codereview.chromium.org/2218843003/diff/2/chrome/browser/chrome_content_browser_client.cc ...
4 years, 4 months ago (2016-08-08 17:11:20 UTC) #15
jam
On 2016/08/08 17:11:20, sadrul wrote: > On 2016/08/08 16:53:58, jam wrote: > > On 2016/08/05 ...
4 years, 4 months ago (2016-08-09 00:24:14 UTC) #16
sadrul
On 2016/08/09 00:24:14, jam wrote: > On 2016/08/08 17:11:20, sadrul wrote: > > On 2016/08/08 ...
4 years, 4 months ago (2016-08-09 00:42:31 UTC) #17
jam
4 years, 4 months ago (2016-08-09 01:15:07 UTC) #18
On 2016/08/09 00:42:31, sadrul wrote:
> On 2016/08/09 00:24:14, jam wrote:
> > On 2016/08/08 17:11:20, sadrul wrote:
> > > On 2016/08/08 16:53:58, jam wrote:
> > > > On 2016/08/05 23:24:39, sadrul wrote:
> > > > >
> > > >
> > >
> >
>
https://codereview.chromium.org/2218843003/diff/2/chrome/browser/chrome_conte...
> > > > > File chrome/browser/chrome_content_browser_client.cc (right):
> > > > > 
> > > > >
> > > >
> > >
> >
>
https://codereview.chromium.org/2218843003/diff/2/chrome/browser/chrome_conte...
> > > > > chrome/browser/chrome_content_browser_client.cc:2871: #if
> > defined(USE_AURA)
> > > > > On 2016/08/05 23:07:07, jam wrote:
> > > > > > On 2016/08/05 23:01:21, Ben Goodger (Google) wrote:
> > > > > > > this seems like a really arbitrary place to do this
initialization.
> > > > > > > 
> > > > > > > what was the objection to having the specific method?
> > > > > > 
> > > > > > I was asking Sadrul if there are ways of doing this without adding
> extra
> > > > > > embedder callbacks from content. Given that we're trying to reduce
> > > content,
> > > > > > having more intertwining seemed going in the other direction.
> > > > > > 
> > > > > > btw we could keep this code in chrome_browser_main_extra_parts_views
> > still
> > > > > right
> > > > > > Sadurl? Perhaps just add RegisterOutOfProcessMojoApplications to
> > > > > > ChromeBrowserMainExtraParts
> > > > > 
> > > > > ChromeContentBrowserClient does create
ChromeBrowserMainExtraPartsViews,
> > but
> > > > it
> > > > > passes ownership of that to content::BrowserMainLoop, and doesn't
retain
> > any
> > > > > reference to it. Keeping the WindowManagerConnection in the
> > *ExtraPartsView,
> > > > and
> > > > > triggering RegisterOutOfProcessMojoApplications() on the
*MainExtraParts
> > > from
> > > > > here would be possible, but would not be very clean.
> > > > (ChromeContentBrowserClient
> > > > > here would need to retain a raw pointer to the ChromeBrowserMainParts
it
> > > > creates
> > > > > in CreateBrowserMainParts() above, expose the *ExtraParts from
> > > > > ChromeBrowserMainParts and trigger the callback on them here (or add
to
> > the
> > > > > ChromeBrowserMainParts API to trigger the callback on the extra
parts).
> > This
> > > > > also makes the assumption (and a reasonably safe one, I suppose) that
> the
> > > > > ChromeBrowserMainParts object it created is still alive when we reach
> > here.
> > > > 
> > > > i see, ok nvm
> > > 
> > > ok cool, thanks. I will go ahead and put
> > > https://codereview.chromium.org/2215353004/ in the CQ.
> > 
> > oh what I meant is that this patch is good and don't need to change per my
> > comment above.
> 
> Oh shoot, sorry. I misunderstood.
> 
> > 
> > I think this is preferable to 2215353004 since it doesn't introduce new
> embedder
> > APIs. Why do you prefer the other one?
> 
> I prefer the other one because, although it does add to the embedder API, it
> makes it more obvious that that particular step needs to happen after the
shell
> connection has been established. Doing this in
> RegisterOutOfProcessMojoApplications() feels a bit random in comparison. For
> example, we can't set things up in RegisterInProcessMojoApplications(), since
> the shell connection has actually not been set up when that is called, but
it's
> not obvious that that is the case without going in and looking at the actual
> code for MojoShellContext. (Similarly, we could just as well have set up the
mus
> connection from the RegisterUnsandboxedOutOfProcessMojoApplications()
override).

thanks for the explanation, that seems like a good reason to add the new api.
> 
> I don't feel too strongly about this, either way. I can revert the landed CL
and
> move forward with this one instead. I guess that would be your advice?

Powered by Google App Engine
This is Rietveld 408576698