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 "chrome/browser/chrome_browser_main.h" | 7 #include "chrome/browser/chrome_browser_main.h" |
8 #include "chrome/browser/ui/aura/active_desktop_monitor.h" | 8 #include "chrome/browser/ui/aura/active_desktop_monitor.h" |
9 #include "chrome/browser/ui/host_desktop.h" | 9 #include "chrome/browser/ui/host_desktop.h" |
10 #include "ui/aura/env.h" | 10 #include "ui/aura/env.h" |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
42 | 42 |
43 } // namespace | 43 } // namespace |
44 | 44 |
45 ChromeBrowserMainExtraPartsAura::ChromeBrowserMainExtraPartsAura() { | 45 ChromeBrowserMainExtraPartsAura::ChromeBrowserMainExtraPartsAura() { |
46 } | 46 } |
47 | 47 |
48 ChromeBrowserMainExtraPartsAura::~ChromeBrowserMainExtraPartsAura() { | 48 ChromeBrowserMainExtraPartsAura::~ChromeBrowserMainExtraPartsAura() { |
49 } | 49 } |
50 | 50 |
51 void ChromeBrowserMainExtraPartsAura::ToolkitInitialized() { | 51 void ChromeBrowserMainExtraPartsAura::ToolkitInitialized() { |
52 #if !defined(OS_CHROMEOS) | 52 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) |
53 #if defined(USE_ASH) | |
54 active_desktop_monitor_.reset(new ActiveDesktopMonitor(GetInitialDesktop())); | |
55 #endif | |
56 #endif | |
57 | |
58 #if !defined(USE_ASH) && defined(OS_LINUX) && defined(USE_X11) | |
59 // TODO(erg): Refactor this into a dlopen call when we add a GTK3 port. | 53 // TODO(erg): Refactor this into a dlopen call when we add a GTK3 port. |
60 views::LinuxUI::SetInstance(BuildGtk2UI()); | 54 views::LinuxUI::SetInstance(BuildGtk2UI()); |
61 #endif | 55 #endif |
62 } | 56 } |
63 | 57 |
64 void ChromeBrowserMainExtraPartsAura::PostMainMessageLoopStart() { | 58 void ChromeBrowserMainExtraPartsAura::PostMainMessageLoopStart() { |
65 #if !defined(OS_CHROMEOS) | 59 #if !defined(OS_CHROMEOS) |
66 #if defined(USE_ASH) | 60 #if defined(USE_ASH) |
61 active_desktop_monitor_.reset(new ActiveDesktopMonitor(GetInitialDesktop())); | |
sky
2013/09/30 14:45:53
How come you're moving initialization of this from
Elliot Glaysher
2013/09/30 20:53:40
Because using ActiveDesktopMonitor required aura::
| |
67 if (!chrome::ShouldOpenAshOnStartup()) | 62 if (!chrome::ShouldOpenAshOnStartup()) |
68 #endif | 63 #endif |
69 { | 64 { |
70 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, | 65 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, |
71 views::CreateDesktopScreen()); | 66 views::CreateDesktopScreen()); |
72 } | 67 } |
73 #endif | 68 #endif |
74 } | 69 } |
75 | 70 |
76 void ChromeBrowserMainExtraPartsAura::PostMainMessageLoopRun() { | 71 void ChromeBrowserMainExtraPartsAura::PostMainMessageLoopRun() { |
77 active_desktop_monitor_.reset(); | 72 active_desktop_monitor_.reset(); |
78 | 73 |
79 // aura::Env instance is deleted in BrowserProcessImpl::StartTearDown | 74 // aura::Env instance is deleted in BrowserProcessImpl::StartTearDown |
80 // after the metrics service is deleted. | 75 // after the metrics service is deleted. |
81 } | 76 } |
OLD | NEW |