| 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/chrome_browser_main_extra_parts_aura.h" | 5 #include "chrome/browser/chrome_browser_main_extra_parts_aura.h" |
| 6 | 6 |
| 7 #include "ui/aura/env.h" | 7 #include "ui/aura/env.h" |
| 8 | 8 |
| 9 #if !defined(USE_ASH) | 9 #if !defined(USE_ASH) |
| 10 #include "ui/aura/desktop/desktop_screen.h" |
| 10 #include "ui/aura/desktop/desktop_stacking_client.h" | 11 #include "ui/aura/desktop/desktop_stacking_client.h" |
| 11 #include "ui/aura/env.h" | 12 #include "ui/aura/env.h" |
| 12 #include "ui/aura/single_monitor_manager.h" | 13 #include "ui/aura/single_monitor_manager.h" |
| 14 #include "ui/gfx/screen.h" |
| 13 #include "ui/views/widget/native_widget_aura.h" | 15 #include "ui/views/widget/native_widget_aura.h" |
| 14 #endif // !USE_ASH | 16 #endif // !USE_ASH |
| 15 | 17 |
| 16 ChromeBrowserMainExtraPartsAura::ChromeBrowserMainExtraPartsAura() | 18 ChromeBrowserMainExtraPartsAura::ChromeBrowserMainExtraPartsAura() |
| 17 : ChromeBrowserMainExtraParts() { | 19 : ChromeBrowserMainExtraParts() { |
| 18 } | 20 } |
| 19 | 21 |
| 20 void ChromeBrowserMainExtraPartsAura::PreProfileInit() { | 22 void ChromeBrowserMainExtraPartsAura::PreProfileInit() { |
| 21 #if !defined(USE_ASH) | 23 #if !defined(USE_ASH) |
| 24 gfx::Screen::SetInstance(aura::CreateDesktopScreen()); |
| 22 aura::Env::GetInstance()->SetMonitorManager(new aura::SingleMonitorManager); | 25 aura::Env::GetInstance()->SetMonitorManager(new aura::SingleMonitorManager); |
| 23 stacking_client_.reset(new aura::DesktopStackingClient); | 26 stacking_client_.reset(new aura::DesktopStackingClient); |
| 24 #endif // !USE_ASH | 27 #endif // !USE_ASH |
| 25 } | 28 } |
| 26 | 29 |
| 27 void ChromeBrowserMainExtraPartsAura::PostMainMessageLoopRun() { | 30 void ChromeBrowserMainExtraPartsAura::PostMainMessageLoopRun() { |
| 28 #if !defined(USE_ASH) | 31 #if !defined(USE_ASH) |
| 29 stacking_client_.reset(); | 32 stacking_client_.reset(); |
| 30 #endif | 33 #endif |
| 31 | 34 |
| 32 // aura::Env instance is deleted in BrowserProcessImpl::StartTearDown | 35 // aura::Env instance is deleted in BrowserProcessImpl::StartTearDown |
| 33 // after the metrics service is deleted. | 36 // after the metrics service is deleted. |
| 34 } | 37 } |
| OLD | NEW |