| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "ash/accelerators/accelerator_controller.h" | 7 #include "ash/accelerators/accelerator_controller.h" |
| 8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "chrome/common/chrome_switches.h" | 10 #include "chrome/common/chrome_switches.h" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 ui::gfx_test_utils::SetupTestCompositor(); | 35 ui::gfx_test_utils::SetupTestCompositor(); |
| 36 #endif | 36 #endif |
| 37 } | 37 } |
| 38 | 38 |
| 39 #if defined(OS_CHROMEOS) | 39 #if defined(OS_CHROMEOS) |
| 40 if (chromeos::system::runtime_environment::IsRunningOnChromeOS()) | 40 if (chromeos::system::runtime_environment::IsRunningOnChromeOS()) |
| 41 aura::RootWindow::set_use_fullscreen_host_window(true); | 41 aura::RootWindow::set_use_fullscreen_host_window(true); |
| 42 #endif | 42 #endif |
| 43 | 43 |
| 44 // Shell takes ownership of ChromeShellDelegate. | 44 // Shell takes ownership of ChromeShellDelegate. |
| 45 aura_shell::Shell* aura_shell = | 45 ash::Shell* shell = ash::Shell::CreateInstance(new ChromeShellDelegate); |
| 46 aura_shell::Shell::CreateInstance(new ChromeShellDelegate); | 46 // AcceleratorController takes ownership of ScreenshotDelegate. |
| 47 // accelerator controller takes ownership of ScreenshotDelegate. | 47 shell->accelerator_controller()->SetScreenshotDelegate(new ScreenshotTaker); |
| 48 aura_shell->accelerator_controller()->SetScreenshotDelegate( | |
| 49 new ScreenshotTaker); | |
| 50 | 48 |
| 51 // Make sure the singleton ScreenOrientationListener object is created. | 49 // Make sure the singleton ScreenOrientationListener object is created. |
| 52 ScreenOrientationListener::GetInstance(); | 50 ScreenOrientationListener::GetInstance(); |
| 53 } | 51 } |
| 54 | 52 |
| 55 void ChromeBrowserMainExtraPartsAura::PostMainMessageLoopRun() { | 53 void ChromeBrowserMainExtraPartsAura::PostMainMessageLoopRun() { |
| 56 aura_shell::Shell::DeleteInstance(); | 54 ash::Shell::DeleteInstance(); |
| 57 aura::RootWindow::DeleteInstance(); | 55 aura::RootWindow::DeleteInstance(); |
| 58 } | 56 } |
| OLD | NEW |