| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/ui/aura/chrome_browser_main_extra_parts_aura.h" | 5 #include "chrome/browser/ui/aura/chrome_browser_main_extra_parts_aura.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/run_loop.h" | 8 #include "base/run_loop.h" |
| 9 #include "chrome/browser/chrome_browser_main.h" | 9 #include "chrome/browser/chrome_browser_main.h" |
| 10 #include "chrome/browser/ui/aura/active_desktop_monitor.h" | 10 #include "chrome/browser/ui/aura/active_desktop_monitor.h" |
| 11 #include "chrome/browser/ui/host_desktop.h" | 11 #include "chrome/browser/ui/host_desktop.h" |
| 12 #include "chrome/browser/ui/simple_message_box.h" | 12 #include "chrome/browser/ui/simple_message_box.h" |
| 13 #include "chrome/common/chrome_switches.h" | 13 #include "chrome/common/chrome_switches.h" |
| 14 #include "grit/chromium_strings.h" | 14 #include "grit/chromium_strings.h" |
| 15 #include "grit/generated_resources.h" | 15 #include "grit/generated_resources.h" |
| 16 #include "ui/aura/env.h" | 16 #include "ui/aura/env.h" |
| 17 #include "ui/base/l10n/l10n_util.h" | 17 #include "ui/base/l10n/l10n_util.h" |
| 18 #include "ui/gfx/screen.h" | 18 #include "ui/gfx/screen.h" |
| 19 #include "ui/views/widget/native_widget_aura.h" | 19 #include "ui/views/widget/native_widget_aura.h" |
| 20 #include "ui/wm/core/wm_state.h" |
| 20 | 21 |
| 21 #if defined(USE_X11) && !defined(OS_CHROMEOS) | 22 #if defined(USE_X11) && !defined(OS_CHROMEOS) |
| 22 #include "base/prefs/pref_service.h" | 23 #include "base/prefs/pref_service.h" |
| 23 #include "chrome/browser/profiles/profile.h" | 24 #include "chrome/browser/profiles/profile.h" |
| 24 #include "chrome/browser/ui/libgtk2ui/gtk2_ui.h" | 25 #include "chrome/browser/ui/libgtk2ui/gtk2_ui.h" |
| 25 #include "chrome/common/pref_names.h" | 26 #include "chrome/common/pref_names.h" |
| 26 #include "ui/aura/window.h" | 27 #include "ui/aura/window.h" |
| 27 #include "ui/base/ime/input_method_initializer.h" | 28 #include "ui/base/ime/input_method_initializer.h" |
| 28 #include "ui/native_theme/native_theme_aura.h" | 29 #include "ui/native_theme/native_theme_aura.h" |
| 29 #include "ui/views/linux_ui/linux_ui.h" | 30 #include "ui/views/linux_ui/linux_ui.h" |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 views::LinuxUI::SetInstance(gtk2_ui); | 99 views::LinuxUI::SetInstance(gtk2_ui); |
| 99 } else { | 100 } else { |
| 100 // TODO(erg): Eventually, we'll need to somehow support IMEs in ash on | 101 // TODO(erg): Eventually, we'll need to somehow support IMEs in ash on |
| 101 // Linux. | 102 // Linux. |
| 102 ui::InitializeInputMethodForTesting(); | 103 ui::InitializeInputMethodForTesting(); |
| 103 } | 104 } |
| 104 #endif | 105 #endif |
| 105 } | 106 } |
| 106 | 107 |
| 107 void ChromeBrowserMainExtraPartsAura::ToolkitInitialized() { | 108 void ChromeBrowserMainExtraPartsAura::ToolkitInitialized() { |
| 109 wm_state_.reset(new wm::WMState); |
| 110 |
| 108 #if !defined(OS_CHROMEOS) | 111 #if !defined(OS_CHROMEOS) |
| 109 #if defined(USE_ASH) | 112 #if defined(USE_ASH) |
| 110 CHECK(aura::Env::GetInstance()); | 113 CHECK(aura::Env::GetInstance()); |
| 111 active_desktop_monitor_.reset(new ActiveDesktopMonitor(GetInitialDesktop())); | 114 active_desktop_monitor_.reset(new ActiveDesktopMonitor(GetInitialDesktop())); |
| 112 #endif | 115 #endif |
| 113 #endif | 116 #endif |
| 114 | 117 |
| 115 #if defined(USE_X11) && !defined(OS_CHROMEOS) | 118 #if defined(USE_X11) && !defined(OS_CHROMEOS) |
| 116 if (GetInitialDesktop() != chrome::HOST_DESKTOP_TYPE_ASH) | 119 if (GetInitialDesktop() != chrome::HOST_DESKTOP_TYPE_ASH) |
| 117 views::LinuxUI::instance()->Initialize(); | 120 views::LinuxUI::instance()->Initialize(); |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 chrome::MESSAGE_BOX_TYPE_WARNING); | 168 chrome::MESSAGE_BOX_TYPE_WARNING); |
| 166 | 169 |
| 167 // Avoids gpu_process_transport_factory.cc(153)] Check failed: | 170 // Avoids gpu_process_transport_factory.cc(153)] Check failed: |
| 168 // per_compositor_data_.empty() when quit is chosen. | 171 // per_compositor_data_.empty() when quit is chosen. |
| 169 base::RunLoop().RunUntilIdle(); | 172 base::RunLoop().RunUntilIdle(); |
| 170 | 173 |
| 171 exit(EXIT_FAILURE); | 174 exit(EXIT_FAILURE); |
| 172 } | 175 } |
| 173 } | 176 } |
| 174 #endif | 177 #endif |
| OLD | NEW |