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

Side by Side Diff: ash/shell.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/shell.h ('k') | ash/shell/shell_delegate_impl.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 (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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 #include "ash/display/display_manager.h" 45 #include "ash/display/display_manager.h"
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_position_controller.h" 48 #include "ash/display/screen_position_controller.h"
49 #include "ash/display/window_tree_host_manager.h" 49 #include "ash/display/window_tree_host_manager.h"
50 #include "ash/drag_drop/drag_drop_controller.h" 50 #include "ash/drag_drop/drag_drop_controller.h"
51 #include "ash/first_run/first_run_helper_impl.h" 51 #include "ash/first_run/first_run_helper_impl.h"
52 #include "ash/high_contrast/high_contrast_controller.h" 52 #include "ash/high_contrast/high_contrast_controller.h"
53 #include "ash/host/ash_window_tree_host_init_params.h" 53 #include "ash/host/ash_window_tree_host_init_params.h"
54 #include "ash/ime/input_method_event_handler.h" 54 #include "ash/ime/input_method_event_handler.h"
55 #include "ash/laser/laser_pointer_controller.h"
55 #include "ash/magnifier/magnification_controller.h" 56 #include "ash/magnifier/magnification_controller.h"
56 #include "ash/magnifier/partial_magnification_controller.h" 57 #include "ash/magnifier/partial_magnification_controller.h"
57 #include "ash/root_window_controller.h" 58 #include "ash/root_window_controller.h"
58 #include "ash/shell_init_params.h" 59 #include "ash/shell_init_params.h"
59 #include "ash/utility/screenshot_controller.h" 60 #include "ash/utility/screenshot_controller.h"
60 #include "ash/wm/ash_focus_rules.h" 61 #include "ash/wm/ash_focus_rules.h"
61 #include "ash/wm/ash_native_cursor_manager.h" 62 #include "ash/wm/ash_native_cursor_manager.h"
62 #include "ash/wm/event_client_impl.h" 63 #include "ash/wm/event_client_impl.h"
63 #include "ash/wm/immersive_handler_factory_ash.h" 64 #include "ash/wm/immersive_handler_factory_ash.h"
64 #include "ash/wm/lock_state_controller.h" 65 #include "ash/wm/lock_state_controller.h"
(...skipping 551 matching lines...) Expand 10 before | Expand all | Expand 10 after
616 window_tree_host_manager_->CloseChildWindows(); 617 window_tree_host_manager_->CloseChildWindows();
617 // MruWindowTracker must be destroyed after all windows have been deleted to 618 // MruWindowTracker must be destroyed after all windows have been deleted to
618 // avoid a possible crash when Shell is destroyed from a non-normal shutdown 619 // avoid a possible crash when Shell is destroyed from a non-normal shutdown
619 // path. (crbug.com/485438). 620 // path. (crbug.com/485438).
620 wm_shell_->DeleteMruWindowTracker(); 621 wm_shell_->DeleteMruWindowTracker();
621 622
622 // These need a valid Shell instance to clean up properly, so explicitly 623 // These need a valid Shell instance to clean up properly, so explicitly
623 // delete them before invalidating the instance. 624 // delete them before invalidating the instance.
624 // Alphabetical. TODO(oshima): sort. 625 // Alphabetical. TODO(oshima): sort.
625 magnification_controller_.reset(); 626 magnification_controller_.reset();
626 partial_magnification_controller_.reset();
627 tooltip_controller_.reset(); 627 tooltip_controller_.reset();
628 event_client_.reset(); 628 event_client_.reset();
629 toplevel_window_event_handler_.reset(); 629 toplevel_window_event_handler_.reset();
630 visibility_controller_.reset(); 630 visibility_controller_.reset();
631 631
632 power_button_controller_.reset(); 632 power_button_controller_.reset();
633 lock_state_controller_.reset(); 633 lock_state_controller_.reset();
634 634
635 screen_pinning_controller_.reset(); 635 screen_pinning_controller_.reset();
636 636
637 #if defined(OS_CHROMEOS) 637 #if defined(OS_CHROMEOS)
638 resolution_notification_controller_.reset(); 638 resolution_notification_controller_.reset();
639 #endif 639 #endif
640 desktop_background_controller_.reset(); 640 desktop_background_controller_.reset();
641 screenshot_controller_.reset(); 641 screenshot_controller_.reset();
642 mouse_cursor_filter_.reset(); 642 mouse_cursor_filter_.reset();
643 modality_filter_.reset(); 643 modality_filter_.reset();
644 644
645 #if defined(OS_CHROMEOS) 645 #if defined(OS_CHROMEOS)
646 touch_transformer_controller_.reset(); 646 touch_transformer_controller_.reset();
647 stylus_metrics_recorder_.reset(); 647 stylus_metrics_recorder_.reset();
648 audio_a11y_controller_.reset(); 648 audio_a11y_controller_.reset();
649 laser_pointer_controller_.reset();
650 partial_magnification_controller_.reset();
649 #endif // defined(OS_CHROMEOS) 651 #endif // defined(OS_CHROMEOS)
650 652
651 // This also deletes all RootWindows. Note that we invoke Shutdown() on 653 // This also deletes all RootWindows. Note that we invoke Shutdown() on
652 // WindowTreeHostManager before resetting |window_tree_host_manager_|, since 654 // WindowTreeHostManager before resetting |window_tree_host_manager_|, since
653 // destruction 655 // destruction
654 // of its owned RootWindowControllers relies on the value. 656 // of its owned RootWindowControllers relies on the value.
655 display_manager_->CreateScreenForShutdown(); 657 display_manager_->CreateScreenForShutdown();
656 display_configuration_controller_.reset(); 658 display_configuration_controller_.reset();
657 659
658 wm_shell_->Shutdown(); 660 wm_shell_->Shutdown();
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
872 // before events are consumed elsewhere. 874 // before events are consumed elsewhere.
873 stylus_metrics_recorder_.reset(new StylusMetricsRecorder()); 875 stylus_metrics_recorder_.reset(new StylusMetricsRecorder());
874 PrependPreTargetHandler(stylus_metrics_recorder_.get()); 876 PrependPreTargetHandler(stylus_metrics_recorder_.get());
875 #endif 877 #endif
876 878
877 // Create Controllers that may need root window. 879 // Create Controllers that may need root window.
878 // TODO(oshima): Move as many controllers before creating 880 // TODO(oshima): Move as many controllers before creating
879 // RootWindowController as possible. 881 // RootWindowController as possible.
880 visibility_controller_.reset(new AshVisibilityController); 882 visibility_controller_.reset(new AshVisibilityController);
881 883
884 #if defined(OS_CHROMEOS)
885 laser_pointer_controller_.reset(new LaserPointerController());
886 partial_magnification_controller_.reset(new PartialMagnificationController());
887 #endif
888
882 magnification_controller_.reset(MagnificationController::CreateInstance()); 889 magnification_controller_.reset(MagnificationController::CreateInstance());
883 wm_shell_->CreateMruWindowTracker(); 890 wm_shell_->CreateMruWindowTracker();
884 891
885 partial_magnification_controller_.reset(new PartialMagnificationController());
886
887 autoclick_controller_.reset(AutoclickController::CreateInstance()); 892 autoclick_controller_.reset(AutoclickController::CreateInstance());
888 893
889 high_contrast_controller_.reset(new HighContrastController); 894 high_contrast_controller_.reset(new HighContrastController);
890 video_detector_.reset(new VideoDetector); 895 video_detector_.reset(new VideoDetector);
891 896
892 tooltip_controller_.reset(new views::corewm::TooltipController( 897 tooltip_controller_.reset(new views::corewm::TooltipController(
893 std::unique_ptr<views::corewm::Tooltip>(new views::corewm::TooltipAura))); 898 std::unique_ptr<views::corewm::Tooltip>(new views::corewm::TooltipAura)));
894 AddPreTargetHandler(tooltip_controller_.get()); 899 AddPreTargetHandler(tooltip_controller_.get());
895 900
896 modality_filter_.reset(new SystemModalContainerEventFilter(this)); 901 modality_filter_.reset(new SystemModalContainerEventFilter(this));
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
1036 std::unique_ptr<ui::EventTargetIterator> Shell::GetChildIterator() const { 1041 std::unique_ptr<ui::EventTargetIterator> Shell::GetChildIterator() const {
1037 return std::unique_ptr<ui::EventTargetIterator>(); 1042 return std::unique_ptr<ui::EventTargetIterator>();
1038 } 1043 }
1039 1044
1040 ui::EventTargeter* Shell::GetEventTargeter() { 1045 ui::EventTargeter* Shell::GetEventTargeter() {
1041 NOTREACHED(); 1046 NOTREACHED();
1042 return nullptr; 1047 return nullptr;
1043 } 1048 }
1044 1049
1045 } // namespace ash 1050 } // namespace ash
OLDNEW
« no previous file with comments | « ash/shell.h ('k') | ash/shell/shell_delegate_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698