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

Unified Diff: chrome/browser/ui/aura/chrome_browser_main_extra_parts_aura.cc

Issue 292443002: linux_aura: Compile ash into chrome. (Closed) Base URL: https://chromium.googlesource.com/chromium/src
Patch Set: Rebase to ToT Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/ash/user_wallpaper_delegate_win.cc ('k') | chrome/browser/ui/libgtk2ui/gtk2_ui.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/aura/chrome_browser_main_extra_parts_aura.cc
diff --git a/chrome/browser/ui/aura/chrome_browser_main_extra_parts_aura.cc b/chrome/browser/ui/aura/chrome_browser_main_extra_parts_aura.cc
index 3658a526e929df41cc69e63af9d94bffb2fb8c4e..259b07363833b1f64c1115e349905d1f4cf2a983 100644
--- a/chrome/browser/ui/aura/chrome_browser_main_extra_parts_aura.cc
+++ b/chrome/browser/ui/aura/chrome_browser_main_extra_parts_aura.cc
@@ -24,6 +24,7 @@
#include "chrome/browser/ui/libgtk2ui/gtk2_ui.h"
#include "chrome/common/pref_names.h"
#include "ui/aura/window.h"
+#include "ui/base/ime/input_method_initializer.h"
#include "ui/native_theme/native_theme_aura.h"
#include "ui/views/linux_ui/linux_ui.h"
#endif
@@ -70,7 +71,12 @@ chrome::HostDesktopType GetInitialDesktop() {
command_line->HasSwitch(switches::kViewerLaunchViaAppId)) {
return chrome::HOST_DESKTOP_TYPE_ASH;
}
+#elif defined(OS_LINUX)
+ const CommandLine* command_line = CommandLine::ForCurrentProcess();
+ if (command_line->HasSwitch(switches::kOpenAsh))
+ return chrome::HOST_DESKTOP_TYPE_ASH;
#endif
+
return chrome::HOST_DESKTOP_TYPE_NATIVE;
}
#endif // !defined(OS_CHROMEOS) && defined(USE_ASH)
@@ -85,10 +91,16 @@ ChromeBrowserMainExtraPartsAura::~ChromeBrowserMainExtraPartsAura() {
void ChromeBrowserMainExtraPartsAura::PreEarlyInitialization() {
#if defined(USE_X11) && !defined(OS_CHROMEOS)
- // TODO(erg): Refactor this into a dlopen call when we add a GTK3 port.
- views::LinuxUI* gtk2_ui = BuildGtk2UI();
- gtk2_ui->SetNativeThemeOverride(base::Bind(&GetNativeThemeForWindow));
- views::LinuxUI::SetInstance(gtk2_ui);
+ if (GetInitialDesktop() != chrome::HOST_DESKTOP_TYPE_ASH) {
+ // TODO(erg): Refactor this into a dlopen call when we add a GTK3 port.
+ views::LinuxUI* gtk2_ui = BuildGtk2UI();
+ gtk2_ui->SetNativeThemeOverride(base::Bind(&GetNativeThemeForWindow));
+ views::LinuxUI::SetInstance(gtk2_ui);
+ } else {
+ // TODO(erg): Eventually, we'll need to somehow support IMEs in ash on
+ // Linux.
+ ui::InitializeInputMethodForTesting();
+ }
#endif
}
@@ -101,7 +113,8 @@ void ChromeBrowserMainExtraPartsAura::ToolkitInitialized() {
#endif
#if defined(USE_X11) && !defined(OS_CHROMEOS)
- views::LinuxUI::instance()->Initialize();
+ if (GetInitialDesktop() != chrome::HOST_DESKTOP_TYPE_ASH)
+ views::LinuxUI::instance()->Initialize();
#endif
}
« no previous file with comments | « chrome/browser/ui/ash/user_wallpaper_delegate_win.cc ('k') | chrome/browser/ui/libgtk2ui/gtk2_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698