Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(44)

Side by Side Diff: chrome/browser/ui/ash/ash_init.cc

Issue 2059963002: Mustash implementation of ChromeLauncherController. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@launcher_controller_mus_5
Patch Set: Addressing feedback. Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « chrome/browser/ui/BUILD.gn ('k') | chrome/browser/ui/ash/launcher/chrome_launcher_controller_mus.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698