Condition the use of ChromeBrowserMainExtraPartsViewsLinux to !use_ozone
In order to bring up a Chrome/Chromium Ozone/Wayland build,
it is needed to opt out the instantiation/inclusion of
chrome_browser_main_extra_parts_views_linux.cc/h in Ozone builds.
It should still possible to opt-in the use of CBMEPVL for Ozone builds
in the future, but it would be safer to condition it to an extra GN variable,
where one could explicitly specify that the Gtk wayland backend is to be used.
E.g.:
if (!use_ozone || use_gtk_wayland_backend) {
sources += [
"views/chrome_browser_main_extra_parts_views_linux.cc",
"views/chrome_browser_main_extra_parts_views_linux.h"
]
} else # regular ozone case {
sources += [
"views/chrome_browser_main_extra_parts_views.cc",
"views/chrome_browser_main_extra_parts_views.h"
]
}
CL also moves the PreProfileInit override from CBMEPVL to CBMEPV,
if-def'ing it out for CHROMEOS, in order to keep the behavior to
desktop linux builds (x11/ozone).
BUG=295089
Committed: https://crrev.com/da97a9ff8dbe3c463ff7d64fd765483401e2feb2
Cr-Commit-Position: refs/heads/master@{#429391}

Description was changed from
==========
Condition the use of ChromeBrowserMainExtraPartsViewsLinux to !use_ozone
In order to bring up a Chrome/Chromium Ozone/Wayland build,
it is needed to opt out the instantiation/inclusion of
chrome_browser_main_extra_parts_views_linux.cc/h in ozone builds.
It is still possible to optionally opt-in it back in the future,
but it would be safer to condition it to an extra GN variable, where
one could explicitly speficy that the Gtk wayland backend is to be used.
E.g.:
if (!use_ozone || use_gtk_wayland_backend) {
sources += [
"views/chrome_browser_main_extra_parts_views_linux.cc",
"views/chrome_browser_main_extra_parts_views_linux.h"
]
} else # regular ozone case {
sources += [
"views/chrome_browser_main_extra_parts_views.cc",
"views/chrome_browser_main_extra_parts_views.h"
]
}
BUG=295089
==========
to
==========
Condition the use of ChromeBrowserMainExtraPartsViewsLinux to !use_ozone
In order to bring up a Chrome/Chromium Ozone/Wayland build,
it is needed to opt out the instantiation/inclusion of
chrome_browser_main_extra_parts_views_linux.cc/h in ozone builds.
It is still possible to optionally opt-in it back in the future,
but it would be safer to condition it to an extra GN variable, where
one could explicitly speficy that the Gtk wayland backend is to be used.
E.g.:
if (!use_ozone || use_gtk_wayland_backend) {
sources += [
"views/chrome_browser_main_extra_parts_views_linux.cc",
"views/chrome_browser_main_extra_parts_views_linux.h"
]
} else # regular ozone case {
sources += [
"views/chrome_browser_main_extra_parts_views.cc",
"views/chrome_browser_main_extra_parts_views.h"
]
}
BUG=295089
==========

I think we still want CBMEPVL for ozone builds. There some important stuff in
there, like a check that the user is not running as root.
Maybe a better approach would be to surround the X11DesktopHandler stuff with
#if defined(USE_X11).
And for now, surround the gtk stuff with #if !defined(USE_OZONE).

On 2016/11/01 16:48:14, Tom Anderson wrote:
> I think we still want CBMEPVL for ozone builds. There some important stuff in
> there, like a check that the user is not running as root.
>
> Maybe a better approach would be to surround the X11DesktopHandler stuff with
> #if defined(USE_X11).
> And for now, surround the gtk stuff with #if !defined(USE_OZONE).
Done.

Description was changed from
==========
Condition the use of ChromeBrowserMainExtraPartsViewsLinux to !use_ozone
In order to bring up a Chrome/Chromium Ozone/Wayland build,
it is needed to opt out the instantiation/inclusion of
chrome_browser_main_extra_parts_views_linux.cc/h in ozone builds.
It is still possible to optionally opt-in it back in the future,
but it would be safer to condition it to an extra GN variable, where
one could explicitly speficy that the Gtk wayland backend is to be used.
E.g.:
if (!use_ozone || use_gtk_wayland_backend) {
sources += [
"views/chrome_browser_main_extra_parts_views_linux.cc",
"views/chrome_browser_main_extra_parts_views_linux.h"
]
} else # regular ozone case {
sources += [
"views/chrome_browser_main_extra_parts_views.cc",
"views/chrome_browser_main_extra_parts_views.h"
]
}
BUG=295089
==========
to
==========
Guard the Gtk+ entry points within ChromeBrowserMainExtraPartsViewsLinux with
!use_ozone
In order to bring up a Chrome/Chromium Ozone/Wayland build,
it is needed to opt out the instantiation/use of
views::LinuxUI with ::BuildGtk2UI in ozone builds.
It is still possible to optionally opt-in it back in the future,
but it would be safer to condition it to an extra GN variable, where
one could explicitly speficy that the Gtk wayland backend is to be used.
E.g.:
#if !defined(USE_OZONE) || defined(USE_GTK_WAYLAND_BACKEND)
views::LinuxUI* gtk2_ui = BuildGtk2UI();
..
#endif
BUG=295089
==========

https://codereview.chromium.org/2462423002/diff/20001/chrome/browser/ui/views...
File chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.cc
(right):
https://codereview.chromium.org/2462423002/diff/20001/chrome/browser/ui/views...
chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.cc:35: #if
defined(USE_X11)
On 2016/11/01 18:10:07, Tom Anderson wrote:
> nit: Please move the gtk_ui.h include and the x11_desktop_handler.h include
> below all of the normal includes
Done.
https://codereview.chromium.org/2462423002/diff/20001/chrome/browser/ui/views...
chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.cc:79: //
X11DesktopHandler is destructed at this point, so we don't need to remove
On 2016/11/01 18:10:07, Tom Anderson wrote:
> nit: Surround this comment and DCHECK with #if defined(USE_X11)
Done.
https://codereview.chromium.org/2462423002/diff/20001/chrome/browser/ui/views...
chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.cc:101: //
Intentionally do not call the parent class' PreCreateThreads
On 2016/11/01 18:10:06, Tom Anderson wrote:
> Add the check for !defined(USE_OZONE) in
> ChromeBrowserMainExtraPartsViews::PreCreateThreads instead, and
unconditionally
> call ChromeBrowserMainExtraPartsViews::PreCreateThreads from here.
Done.
https://codereview.chromium.org/2462423002/diff/20001/chrome/browser/ui/views...
chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.cc:142: void
ChromeBrowserMainExtraPartsViewsLinux::OnWorkspaceChanged(
On 2016/11/01 18:10:06, Tom Anderson wrote:
> I'm surprised this doesn't need to be surrounded with #if defined(USE_X11) as
> well, since OnWorkspaceChanged is an override from X11DesktopHandlerObserver.
>
> I guess the "right" thing to do would be to move
x11_desktop_handler_observer.*
> into the use_x11 portion of BUILD.gn and add the USE_X11 checks here
I believe the reason it "works" is because X11DesktopHandlerObserver itself has
nothing X11-specific, although its named is prefixed with X11.
Its method ::OnWorkspaceChanged is only called from X11DesktopHandler thought,
so it ends up being an dead code in case of !USE_X11 (or USE_OZONE).
If you think cleaning it up this dependency is worth it, I could give it a shot.

https://codereview.chromium.org/2462423002/diff/20001/chrome/browser/ui/views...
File chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.cc
(right):
https://codereview.chromium.org/2462423002/diff/20001/chrome/browser/ui/views...
chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.cc:142: void
ChromeBrowserMainExtraPartsViewsLinux::OnWorkspaceChanged(
On 2016/11/01 18:29:54, tonikitoo wrote:
> On 2016/11/01 18:10:06, Tom Anderson wrote:
> > I'm surprised this doesn't need to be surrounded with #if defined(USE_X11)
as
> > well, since OnWorkspaceChanged is an override from
X11DesktopHandlerObserver.
> >
> > I guess the "right" thing to do would be to move
> x11_desktop_handler_observer.*
> > into the use_x11 portion of BUILD.gn and add the USE_X11 checks here
>
> I believe the reason it "works" is because X11DesktopHandlerObserver itself
has
> nothing X11-specific, although its named is prefixed with X11.
>
> Its method ::OnWorkspaceChanged is only called from X11DesktopHandler thought,
> so it ends up being an dead code in case of !USE_X11 (or USE_OZONE).
>
> If you think cleaning it up this dependency is worth it, I could give it a
shot.
I'll let thestig@ decide this one

Description was changed from
==========
Guard the Gtk+ entry points within ChromeBrowserMainExtraPartsViewsLinux with
!use_ozone
In order to bring up a Chrome/Chromium Ozone/Wayland build,
it is needed to opt out the instantiation/use of
views::LinuxUI with ::BuildGtk2UI in ozone builds.
It is still possible to optionally opt-in it back in the future,
but it would be safer to condition it to an extra GN variable, where
one could explicitly speficy that the Gtk wayland backend is to be used.
E.g.:
#if !defined(USE_OZONE) || defined(USE_GTK_WAYLAND_BACKEND)
views::LinuxUI* gtk2_ui = BuildGtk2UI();
..
#endif
BUG=295089
==========
to
==========
Guard the Gtk+ entry points within ChromeBrowserMainExtraPartsViewsLinux with
!use_ozone
In order to bring up a Chrome/Chromium Ozone/Wayland build,
it is needed to opt out the instantiation/use of
views::LinuxUI with ::BuildGtk2UI in ozone builds.
It is still possible to optionally opt-in it back in the future,
but it would be safer to condition it to an extra GN variable, where
one could explicitly specify that the Gtk wayland backend is to be used.
E.g.:
#if !defined(USE_OZONE) || defined(USE_GTK_WAYLAND_BACKEND)
views::LinuxUI* gtk2_ui = BuildGtk2UI();
..
#endif
BUG=295089
==========

On 2016/11/01 21:19:24, Lei Zhang wrote:
>
https://codereview.chromium.org/2462423002/diff/20001/chrome/browser/ui/views...
> File chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.cc
> (right):
>
>
https://codereview.chromium.org/2462423002/diff/20001/chrome/browser/ui/views...
> chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.cc:142:
void
> ChromeBrowserMainExtraPartsViewsLinux::OnWorkspaceChanged(
> On 2016/11/01 18:29:54, tonikitoo wrote:
> > If you think cleaning it up this dependency is worth it, I could give it a
> shot.
>
> Will OnWorkspaceChanged() ever be useful in an Ozone build? If you are not
sure,
> I think it's ok to leave it for now and have a few unused bits in the Ozone
> build. You can clean it up later.
OnWorkspaceChanged is not going to be used as-is by an Ozone build.

Looking at this some more, it looks like the only thing shared by the ozone
build and the standard Linux build is
ChromeBrowserMainExtraPartsViewsLinux::PreProfileInit(). Everything else looks
commented out. Given that, an alternative is to move
ChromeBrowserMainExtraPartsViewsLinux::PreProfileInit() into
ChromeBrowserMainExtraPartsViews::PreProfileInit(), ifdef'd. Then for Ozone,
instantiate ChromeBrowserMainExtraPartsViews instead of
ChromeBrowserMainExtraPartsViewsLinux.
https://codereview.chromium.org/2462423002/diff/40001/chrome/browser/ui/views...
File chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.cc
(right):
https://codereview.chromium.org/2462423002/diff/40001/chrome/browser/ui/views...
chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.cc:44:
ui::NativeTheme* GetNativeThemeForWindow(aura::Window* window) {
Is the Ozone build going to complain that this is dead code?

On 2016/11/01 21:36:26, Lei Zhang wrote:
> Looking at this some more, it looks like the only thing shared by the ozone
> build and the standard Linux build is
> ChromeBrowserMainExtraPartsViewsLinux::PreProfileInit(). Everything else looks
> commented out. Given that, an alternative is to move
> ChromeBrowserMainExtraPartsViewsLinux::PreProfileInit() into
> ChromeBrowserMainExtraPartsViews::PreProfileInit(), ifdef'd. Then for Ozone,
> instantiate ChromeBrowserMainExtraPartsViews instead of
> ChromeBrowserMainExtraPartsViewsLinux.
Yes, this is closer to what patchset #1 did. thomasanderson@: Are you ok with
it?
>
https://codereview.chromium.org/2462423002/diff/40001/chrome/browser/ui/views...
> File chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.cc
> (right):
>
>
https://codereview.chromium.org/2462423002/diff/40001/chrome/browser/ui/views...
> chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.cc:44:
> ui::NativeTheme* GetNativeThemeForWindow(aura::Window* window) {
> Is the Ozone build going to complain that this is dead code?
It does not complain locally (release / debug). I will watch it.

On 2016/11/01 22:36:11, Lei Zhang wrote:
> On 2016/11/01 22:29:25, Tom Anderson wrote:
> > Ehh, PS3 still makes more sense in my mind than PS1, but thestig@'s review
> takes
> > precedence here
>
> My thoughts are:
> - Too many things in ChromeBrowserMainExtraPartsViewsLinux are ifdef'd out in
> PS3.
> - ChromeBrowserMainExtraPartsViews already has some ifdef conditions
internally,
> and would only need 1 more.
We're going to want to use gtk on ozone eventually for print dialogs and such,
and when that happens, we'll need to move the gtk code in CBMEPVL into CBMEPV.
Also, I don't think the X11DesktopHandler code belongs in CBMEPVL, as we have a
ChromeBrowserMainExtraPartsX11. It's on my TODO list to refactor this at some
point, but I think your/tonikitoo@'s solution is fine for now.

On 2016/11/01 22:52:58, Tom Anderson wrote:
> On 2016/11/01 22:36:11, Lei Zhang wrote:
> > On 2016/11/01 22:29:25, Tom Anderson wrote:
> > > Ehh, PS3 still makes more sense in my mind than PS1, but thestig@'s review
> > takes
> > > precedence here
> >
> > My thoughts are:
> > - Too many things in ChromeBrowserMainExtraPartsViewsLinux are ifdef'd out
in
> > PS3.
> > - ChromeBrowserMainExtraPartsViews already has some ifdef conditions
> internally,
> > and would only need 1 more.
>
> We're going to want to use gtk on ozone eventually for print dialogs and such,
> and when that happens, we'll need to move the gtk code in CBMEPVL into CBMEPV.
> Also, I don't think the X11DesktopHandler code belongs in CBMEPVL, as we have
a
> ChromeBrowserMainExtraPartsX11. It's on my TODO list to refactor this at some
> point, but I think your/tonikitoo@'s solution is fine for now.
It think even if we instantiate CBMEPV (rather than CBMEPVL) for OZONE, and
properly add a comment, it should not be a problem to change Ozone to use
CBMEPVL in the future (e.g. once gtk-wayland) is available.
My question now is:
the instantiation code would change like this:
#if defined(TOOLKIT_VIEWS)
-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
+#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(USE_OZONE)
main_parts->AddParts(new ChromeBrowserMainExtraPartsViewsLinux());
#else
main_parts->AddParts(new ChromeBrowserMainExtraPartsViews());
#endif
#endif
...which should be fine per si (this is mostly patchset #1).
The big different to @thestig's suggestion to patchset #1 is that if we would
move CBMEPVL::PreProfileInit to CBMEPV, we would change current CHROMEOS
behavior (to not allow launch as root).
what do you guys think?

On 2016/11/01 23:06:35, tonikitoo wrote:
> The big different to @thestig's suggestion to patchset #1 is that if we would
> move CBMEPVL::PreProfileInit to CBMEPV, we would change current CHROMEOS
> behavior (to not allow launch as root).
Can't you keep the existing behavior by moving
ChromeBrowserMainExtraPartsViewsLinux::PreProfileInit() into
ChromeBrowserMainExtraPartsViews::PreProfileInit(), but ifdefing it to
defined(OS_LINUX) && !defined(OS_CHROMEOS) ?

Description was changed from
==========
Guard the Gtk+ entry points within ChromeBrowserMainExtraPartsViewsLinux with
!use_ozone
In order to bring up a Chrome/Chromium Ozone/Wayland build,
it is needed to opt out the instantiation/use of
views::LinuxUI with ::BuildGtk2UI in ozone builds.
It is still possible to optionally opt-in it back in the future,
but it would be safer to condition it to an extra GN variable, where
one could explicitly specify that the Gtk wayland backend is to be used.
E.g.:
#if !defined(USE_OZONE) || defined(USE_GTK_WAYLAND_BACKEND)
views::LinuxUI* gtk2_ui = BuildGtk2UI();
..
#endif
BUG=295089
==========
to
==========
Condition the use of ChromeBrowserMainExtraPartsViewsLinux to !use_ozone
In order to bring up a Chrome/Chromium Ozone/Wayland build,
it is needed to opt out the instantiation/inclusion of
chrome_browser_main_extra_parts_views_linux.cc/h in Ozone builds.
It should still possible to opt-in the use of CBMEPVL for Ozone builds
in the future, but it would be safer to condition it to an extra GN variable,
where one could explicitly speficy that the Gtk wayland backend is to be used.
E.g.:
if (!use_ozone || use_gtk_wayland_backend) {
sources += [
"views/chrome_browser_main_extra_parts_views_linux.cc",
"views/chrome_browser_main_extra_parts_views_linux.h"
]
} else # regular ozone case {
sources += [
"views/chrome_browser_main_extra_parts_views.cc",
"views/chrome_browser_main_extra_parts_views.h"
]
}
CL also moves the PreProfileInit override from CBMEPVL to CBMEPV,
if-def'ing it out for CHROMEOS, so
BUG=295089
==========

On 2016/11/01 23:34:52, Lei Zhang wrote:
> On 2016/11/01 23:06:35, tonikitoo wrote:
> > The big different to @thestig's suggestion to patchset #1 is that if we
would
> > move CBMEPVL::PreProfileInit to CBMEPV, we would change current CHROMEOS
> > behavior (to not allow launch as root).
>
> Can't you keep the existing behavior by moving
> ChromeBrowserMainExtraPartsViewsLinux::PreProfileInit() into
> ChromeBrowserMainExtraPartsViews::PreProfileInit(), but ifdefing it to
> defined(OS_LINUX) && !defined(OS_CHROMEOS) ?
Done. PTAL

Description was changed from
==========
Condition the use of ChromeBrowserMainExtraPartsViewsLinux to !use_ozone
In order to bring up a Chrome/Chromium Ozone/Wayland build,
it is needed to opt out the instantiation/inclusion of
chrome_browser_main_extra_parts_views_linux.cc/h in Ozone builds.
It should still possible to opt-in the use of CBMEPVL for Ozone builds
in the future, but it would be safer to condition it to an extra GN variable,
where one could explicitly speficy that the Gtk wayland backend is to be used.
E.g.:
if (!use_ozone || use_gtk_wayland_backend) {
sources += [
"views/chrome_browser_main_extra_parts_views_linux.cc",
"views/chrome_browser_main_extra_parts_views_linux.h"
]
} else # regular ozone case {
sources += [
"views/chrome_browser_main_extra_parts_views.cc",
"views/chrome_browser_main_extra_parts_views.h"
]
}
CL also moves the PreProfileInit override from CBMEPVL to CBMEPV,
if-def'ing it out for CHROMEOS, so
BUG=295089
==========
to
==========
Condition the use of ChromeBrowserMainExtraPartsViewsLinux to !use_ozone
In order to bring up a Chrome/Chromium Ozone/Wayland build,
it is needed to opt out the instantiation/inclusion of
chrome_browser_main_extra_parts_views_linux.cc/h in Ozone builds.
It should still possible to opt-in the use of CBMEPVL for Ozone builds
in the future, but it would be safer to condition it to an extra GN variable,
where one could explicitly specify that the Gtk wayland backend is to be used.
E.g.:
if (!use_ozone || use_gtk_wayland_backend) {
sources += [
"views/chrome_browser_main_extra_parts_views_linux.cc",
"views/chrome_browser_main_extra_parts_views_linux.h"
]
} else # regular ozone case {
sources += [
"views/chrome_browser_main_extra_parts_views.cc",
"views/chrome_browser_main_extra_parts_views.h"
]
}
CL also moves the PreProfileInit override from CBMEPVL to CBMEPV,
if-def'ing it out for CHROMEOS, so
BUG=295089
==========

Description was changed from
==========
Condition the use of ChromeBrowserMainExtraPartsViewsLinux to !use_ozone
In order to bring up a Chrome/Chromium Ozone/Wayland build,
it is needed to opt out the instantiation/inclusion of
chrome_browser_main_extra_parts_views_linux.cc/h in Ozone builds.
It should still possible to opt-in the use of CBMEPVL for Ozone builds
in the future, but it would be safer to condition it to an extra GN variable,
where one could explicitly specify that the Gtk wayland backend is to be used.
E.g.:
if (!use_ozone || use_gtk_wayland_backend) {
sources += [
"views/chrome_browser_main_extra_parts_views_linux.cc",
"views/chrome_browser_main_extra_parts_views_linux.h"
]
} else # regular ozone case {
sources += [
"views/chrome_browser_main_extra_parts_views.cc",
"views/chrome_browser_main_extra_parts_views.h"
]
}
CL also moves the PreProfileInit override from CBMEPVL to CBMEPV,
if-def'ing it out for CHROMEOS, so
BUG=295089
==========
to
==========
Condition the use of ChromeBrowserMainExtraPartsViewsLinux to !use_ozone
In order to bring up a Chrome/Chromium Ozone/Wayland build,
it is needed to opt out the instantiation/inclusion of
chrome_browser_main_extra_parts_views_linux.cc/h in Ozone builds.
It should still possible to opt-in the use of CBMEPVL for Ozone builds
in the future, but it would be safer to condition it to an extra GN variable,
where one could explicitly specify that the Gtk wayland backend is to be used.
E.g.:
if (!use_ozone || use_gtk_wayland_backend) {
sources += [
"views/chrome_browser_main_extra_parts_views_linux.cc",
"views/chrome_browser_main_extra_parts_views_linux.h"
]
} else # regular ozone case {
sources += [
"views/chrome_browser_main_extra_parts_views.cc",
"views/chrome_browser_main_extra_parts_views.h"
]
}
CL also moves the PreProfileInit override from CBMEPVL to CBMEPV,
if-def'ing it out for CHROMEOS, in order to keep the behavior to
desktop linux builds (x11/ozone).
BUG=295089
==========

Description was changed from
==========
Condition the use of ChromeBrowserMainExtraPartsViewsLinux to !use_ozone
In order to bring up a Chrome/Chromium Ozone/Wayland build,
it is needed to opt out the instantiation/inclusion of
chrome_browser_main_extra_parts_views_linux.cc/h in Ozone builds.
It should still possible to opt-in the use of CBMEPVL for Ozone builds
in the future, but it would be safer to condition it to an extra GN variable,
where one could explicitly specify that the Gtk wayland backend is to be used.
E.g.:
if (!use_ozone || use_gtk_wayland_backend) {
sources += [
"views/chrome_browser_main_extra_parts_views_linux.cc",
"views/chrome_browser_main_extra_parts_views_linux.h"
]
} else # regular ozone case {
sources += [
"views/chrome_browser_main_extra_parts_views.cc",
"views/chrome_browser_main_extra_parts_views.h"
]
}
CL also moves the PreProfileInit override from CBMEPVL to CBMEPV,
if-def'ing it out for CHROMEOS, in order to keep the behavior to
desktop linux builds (x11/ozone).
BUG=295089
==========
to
==========
Condition the use of ChromeBrowserMainExtraPartsViewsLinux to !use_ozone
In order to bring up a Chrome/Chromium Ozone/Wayland build,
it is needed to opt out the instantiation/inclusion of
chrome_browser_main_extra_parts_views_linux.cc/h in Ozone builds.
It should still possible to opt-in the use of CBMEPVL for Ozone builds
in the future, but it would be safer to condition it to an extra GN variable,
where one could explicitly specify that the Gtk wayland backend is to be used.
E.g.:
if (!use_ozone || use_gtk_wayland_backend) {
sources += [
"views/chrome_browser_main_extra_parts_views_linux.cc",
"views/chrome_browser_main_extra_parts_views_linux.h"
]
} else # regular ozone case {
sources += [
"views/chrome_browser_main_extra_parts_views.cc",
"views/chrome_browser_main_extra_parts_views.h"
]
}
CL also moves the PreProfileInit override from CBMEPVL to CBMEPV,
if-def'ing it out for CHROMEOS, in order to keep the behavior to
desktop linux builds (x11/ozone).
BUG=295089
==========

Description was changed from
==========
Condition the use of ChromeBrowserMainExtraPartsViewsLinux to !use_ozone
In order to bring up a Chrome/Chromium Ozone/Wayland build,
it is needed to opt out the instantiation/inclusion of
chrome_browser_main_extra_parts_views_linux.cc/h in Ozone builds.
It should still possible to opt-in the use of CBMEPVL for Ozone builds
in the future, but it would be safer to condition it to an extra GN variable,
where one could explicitly specify that the Gtk wayland backend is to be used.
E.g.:
if (!use_ozone || use_gtk_wayland_backend) {
sources += [
"views/chrome_browser_main_extra_parts_views_linux.cc",
"views/chrome_browser_main_extra_parts_views_linux.h"
]
} else # regular ozone case {
sources += [
"views/chrome_browser_main_extra_parts_views.cc",
"views/chrome_browser_main_extra_parts_views.h"
]
}
CL also moves the PreProfileInit override from CBMEPVL to CBMEPV,
if-def'ing it out for CHROMEOS, in order to keep the behavior to
desktop linux builds (x11/ozone).
BUG=295089
==========
to
==========
Condition the use of ChromeBrowserMainExtraPartsViewsLinux to !use_ozone
In order to bring up a Chrome/Chromium Ozone/Wayland build,
it is needed to opt out the instantiation/inclusion of
chrome_browser_main_extra_parts_views_linux.cc/h in Ozone builds.
It should still possible to opt-in the use of CBMEPVL for Ozone builds
in the future, but it would be safer to condition it to an extra GN variable,
where one could explicitly specify that the Gtk wayland backend is to be used.
E.g.:
if (!use_ozone || use_gtk_wayland_backend) {
sources += [
"views/chrome_browser_main_extra_parts_views_linux.cc",
"views/chrome_browser_main_extra_parts_views_linux.h"
]
} else # regular ozone case {
sources += [
"views/chrome_browser_main_extra_parts_views.cc",
"views/chrome_browser_main_extra_parts_views.h"
]
}
CL also moves the PreProfileInit override from CBMEPVL to CBMEPV,
if-def'ing it out for CHROMEOS, in order to keep the behavior to
desktop linux builds (x11/ozone).
BUG=295089
Committed: https://crrev.com/da97a9ff8dbe3c463ff7d64fd765483401e2feb2
Cr-Commit-Position: refs/heads/master@{#429391}
==========

Description was changed from
==========
Condition the use of ChromeBrowserMainExtraPartsViewsLinux to !use_ozone
In order to bring up a Chrome/Chromium Ozone/Wayland build,
it is needed to opt out the instantiation/inclusion of
chrome_browser_main_extra_parts_views_linux.cc/h in Ozone builds.
It should still possible to opt-in the use of CBMEPVL for Ozone builds
in the future, but it would be safer to condition it to an extra GN variable,
where one could explicitly specify that the Gtk wayland backend is to be used.
E.g.:
if (!use_ozone || use_gtk_wayland_backend) {
sources += [
"views/chrome_browser_main_extra_parts_views_linux.cc",
"views/chrome_browser_main_extra_parts_views_linux.h"
]
} else # regular ozone case {
sources += [
"views/chrome_browser_main_extra_parts_views.cc",
"views/chrome_browser_main_extra_parts_views.h"
]
}
CL also moves the PreProfileInit override from CBMEPVL to CBMEPV,
if-def'ing it out for CHROMEOS, in order to keep the behavior to
desktop linux builds (x11/ozone).
BUG=295089
Committed: https://crrev.com/da97a9ff8dbe3c463ff7d64fd765483401e2feb2
Cr-Commit-Position: refs/heads/master@{#429391}
==========
to
==========
Condition the use of ChromeBrowserMainExtraPartsViewsLinux to !use_ozone
In order to bring up a Chrome/Chromium Ozone/Wayland build,
it is needed to opt out the instantiation/inclusion of
chrome_browser_main_extra_parts_views_linux.cc/h in Ozone builds.
It should still possible to opt-in the use of CBMEPVL for Ozone builds
in the future, but it would be safer to condition it to an extra GN variable,
where one could explicitly specify that the Gtk wayland backend is to be used.
E.g.:
if (!use_ozone || use_gtk_wayland_backend) {
sources += [
"views/chrome_browser_main_extra_parts_views_linux.cc",
"views/chrome_browser_main_extra_parts_views_linux.h"
]
} else # regular ozone case {
sources += [
"views/chrome_browser_main_extra_parts_views.cc",
"views/chrome_browser_main_extra_parts_views.h"
]
}
CL also moves the PreProfileInit override from CBMEPVL to CBMEPV,
if-def'ing it out for CHROMEOS, in order to keep the behavior to
desktop linux builds (x11/ozone).
BUG=295089
Committed: https://crrev.com/da97a9ff8dbe3c463ff7d64fd765483401e2feb2
Cr-Commit-Position: refs/heads/master@{#429391}
==========