| 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/ash/ash_init.h" | 5 #include "chrome/browser/ui/ash/ash_init.h" |
| 6 | 6 |
| 7 #include "ash/accelerators/accelerator_controller.h" | 7 #include "ash/accelerators/accelerator_controller.h" |
| 8 #include "ash/ash_switches.h" | 8 #include "ash/ash_switches.h" |
| 9 #include "ash/high_contrast/high_contrast_controller.h" | 9 #include "ash/high_contrast/high_contrast_controller.h" |
| 10 #include "ash/magnifier/magnification_controller.h" | 10 #include "ash/magnifier/magnification_controller.h" |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 #include "content/public/browser/browser_thread.h" | 32 #include "content/public/browser/browser_thread.h" |
| 33 #include "content/public/browser/context_factory.h" | 33 #include "content/public/browser/context_factory.h" |
| 34 #include "ui/aura/env.h" | 34 #include "ui/aura/env.h" |
| 35 #include "ui/aura/window_tree_host.h" | 35 #include "ui/aura/window_tree_host.h" |
| 36 | 36 |
| 37 #if defined(USE_X11) | 37 #if defined(USE_X11) |
| 38 #include "ui/base/x/x11_util.h" | 38 #include "ui/base/x/x11_util.h" |
| 39 #endif | 39 #endif |
| 40 | 40 |
| 41 #if defined(MOJO_SHELL_CLIENT) | 41 #if defined(MOJO_SHELL_CLIENT) |
| 42 #include "chrome/browser/ui/ash/launcher/chrome_mash_shelf_controller.h" | 42 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller_mus.h" |
| 43 #endif | 43 #endif |
| 44 | 44 |
| 45 namespace chrome { | 45 namespace chrome { |
| 46 | 46 |
| 47 void OpenAsh(gfx::AcceleratedWidget remote_window) { | 47 void OpenAsh(gfx::AcceleratedWidget remote_window) { |
| 48 #if defined(USE_X11) | 48 #if defined(USE_X11) |
| 49 if (base::SysInfo::IsRunningOnChromeOS()) { | 49 if (base::SysInfo::IsRunningOnChromeOS()) { |
| 50 // Hides the cursor outside of the Aura root window. The cursor will be | 50 // Hides the cursor outside of the Aura root window. The cursor will be |
| 51 // drawn within the Aura root window, and it'll remain hidden after the | 51 // drawn within the Aura root window, and it'll remain hidden after the |
| 52 // Aura window is closed. | 52 // Aura window is closed. |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 if (!base::CommandLine::ForCurrentProcess()->HasSwitch( | 94 if (!base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 95 switches::kDisableZeroBrowsersOpenForTests)) { | 95 switches::kDisableZeroBrowsersOpenForTests)) { |
| 96 g_browser_process->platform_part()->RegisterKeepAlive(); | 96 g_browser_process->platform_part()->RegisterKeepAlive(); |
| 97 } | 97 } |
| 98 ash::Shell::GetPrimaryRootWindow()->GetHost()->Show(); | 98 ash::Shell::GetPrimaryRootWindow()->GetHost()->Show(); |
| 99 } | 99 } |
| 100 | 100 |
| 101 void InitializeMash() { | 101 void InitializeMash() { |
| 102 #if defined(MOJO_SHELL_CLIENT) | 102 #if defined(MOJO_SHELL_CLIENT) |
| 103 DCHECK(!ash::Shell::HasInstance()); | 103 DCHECK(!ash::Shell::HasInstance()); |
| 104 ChromeMashShelfController::CreateInstance(); | 104 ChromeLauncherControllerMus::CreateInstance()->Init(); |
| 105 #endif | 105 #endif |
| 106 } | 106 } |
| 107 | 107 |
| 108 void CloseAsh() { | 108 void CloseAsh() { |
| 109 if (ash::Shell::HasInstance()) { | 109 if (ash::Shell::HasInstance()) { |
| 110 ash::Shell::DeleteInstance(); | 110 ash::Shell::DeleteInstance(); |
| 111 ash::ShellContentState::DestroyInstance(); | 111 ash::ShellContentState::DestroyInstance(); |
| 112 } | 112 } |
| 113 } | 113 } |
| 114 | 114 |
| 115 } // namespace chrome | 115 } // namespace chrome |
| OLD | NEW |