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

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: 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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 #endif // defined(OS_CHROMEOS)
644 648
645 #if defined(OS_CHROMEOS) 649 #if defined(OS_CHROMEOS)
650 stylus_metrics_recorder_.reset();
651 #endif // defined(OS_CHROMEOS)
oshima 2016/08/23 21:40:57 Please put then in the single OS_CHROMEOS. (It pro
xiaoyinh(OOO Sep 11-29) 2016/08/23 22:43:01 I have grouped the neighbors into single OS_CHROME
652
653 #if defined(OS_CHROMEOS)
646 audio_a11y_controller_.reset(); 654 audio_a11y_controller_.reset();
647 #endif // defined(OS_CHROMEOS) 655 #endif // defined(OS_CHROMEOS)
648 656
649 // This also deletes all RootWindows. Note that we invoke Shutdown() on 657 // This also deletes all RootWindows. Note that we invoke Shutdown() on
650 // WindowTreeHostManager before resetting |window_tree_host_manager_|, since 658 // WindowTreeHostManager before resetting |window_tree_host_manager_|, since
651 // destruction 659 // destruction
652 // of its owned RootWindowControllers relies on the value. 660 // of its owned RootWindowControllers relies on the value.
653 display_manager_->CreateScreenForShutdown(); 661 display_manager_->CreateScreenForShutdown();
654 display_configuration_controller_.reset(); 662 display_configuration_controller_.reset();
655 663
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
857 865
858 drag_drop_controller_.reset(new DragDropController); 866 drag_drop_controller_.reset(new DragDropController);
859 // |screenshot_controller_| needs to be created (and prepended as a 867 // |screenshot_controller_| needs to be created (and prepended as a
860 // pre-target handler) at this point, because |mouse_cursor_filter_| needs to 868 // pre-target handler) at this point, because |mouse_cursor_filter_| needs to
861 // process mouse events prior to screenshot session. 869 // process mouse events prior to screenshot session.
862 // See http://crbug.com/459214 870 // See http://crbug.com/459214
863 screenshot_controller_.reset(new ScreenshotController()); 871 screenshot_controller_.reset(new ScreenshotController());
864 mouse_cursor_filter_.reset(new MouseCursorEventFilter()); 872 mouse_cursor_filter_.reset(new MouseCursorEventFilter());
865 PrependPreTargetHandler(mouse_cursor_filter_.get()); 873 PrependPreTargetHandler(mouse_cursor_filter_.get());
866 874
875 #if defined(OS_CHROMEOS)
876 // |stylus_metrics_recorder| records stylus metrics for certain events.
877 // It does not handle/consume any events, so prepend it as a pre-target hander
878 // before events are consumed elsewhere.
879 stylus_metrics_recorder_.reset(new StylusMetricsRecorder());
880 PrependPreTargetHandler(stylus_metrics_recorder_.get());
881 #endif
882
867 // Create Controllers that may need root window. 883 // Create Controllers that may need root window.
868 // TODO(oshima): Move as many controllers before creating 884 // TODO(oshima): Move as many controllers before creating
869 // RootWindowController as possible. 885 // RootWindowController as possible.
870 visibility_controller_.reset(new AshVisibilityController); 886 visibility_controller_.reset(new AshVisibilityController);
871 887
872 magnification_controller_.reset(MagnificationController::CreateInstance()); 888 magnification_controller_.reset(MagnificationController::CreateInstance());
873 wm_shell_->CreateMruWindowTracker(); 889 wm_shell_->CreateMruWindowTracker();
874 890
875 partial_magnification_controller_.reset(new PartialMagnificationController()); 891 partial_magnification_controller_.reset(new PartialMagnificationController());
876 892
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
1030 std::unique_ptr<ui::EventTargetIterator> Shell::GetChildIterator() const { 1046 std::unique_ptr<ui::EventTargetIterator> Shell::GetChildIterator() const {
1031 return std::unique_ptr<ui::EventTargetIterator>(); 1047 return std::unique_ptr<ui::EventTargetIterator>();
1032 } 1048 }
1033 1049
1034 ui::EventTargeter* Shell::GetEventTargeter() { 1050 ui::EventTargeter* Shell::GetEventTargeter() {
1035 NOTREACHED(); 1051 NOTREACHED();
1036 return nullptr; 1052 return nullptr;
1037 } 1053 }
1038 1054
1039 } // namespace ash 1055 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698