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

Side by Side Diff: ash/shell.cc

Issue 2270173002: add stylus metrics (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: incorporate comments and rebase Created 4 years, 4 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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 #include "ash/display/display_color_manager_chromeos.h" 121 #include "ash/display/display_color_manager_chromeos.h"
122 #include "ash/display/display_error_observer_chromeos.h" 122 #include "ash/display/display_error_observer_chromeos.h"
123 #include "ash/display/projecting_observer_chromeos.h" 123 #include "ash/display/projecting_observer_chromeos.h"
124 #include "ash/display/resolution_notification_controller.h" 124 #include "ash/display/resolution_notification_controller.h"
125 #include "ash/display/screen_orientation_controller_chromeos.h" 125 #include "ash/display/screen_orientation_controller_chromeos.h"
126 #include "ash/sticky_keys/sticky_keys_controller.h" 126 #include "ash/sticky_keys/sticky_keys_controller.h"
127 #include "ash/system/chromeos/power/power_event_observer.h" 127 #include "ash/system/chromeos/power/power_event_observer.h"
128 #include "ash/system/chromeos/power/video_activity_notifier.h" 128 #include "ash/system/chromeos/power/video_activity_notifier.h"
129 #include "ash/touch/touch_transformer_controller.h" 129 #include "ash/touch/touch_transformer_controller.h"
130 #include "ash/virtual_keyboard_controller.h" 130 #include "ash/virtual_keyboard_controller.h"
131 #include "ash/wm/stylus_metrics_recorder.h"
131 #include "base/bind_helpers.h" 132 #include "base/bind_helpers.h"
132 #include "base/sys_info.h" 133 #include "base/sys_info.h"
133 #include "chromeos/audio/audio_a11y_controller.h" 134 #include "chromeos/audio/audio_a11y_controller.h"
134 #include "chromeos/dbus/dbus_thread_manager.h" 135 #include "chromeos/dbus/dbus_thread_manager.h"
135 #include "ui/chromeos/user_activity_power_manager_notifier.h" 136 #include "ui/chromeos/user_activity_power_manager_notifier.h"
136 #include "ui/display/chromeos/display_configurator.h" 137 #include "ui/display/chromeos/display_configurator.h"
137 138
138 #if defined(USE_X11) 139 #if defined(USE_X11)
139 #include "ui/display/chromeos/x11/native_display_delegate_x11.h" 140 #include "ui/display/chromeos/x11/native_display_delegate_x11.h"
140 #endif 141 #endif
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after
545 RemovePreTargetHandler(speech_feedback_handler_.get()); 546 RemovePreTargetHandler(speech_feedback_handler_.get());
546 speech_feedback_handler_.reset(); 547 speech_feedback_handler_.reset();
547 #endif 548 #endif
548 RemovePreTargetHandler(overlay_filter_.get()); 549 RemovePreTargetHandler(overlay_filter_.get());
549 RemovePreTargetHandler(accelerator_filter_.get()); 550 RemovePreTargetHandler(accelerator_filter_.get());
550 RemovePreTargetHandler(event_transformation_handler_.get()); 551 RemovePreTargetHandler(event_transformation_handler_.get());
551 RemovePreTargetHandler(toplevel_window_event_handler_.get()); 552 RemovePreTargetHandler(toplevel_window_event_handler_.get());
552 RemovePostTargetHandler(toplevel_window_event_handler_.get()); 553 RemovePostTargetHandler(toplevel_window_event_handler_.get());
553 RemovePreTargetHandler(system_gesture_filter_.get()); 554 RemovePreTargetHandler(system_gesture_filter_.get());
554 RemovePreTargetHandler(mouse_cursor_filter_.get()); 555 RemovePreTargetHandler(mouse_cursor_filter_.get());
556 #if defined(OS_CHROMEOS)
557 RemovePreTargetHandler(stylus_metrics_recorder_.get());
558 #endif
555 RemovePreTargetHandler(modality_filter_.get()); 559 RemovePreTargetHandler(modality_filter_.get());
556 560
557 // TooltipController is deleted with the Shell so removing its references. 561 // TooltipController is deleted with the Shell so removing its references.
558 RemovePreTargetHandler(tooltip_controller_.get()); 562 RemovePreTargetHandler(tooltip_controller_.get());
559 563
560 #if defined(OS_CHROMEOS) 564 #if defined(OS_CHROMEOS)
561 screen_orientation_controller_.reset(); 565 screen_orientation_controller_.reset();
562 #endif 566 #endif
563 567
564 // Destroy the virtual keyboard controller before the maximize mode controller 568 // Destroy the virtual keyboard controller before the maximize mode controller
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
633 #if defined(OS_CHROMEOS) 637 #if defined(OS_CHROMEOS)
634 resolution_notification_controller_.reset(); 638 resolution_notification_controller_.reset();
635 #endif 639 #endif
636 desktop_background_controller_.reset(); 640 desktop_background_controller_.reset();
637 screenshot_controller_.reset(); 641 screenshot_controller_.reset();
638 mouse_cursor_filter_.reset(); 642 mouse_cursor_filter_.reset();
639 modality_filter_.reset(); 643 modality_filter_.reset();
640 644
641 #if defined(OS_CHROMEOS) 645 #if defined(OS_CHROMEOS)
642 touch_transformer_controller_.reset(); 646 touch_transformer_controller_.reset();
643 #endif // defined(OS_CHROMEOS) 647 stylus_metrics_recorder_.reset();
644
645 #if defined(OS_CHROMEOS)
646 audio_a11y_controller_.reset(); 648 audio_a11y_controller_.reset();
647 #endif // defined(OS_CHROMEOS) 649 #endif // defined(OS_CHROMEOS)
648 650
649 // This also deletes all RootWindows. Note that we invoke Shutdown() on 651 // This also deletes all RootWindows. Note that we invoke Shutdown() on
650 // WindowTreeHostManager before resetting |window_tree_host_manager_|, since 652 // WindowTreeHostManager before resetting |window_tree_host_manager_|, since
651 // destruction 653 // destruction
652 // of its owned RootWindowControllers relies on the value. 654 // of its owned RootWindowControllers relies on the value.
653 display_manager_->CreateScreenForShutdown(); 655 display_manager_->CreateScreenForShutdown();
654 display_configuration_controller_.reset(); 656 display_configuration_controller_.reset();
655 657
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
857 859
858 drag_drop_controller_.reset(new DragDropController); 860 drag_drop_controller_.reset(new DragDropController);
859 // |screenshot_controller_| needs to be created (and prepended as a 861 // |screenshot_controller_| needs to be created (and prepended as a
860 // pre-target handler) at this point, because |mouse_cursor_filter_| needs to 862 // pre-target handler) at this point, because |mouse_cursor_filter_| needs to
861 // process mouse events prior to screenshot session. 863 // process mouse events prior to screenshot session.
862 // See http://crbug.com/459214 864 // See http://crbug.com/459214
863 screenshot_controller_.reset(new ScreenshotController()); 865 screenshot_controller_.reset(new ScreenshotController());
864 mouse_cursor_filter_.reset(new MouseCursorEventFilter()); 866 mouse_cursor_filter_.reset(new MouseCursorEventFilter());
865 PrependPreTargetHandler(mouse_cursor_filter_.get()); 867 PrependPreTargetHandler(mouse_cursor_filter_.get());
866 868
869 #if defined(OS_CHROMEOS)
870 // |stylus_metrics_recorder| records stylus metrics for certain events.
871 // It does not handle/consume any events, so prepend it as a pre-target hander
872 // before events are consumed elsewhere.
873 stylus_metrics_recorder_.reset(new StylusMetricsRecorder());
874 PrependPreTargetHandler(stylus_metrics_recorder_.get());
875 #endif
876
867 // Create Controllers that may need root window. 877 // Create Controllers that may need root window.
868 // TODO(oshima): Move as many controllers before creating 878 // TODO(oshima): Move as many controllers before creating
869 // RootWindowController as possible. 879 // RootWindowController as possible.
870 visibility_controller_.reset(new AshVisibilityController); 880 visibility_controller_.reset(new AshVisibilityController);
871 881
872 magnification_controller_.reset(MagnificationController::CreateInstance()); 882 magnification_controller_.reset(MagnificationController::CreateInstance());
873 wm_shell_->CreateMruWindowTracker(); 883 wm_shell_->CreateMruWindowTracker();
874 884
875 partial_magnification_controller_.reset(new PartialMagnificationController()); 885 partial_magnification_controller_.reset(new PartialMagnificationController());
876 886
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
1030 std::unique_ptr<ui::EventTargetIterator> Shell::GetChildIterator() const { 1040 std::unique_ptr<ui::EventTargetIterator> Shell::GetChildIterator() const {
1031 return std::unique_ptr<ui::EventTargetIterator>(); 1041 return std::unique_ptr<ui::EventTargetIterator>();
1032 } 1042 }
1033 1043
1034 ui::EventTargeter* Shell::GetEventTargeter() { 1044 ui::EventTargeter* Shell::GetEventTargeter() {
1035 NOTREACHED(); 1045 NOTREACHED();
1036 return nullptr; 1046 return nullptr;
1037 } 1047 }
1038 1048
1039 } // namespace ash 1049 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698