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

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

Issue 2361563002: chromeos: Laser tool blocks events from propagating. (Closed)
Patch Set: 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 "base/memory/ptr_util.h" 31 #include "base/memory/ptr_util.h"
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 bool WmShellAura::IsTouchDown() { 268 bool WmShellAura::IsTouchDown() {
268 return aura::Env::GetInstance()->is_touch_down(); 269 return aura::Env::GetInstance()->is_touch_down();
269 } 270 }
270 271
271 #if defined(OS_CHROMEOS) 272 #if defined(OS_CHROMEOS)
272 void WmShellAura::ToggleIgnoreExternalKeyboard() { 273 void WmShellAura::ToggleIgnoreExternalKeyboard() {
273 Shell::GetInstance() 274 Shell::GetInstance()
274 ->virtual_keyboard_controller() 275 ->virtual_keyboard_controller()
275 ->ToggleIgnoreExternalKeyboard(); 276 ->ToggleIgnoreExternalKeyboard();
276 } 277 }
278
279 void WmShellAura::SetLaserPointerEnabled(bool enabled) {
280 Shell::GetInstance()->laser_pointer_controller()->SetEnabled(enabled);
281 }
277 #endif 282 #endif
278 283
279 void WmShellAura::OnWindowActivated( 284 void WmShellAura::OnWindowActivated(
280 aura::client::ActivationChangeObserver::ActivationReason reason, 285 aura::client::ActivationChangeObserver::ActivationReason reason,
281 aura::Window* gained_active, 286 aura::Window* gained_active,
282 aura::Window* lost_active) { 287 aura::Window* lost_active) {
283 WmWindow* gained_active_wm = WmWindowAura::Get(gained_active); 288 WmWindow* gained_active_wm = WmWindowAura::Get(gained_active);
284 WmWindow* lost_active_wm = WmWindowAura::Get(lost_active); 289 WmWindow* lost_active_wm = WmWindowAura::Get(lost_active);
285 if (gained_active_wm) 290 if (gained_active_wm)
286 set_root_window_for_new_windows(gained_active_wm->GetRootWindow()); 291 set_root_window_for_new_windows(gained_active_wm->GetRootWindow());
(...skipping 13 matching lines...) Expand all
300 FOR_EACH_OBSERVER(WmDisplayObserver, display_observers_, 305 FOR_EACH_OBSERVER(WmDisplayObserver, display_observers_,
301 OnDisplayConfigurationChanging()); 306 OnDisplayConfigurationChanging());
302 } 307 }
303 308
304 void WmShellAura::OnDisplayConfigurationChanged() { 309 void WmShellAura::OnDisplayConfigurationChanged() {
305 FOR_EACH_OBSERVER(WmDisplayObserver, display_observers_, 310 FOR_EACH_OBSERVER(WmDisplayObserver, display_observers_,
306 OnDisplayConfigurationChanged()); 311 OnDisplayConfigurationChanged());
307 } 312 }
308 313
309 } // namespace ash 314 } // 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