| 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/events/platform/platform_event_source.h" |
| 18 #include "ui/gfx/screen.h" | 19 #include "ui/gfx/screen.h" |
| 19 #include "ui/views/widget/native_widget_aura.h" | 20 #include "ui/views/widget/native_widget_aura.h" |
| 20 | 21 |
| 21 #if defined(OS_LINUX) | 22 #if defined(OS_LINUX) |
| 22 #include "chrome/browser/ui/libgtk2ui/gtk2_ui.h" | 23 #include "chrome/browser/ui/libgtk2ui/gtk2_ui.h" |
| 23 #include "ui/views/linux_ui/linux_ui.h" | 24 #include "ui/views/linux_ui/linux_ui.h" |
| 24 #else | 25 #else |
| 25 #endif | 26 #endif |
| 26 | 27 |
| 27 #if defined(USE_ASH) | 28 #if defined(USE_ASH) |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 } | 62 } |
| 62 | 63 |
| 63 void ChromeBrowserMainExtraPartsAura::PreEarlyInitialization() { | 64 void ChromeBrowserMainExtraPartsAura::PreEarlyInitialization() { |
| 64 #if !defined(USE_ASH) && defined(OS_LINUX) && defined(USE_X11) | 65 #if !defined(USE_ASH) && defined(OS_LINUX) && defined(USE_X11) |
| 65 // TODO(erg): Refactor this into a dlopen call when we add a GTK3 port. | 66 // TODO(erg): Refactor this into a dlopen call when we add a GTK3 port. |
| 66 views::LinuxUI::SetInstance(BuildGtk2UI()); | 67 views::LinuxUI::SetInstance(BuildGtk2UI()); |
| 67 #endif | 68 #endif |
| 68 } | 69 } |
| 69 | 70 |
| 70 void ChromeBrowserMainExtraPartsAura::ToolkitInitialized() { | 71 void ChromeBrowserMainExtraPartsAura::ToolkitInitialized() { |
| 72 event_source_ = ui::PlatformEventSource::CreateDefault(); |
| 73 |
| 71 #if !defined(OS_CHROMEOS) | 74 #if !defined(OS_CHROMEOS) |
| 72 #if defined(USE_ASH) | 75 #if defined(USE_ASH) |
| 73 aura::Env::CreateInstance(); | 76 aura::Env::CreateInstance(); |
| 74 active_desktop_monitor_.reset(new ActiveDesktopMonitor(GetInitialDesktop())); | 77 active_desktop_monitor_.reset(new ActiveDesktopMonitor(GetInitialDesktop())); |
| 75 #endif | 78 #endif |
| 76 #endif | 79 #endif |
| 77 | 80 |
| 78 #if !defined(USE_ASH) && defined(OS_LINUX) && defined(USE_X11) | 81 #if !defined(USE_ASH) && defined(OS_LINUX) && defined(USE_X11) |
| 79 views::LinuxUI::instance()->Initialize(); | 82 views::LinuxUI::instance()->Initialize(); |
| 80 #endif | 83 #endif |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 chrome::MESSAGE_BOX_TYPE_WARNING); | 130 chrome::MESSAGE_BOX_TYPE_WARNING); |
| 128 | 131 |
| 129 // Avoids gpu_process_transport_factory.cc(153)] Check failed: | 132 // Avoids gpu_process_transport_factory.cc(153)] Check failed: |
| 130 // per_compositor_data_.empty() when quit is chosen. | 133 // per_compositor_data_.empty() when quit is chosen. |
| 131 base::RunLoop().RunUntilIdle(); | 134 base::RunLoop().RunUntilIdle(); |
| 132 | 135 |
| 133 exit(EXIT_FAILURE); | 136 exit(EXIT_FAILURE); |
| 134 } | 137 } |
| 135 } | 138 } |
| 136 #endif | 139 #endif |
| OLD | NEW |