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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 aura::Env::CreateInstance(); | 61 aura::Env::CreateInstance(); |
62 active_desktop_monitor_.reset(new ActiveDesktopMonitor(GetInitialDesktop())); | 62 active_desktop_monitor_.reset(new ActiveDesktopMonitor(GetInitialDesktop())); |
63 #endif | 63 #endif |
64 #endif | 64 #endif |
65 | 65 |
66 #if !defined(USE_ASH) && defined(OS_LINUX) && defined(USE_X11) | 66 #if !defined(USE_ASH) && defined(OS_LINUX) && defined(USE_X11) |
67 views::LinuxUI::instance()->Initialize(); | 67 views::LinuxUI::instance()->Initialize(); |
68 #endif | 68 #endif |
69 } | 69 } |
70 | 70 |
71 void ChromeBrowserMainExtraPartsAura::PostMainMessageLoopStart() { | 71 void ChromeBrowserMainExtraPartsAura::PostMainMessageLoopRun() { |
| 72 active_desktop_monitor_.reset(); |
| 73 |
| 74 // aura::Env instance is deleted in BrowserProcessImpl::StartTearDown |
| 75 // after the metrics service is deleted. |
| 76 } |
| 77 |
| 78 void ChromeBrowserMainExtraPartsAura::PreCreateThreads() { |
72 #if !defined(OS_CHROMEOS) | 79 #if !defined(OS_CHROMEOS) |
73 #if defined(USE_ASH) | 80 #if defined(USE_ASH) |
74 if (!chrome::ShouldOpenAshOnStartup()) | 81 if (!chrome::ShouldOpenAshOnStartup()) |
75 #endif | 82 #endif |
76 { | 83 { |
77 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, | 84 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, |
78 views::CreateDesktopScreen()); | 85 views::CreateDesktopScreen()); |
79 } | 86 } |
80 #endif | 87 #endif |
81 } | 88 } |
82 | |
83 void ChromeBrowserMainExtraPartsAura::PostMainMessageLoopRun() { | |
84 active_desktop_monitor_.reset(); | |
85 | |
86 // aura::Env instance is deleted in BrowserProcessImpl::StartTearDown | |
87 // after the metrics service is deleted. | |
88 } | |
OLD | NEW |