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

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

Issue 2311393004: Laser tool blocks events from propagating. (Closed)
Patch Set: Nit. Created 4 years, 3 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/palette_delegate.h » ('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/pointer_watcher_adapter.h" 9 #include "ash/aura/pointer_watcher_adapter.h"
10 #include "ash/aura/wm_window_aura.h" 10 #include "ash/aura/wm_window_aura.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/display/display_manager.h" 19 #include "ash/display/display_manager.h"
20 #include "ash/display/window_tree_host_manager.h" 20 #include "ash/display/window_tree_host_manager.h"
21 #include "ash/laser/laser_pointer_controller.h"
21 #include "ash/metrics/task_switch_metrics_recorder.h" 22 #include "ash/metrics/task_switch_metrics_recorder.h"
22 #include "ash/shared/immersive_fullscreen_controller.h" 23 #include "ash/shared/immersive_fullscreen_controller.h"
23 #include "ash/shell.h" 24 #include "ash/shell.h"
24 #include "ash/touch/touch_uma.h" 25 #include "ash/touch/touch_uma.h"
25 #include "ash/wm/drag_window_resizer.h" 26 #include "ash/wm/drag_window_resizer.h"
26 #include "ash/wm/maximize_mode/maximize_mode_event_handler_aura.h" 27 #include "ash/wm/maximize_mode/maximize_mode_event_handler_aura.h"
27 #include "ash/wm/screen_pinning_controller.h" 28 #include "ash/wm/screen_pinning_controller.h"
28 #include "ash/wm/window_cycle_event_filter_aura.h" 29 #include "ash/wm/window_cycle_event_filter_aura.h"
29 #include "ash/wm/window_util.h" 30 #include "ash/wm/window_util.h"
30 #include "ash/wm/workspace/workspace_event_handler_aura.h" 31 #include "ash/wm/workspace/workspace_event_handler_aura.h"
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 bool WmShellAura::IsTouchDown() { 272 bool WmShellAura::IsTouchDown() {
272 return aura::Env::GetInstance()->is_touch_down(); 273 return aura::Env::GetInstance()->is_touch_down();
273 } 274 }
274 275
275 #if defined(OS_CHROMEOS) 276 #if defined(OS_CHROMEOS)
276 void WmShellAura::ToggleIgnoreExternalKeyboard() { 277 void WmShellAura::ToggleIgnoreExternalKeyboard() {
277 Shell::GetInstance() 278 Shell::GetInstance()
278 ->virtual_keyboard_controller() 279 ->virtual_keyboard_controller()
279 ->ToggleIgnoreExternalKeyboard(); 280 ->ToggleIgnoreExternalKeyboard();
280 } 281 }
282
283 void WmShellAura::SetLaserPointerEnabled(bool enabled) {
284 Shell::GetInstance()->laser_pointer_controller()->SetEnabled(enabled);
285 }
281 #endif 286 #endif
282 287
283 void WmShellAura::OnWindowActivated( 288 void WmShellAura::OnWindowActivated(
284 aura::client::ActivationChangeObserver::ActivationReason reason, 289 aura::client::ActivationChangeObserver::ActivationReason reason,
285 aura::Window* gained_active, 290 aura::Window* gained_active,
286 aura::Window* lost_active) { 291 aura::Window* lost_active) {
287 WmWindow* gained_active_wm = WmWindowAura::Get(gained_active); 292 WmWindow* gained_active_wm = WmWindowAura::Get(gained_active);
288 WmWindow* lost_active_wm = WmWindowAura::Get(lost_active); 293 WmWindow* lost_active_wm = WmWindowAura::Get(lost_active);
289 if (gained_active_wm) 294 if (gained_active_wm)
290 set_root_window_for_new_windows(gained_active_wm->GetRootWindow()); 295 set_root_window_for_new_windows(gained_active_wm->GetRootWindow());
(...skipping 13 matching lines...) Expand all
304 FOR_EACH_OBSERVER(WmDisplayObserver, display_observers_, 309 FOR_EACH_OBSERVER(WmDisplayObserver, display_observers_,
305 OnDisplayConfigurationChanging()); 310 OnDisplayConfigurationChanging());
306 } 311 }
307 312
308 void WmShellAura::OnDisplayConfigurationChanged() { 313 void WmShellAura::OnDisplayConfigurationChanged() {
309 FOR_EACH_OBSERVER(WmDisplayObserver, display_observers_, 314 FOR_EACH_OBSERVER(WmDisplayObserver, display_observers_,
310 OnDisplayConfigurationChanged()); 315 OnDisplayConfigurationChanged());
311 } 316 }
312 317
313 } // namespace ash 318 } // namespace ash
OLDNEW
« no previous file with comments | « ash/aura/wm_shell_aura.h ('k') | ash/common/palette_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698