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

Side by Side Diff: ash/aura/wm_shell_aura.cc

Issue 2652093002: mash: Make the power button shut the system down. (Closed)
Patch Set: add comment about CursorManager Created 3 years, 11 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/aura/wm_shell_aura.h ('k') | ash/common/system/date/date_default_view.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/aura/wm_shell_aura.h" 5 #include "ash/aura/wm_shell_aura.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "ash/aura/key_event_watcher_aura.h" 9 #include "ash/aura/key_event_watcher_aura.h"
10 #include "ash/aura/pointer_watcher_adapter.h" 10 #include "ash/aura/pointer_watcher_adapter.h"
11 #include "ash/common/session/session_state_delegate.h" 11 #include "ash/common/session/session_state_delegate.h"
12 #include "ash/common/shell_delegate.h" 12 #include "ash/common/shell_delegate.h"
13 #include "ash/common/shell_observer.h" 13 #include "ash/common/shell_observer.h"
14 #include "ash/common/wm/maximize_mode/scoped_disable_internal_mouse_and_keyboard .h" 14 #include "ash/common/wm/maximize_mode/scoped_disable_internal_mouse_and_keyboard .h"
15 #include "ash/common/wm/mru_window_tracker.h" 15 #include "ash/common/wm/mru_window_tracker.h"
16 #include "ash/common/wm/overview/window_selector_controller.h" 16 #include "ash/common/wm/overview/window_selector_controller.h"
17 #include "ash/common/wm_activation_observer.h" 17 #include "ash/common/wm_activation_observer.h"
18 #include "ash/common/wm_display_observer.h" 18 #include "ash/common/wm_display_observer.h"
19 #include "ash/common/wm_window.h" 19 #include "ash/common/wm_window.h"
20 #include "ash/display/window_tree_host_manager.h" 20 #include "ash/display/window_tree_host_manager.h"
21 #include "ash/host/ash_window_tree_host_init_params.h" 21 #include "ash/host/ash_window_tree_host_init_params.h"
22 #include "ash/laser/laser_pointer_controller.h" 22 #include "ash/laser/laser_pointer_controller.h"
23 #include "ash/metrics/task_switch_metrics_recorder.h" 23 #include "ash/metrics/task_switch_metrics_recorder.h"
24 #include "ash/shared/immersive_fullscreen_controller.h" 24 #include "ash/shared/immersive_fullscreen_controller.h"
25 #include "ash/shell.h" 25 #include "ash/shell.h"
26 #include "ash/touch/touch_uma.h" 26 #include "ash/touch/touch_uma.h"
27 #include "ash/virtual_keyboard_controller.h" 27 #include "ash/virtual_keyboard_controller.h"
28 #include "ash/wm/drag_window_resizer.h" 28 #include "ash/wm/drag_window_resizer.h"
29 #include "ash/wm/lock_state_controller.h"
30 #include "ash/wm/maximize_mode/maximize_mode_event_handler_aura.h" 29 #include "ash/wm/maximize_mode/maximize_mode_event_handler_aura.h"
31 #include "ash/wm/screen_pinning_controller.h" 30 #include "ash/wm/screen_pinning_controller.h"
32 #include "ash/wm/window_cycle_event_filter_aura.h" 31 #include "ash/wm/window_cycle_event_filter_aura.h"
33 #include "ash/wm/window_util.h" 32 #include "ash/wm/window_util.h"
34 #include "ash/wm/workspace/workspace_event_handler_aura.h" 33 #include "ash/wm/workspace/workspace_event_handler_aura.h"
35 #include "base/memory/ptr_util.h" 34 #include "base/memory/ptr_util.h"
36 #include "ui/aura/client/capture_client.h" 35 #include "ui/aura/client/capture_client.h"
37 #include "ui/aura/client/focus_client.h" 36 #include "ui/aura/client/focus_client.h"
38 #include "ui/aura/env.h" 37 #include "ui/aura/env.h"
39 #include "ui/display/manager/display_manager.h" 38 #include "ui/display/manager/display_manager.h"
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 255
257 void WmShellAura::AddPointerWatcher(views::PointerWatcher* watcher, 256 void WmShellAura::AddPointerWatcher(views::PointerWatcher* watcher,
258 views::PointerWatcherEventTypes events) { 257 views::PointerWatcherEventTypes events) {
259 pointer_watcher_adapter_->AddPointerWatcher(watcher, events); 258 pointer_watcher_adapter_->AddPointerWatcher(watcher, events);
260 } 259 }
261 260
262 void WmShellAura::RemovePointerWatcher(views::PointerWatcher* watcher) { 261 void WmShellAura::RemovePointerWatcher(views::PointerWatcher* watcher) {
263 pointer_watcher_adapter_->RemovePointerWatcher(watcher); 262 pointer_watcher_adapter_->RemovePointerWatcher(watcher);
264 } 263 }
265 264
266 void WmShellAura::RequestShutdown() {
267 Shell::GetInstance()->lock_state_controller()->RequestShutdown();
268 }
269
270 bool WmShellAura::IsTouchDown() { 265 bool WmShellAura::IsTouchDown() {
271 return aura::Env::GetInstance()->is_touch_down(); 266 return aura::Env::GetInstance()->is_touch_down();
272 } 267 }
273 268
274 void WmShellAura::ToggleIgnoreExternalKeyboard() { 269 void WmShellAura::ToggleIgnoreExternalKeyboard() {
275 Shell::GetInstance() 270 Shell::GetInstance()
276 ->virtual_keyboard_controller() 271 ->virtual_keyboard_controller()
277 ->ToggleIgnoreExternalKeyboard(); 272 ->ToggleIgnoreExternalKeyboard();
278 } 273 }
279 274
(...skipping 29 matching lines...) Expand all
309 for (auto& observer : display_observers_) 304 for (auto& observer : display_observers_)
310 observer.OnDisplayConfigurationChanging(); 305 observer.OnDisplayConfigurationChanging();
311 } 306 }
312 307
313 void WmShellAura::OnDisplayConfigurationChanged() { 308 void WmShellAura::OnDisplayConfigurationChanged() {
314 for (auto& observer : display_observers_) 309 for (auto& observer : display_observers_)
315 observer.OnDisplayConfigurationChanged(); 310 observer.OnDisplayConfigurationChanged();
316 } 311 }
317 312
318 } // namespace ash 313 } // namespace ash
OLDNEW
« no previous file with comments | « ash/aura/wm_shell_aura.h ('k') | ash/common/system/date/date_default_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698