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

Side by Side Diff: ash/shell.cc

Issue 2311393004: Laser tool blocks events from propagating. (Closed)
Patch Set: Fixed patch set 2 errors. 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
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 "ash/shell.h" 5 #include "ash/shell.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 #include "ash/display/event_transformation_handler.h" 46 #include "ash/display/event_transformation_handler.h"
47 #include "ash/display/mouse_cursor_event_filter.h" 47 #include "ash/display/mouse_cursor_event_filter.h"
48 #include "ash/display/screen_ash.h" 48 #include "ash/display/screen_ash.h"
49 #include "ash/display/screen_position_controller.h" 49 #include "ash/display/screen_position_controller.h"
50 #include "ash/display/window_tree_host_manager.h" 50 #include "ash/display/window_tree_host_manager.h"
51 #include "ash/drag_drop/drag_drop_controller.h" 51 #include "ash/drag_drop/drag_drop_controller.h"
52 #include "ash/first_run/first_run_helper_impl.h" 52 #include "ash/first_run/first_run_helper_impl.h"
53 #include "ash/high_contrast/high_contrast_controller.h" 53 #include "ash/high_contrast/high_contrast_controller.h"
54 #include "ash/host/ash_window_tree_host_init_params.h" 54 #include "ash/host/ash_window_tree_host_init_params.h"
55 #include "ash/ime/input_method_event_handler.h" 55 #include "ash/ime/input_method_event_handler.h"
56 #include "ash/laser/laser_pointer_controller.h"
56 #include "ash/magnifier/magnification_controller.h" 57 #include "ash/magnifier/magnification_controller.h"
57 #include "ash/magnifier/partial_magnification_controller.h" 58 #include "ash/magnifier/partial_magnification_controller.h"
58 #include "ash/root_window_controller.h" 59 #include "ash/root_window_controller.h"
59 #include "ash/shell_init_params.h" 60 #include "ash/shell_init_params.h"
60 #include "ash/system/chromeos/screen_layout_observer.h" 61 #include "ash/system/chromeos/screen_layout_observer.h"
61 #include "ash/utility/screenshot_controller.h" 62 #include "ash/utility/screenshot_controller.h"
62 #include "ash/wm/ash_focus_rules.h" 63 #include "ash/wm/ash_focus_rules.h"
63 #include "ash/wm/ash_native_cursor_manager.h" 64 #include "ash/wm/ash_native_cursor_manager.h"
64 #include "ash/wm/event_client_impl.h" 65 #include "ash/wm/event_client_impl.h"
65 #include "ash/wm/immersive_handler_factory_ash.h" 66 #include "ash/wm/immersive_handler_factory_ash.h"
(...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after
559 // Destroy all child windows including widgets. 560 // Destroy all child windows including widgets.
560 window_tree_host_manager_->CloseChildWindows(); 561 window_tree_host_manager_->CloseChildWindows();
561 // MruWindowTracker must be destroyed after all windows have been deleted to 562 // MruWindowTracker must be destroyed after all windows have been deleted to
562 // avoid a possible crash when Shell is destroyed from a non-normal shutdown 563 // avoid a possible crash when Shell is destroyed from a non-normal shutdown
563 // path. (crbug.com/485438). 564 // path. (crbug.com/485438).
564 wm_shell_->DeleteMruWindowTracker(); 565 wm_shell_->DeleteMruWindowTracker();
565 566
566 // These need a valid Shell instance to clean up properly, so explicitly 567 // These need a valid Shell instance to clean up properly, so explicitly
567 // delete them before invalidating the instance. 568 // delete them before invalidating the instance.
568 // Alphabetical. TODO(oshima): sort. 569 // Alphabetical. TODO(oshima): sort.
570 laser_pointer_controller_.reset();
569 magnification_controller_.reset(); 571 magnification_controller_.reset();
570 partial_magnification_controller_.reset(); 572 partial_magnification_controller_.reset();
571 tooltip_controller_.reset(); 573 tooltip_controller_.reset();
572 event_client_.reset(); 574 event_client_.reset();
573 toplevel_window_event_handler_.reset(); 575 toplevel_window_event_handler_.reset();
574 visibility_controller_.reset(); 576 visibility_controller_.reset();
575 577
576 power_button_controller_.reset(); 578 power_button_controller_.reset();
577 lock_state_controller_.reset(); 579 lock_state_controller_.reset();
578 580
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
815 // before events are consumed elsewhere. 817 // before events are consumed elsewhere.
816 stylus_metrics_recorder_.reset(new StylusMetricsRecorder()); 818 stylus_metrics_recorder_.reset(new StylusMetricsRecorder());
817 PrependPreTargetHandler(stylus_metrics_recorder_.get()); 819 PrependPreTargetHandler(stylus_metrics_recorder_.get());
818 #endif 820 #endif
819 821
820 // Create Controllers that may need root window. 822 // Create Controllers that may need root window.
821 // TODO(oshima): Move as many controllers before creating 823 // TODO(oshima): Move as many controllers before creating
822 // RootWindowController as possible. 824 // RootWindowController as possible.
823 visibility_controller_.reset(new AshVisibilityController); 825 visibility_controller_.reset(new AshVisibilityController);
824 826
827 laser_pointer_controller_.reset(new LaserPointerController());
828
825 magnification_controller_.reset(MagnificationController::CreateInstance()); 829 magnification_controller_.reset(MagnificationController::CreateInstance());
826 wm_shell_->CreateMruWindowTracker(); 830 wm_shell_->CreateMruWindowTracker();
827 831
828 partial_magnification_controller_.reset(new PartialMagnificationController()); 832 partial_magnification_controller_.reset(new PartialMagnificationController());
829 833
830 autoclick_controller_.reset(AutoclickController::CreateInstance()); 834 autoclick_controller_.reset(AutoclickController::CreateInstance());
831 835
832 high_contrast_controller_.reset(new HighContrastController); 836 high_contrast_controller_.reset(new HighContrastController);
833 video_detector_.reset(new VideoDetector); 837 video_detector_.reset(new VideoDetector);
834 838
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
976 std::unique_ptr<ui::EventTargetIterator> Shell::GetChildIterator() const { 980 std::unique_ptr<ui::EventTargetIterator> Shell::GetChildIterator() const {
977 return std::unique_ptr<ui::EventTargetIterator>(); 981 return std::unique_ptr<ui::EventTargetIterator>();
978 } 982 }
979 983
980 ui::EventTargeter* Shell::GetEventTargeter() { 984 ui::EventTargeter* Shell::GetEventTargeter() {
981 NOTREACHED(); 985 NOTREACHED();
982 return nullptr; 986 return nullptr;
983 } 987 }
984 988
985 } // namespace ash 989 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698