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

Side by Side Diff: ash/mus/bridge/shell_port_mash.cc

Issue 2815043002: Removes ShellPort::IsRunningInMash() (Closed)
Patch Set: dont set instance_ in constructor Created 3 years, 8 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
« no previous file with comments | « ash/mus/bridge/shell_port_mash.h ('k') | ash/root_window_controller.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "ash/mus/bridge/shell_port_mash.h" 5 #include "ash/mus/bridge/shell_port_mash.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "ash/accelerators/accelerator_controller.h" 9 #include "ash/accelerators/accelerator_controller.h"
10 #include "ash/accelerators/accelerator_controller_delegate_aura.h" 10 #include "ash/accelerators/accelerator_controller_delegate_aura.h"
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 147
148 void ShellPortMash::Shutdown() { 148 void ShellPortMash::Shutdown() {
149 if (mus_state_) 149 if (mus_state_)
150 mus_state_->pointer_watcher_adapter.reset(); 150 mus_state_->pointer_watcher_adapter.reset();
151 151
152 ShellPort::Shutdown(); 152 ShellPort::Shutdown();
153 153
154 window_manager_->DeleteAllRootWindowControllers(); 154 window_manager_->DeleteAllRootWindowControllers();
155 } 155 }
156 156
157 bool ShellPortMash::IsRunningInMash() const {
158 return GetAshConfig() == Config::MASH;
159 }
160
161 Config ShellPortMash::GetAshConfig() const { 157 Config ShellPortMash::GetAshConfig() const {
162 return window_manager_->config(); 158 return window_manager_->config();
163 } 159 }
164 160
165 WmWindow* ShellPortMash::GetPrimaryRootWindow() { 161 WmWindow* ShellPortMash::GetPrimaryRootWindow() {
166 // NOTE: This is called before the RootWindowController has been created, so 162 // NOTE: This is called before the RootWindowController has been created, so
167 // it can't call through to RootWindowController to get all windows. 163 // it can't call through to RootWindowController to get all windows.
168 return primary_root_window_; 164 return primary_root_window_;
169 } 165 }
170 166
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
458 mash_state_->accelerator_controller_registrar = 454 mash_state_->accelerator_controller_registrar =
459 base ::MakeUnique<AcceleratorControllerRegistrar>( 455 base ::MakeUnique<AcceleratorControllerRegistrar>(
460 window_manager_, accelerator_namespace_id); 456 window_manager_, accelerator_namespace_id);
461 return base::MakeUnique<AcceleratorController>( 457 return base::MakeUnique<AcceleratorController>(
462 mash_state_->accelerator_controller_delegate.get(), 458 mash_state_->accelerator_controller_delegate.get(),
463 mash_state_->accelerator_controller_registrar.get()); 459 mash_state_->accelerator_controller_registrar.get());
464 } 460 }
465 461
466 } // namespace mus 462 } // namespace mus
467 } // namespace ash 463 } // namespace ash
OLDNEW
« no previous file with comments | « ash/mus/bridge/shell_port_mash.h ('k') | ash/root_window_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698