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

Side by Side Diff: ash/shell.cc

Issue 2331093002: UMA stats for stylus usage (Closed)
Patch Set: nit and rebase Created 4 years, 2 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/wm/stylus_metrics_recorder.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 (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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 #include "ash/display/display_color_manager_chromeos.h" 122 #include "ash/display/display_color_manager_chromeos.h"
123 #include "ash/display/display_error_observer_chromeos.h" 123 #include "ash/display/display_error_observer_chromeos.h"
124 #include "ash/display/projecting_observer_chromeos.h" 124 #include "ash/display/projecting_observer_chromeos.h"
125 #include "ash/display/resolution_notification_controller.h" 125 #include "ash/display/resolution_notification_controller.h"
126 #include "ash/display/screen_orientation_controller_chromeos.h" 126 #include "ash/display/screen_orientation_controller_chromeos.h"
127 #include "ash/sticky_keys/sticky_keys_controller.h" 127 #include "ash/sticky_keys/sticky_keys_controller.h"
128 #include "ash/system/chromeos/power/power_event_observer.h" 128 #include "ash/system/chromeos/power/power_event_observer.h"
129 #include "ash/system/chromeos/power/video_activity_notifier.h" 129 #include "ash/system/chromeos/power/video_activity_notifier.h"
130 #include "ash/touch/touch_transformer_controller.h" 130 #include "ash/touch/touch_transformer_controller.h"
131 #include "ash/virtual_keyboard_controller.h" 131 #include "ash/virtual_keyboard_controller.h"
132 #include "ash/wm/stylus_metrics_recorder.h"
133 #include "base/bind_helpers.h" 132 #include "base/bind_helpers.h"
134 #include "base/sys_info.h" 133 #include "base/sys_info.h"
135 #include "chromeos/audio/audio_a11y_controller.h" 134 #include "chromeos/audio/audio_a11y_controller.h"
136 #include "chromeos/dbus/dbus_thread_manager.h" 135 #include "chromeos/dbus/dbus_thread_manager.h"
137 #include "ui/chromeos/user_activity_power_manager_notifier.h" 136 #include "ui/chromeos/user_activity_power_manager_notifier.h"
138 #include "ui/display/chromeos/display_configurator.h" 137 #include "ui/display/chromeos/display_configurator.h"
139 138
140 #if defined(USE_X11) 139 #if defined(USE_X11)
141 #include "ui/display/chromeos/x11/native_display_delegate_x11.h" 140 #include "ui/display/chromeos/x11/native_display_delegate_x11.h"
142 #endif 141 #endif
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
461 RemovePreTargetHandler(speech_feedback_handler_.get()); 460 RemovePreTargetHandler(speech_feedback_handler_.get());
462 speech_feedback_handler_.reset(); 461 speech_feedback_handler_.reset();
463 #endif 462 #endif
464 RemovePreTargetHandler(overlay_filter_.get()); 463 RemovePreTargetHandler(overlay_filter_.get());
465 RemovePreTargetHandler(accelerator_filter_.get()); 464 RemovePreTargetHandler(accelerator_filter_.get());
466 RemovePreTargetHandler(event_transformation_handler_.get()); 465 RemovePreTargetHandler(event_transformation_handler_.get());
467 RemovePreTargetHandler(toplevel_window_event_handler_.get()); 466 RemovePreTargetHandler(toplevel_window_event_handler_.get());
468 RemovePostTargetHandler(toplevel_window_event_handler_.get()); 467 RemovePostTargetHandler(toplevel_window_event_handler_.get());
469 RemovePreTargetHandler(system_gesture_filter_.get()); 468 RemovePreTargetHandler(system_gesture_filter_.get());
470 RemovePreTargetHandler(mouse_cursor_filter_.get()); 469 RemovePreTargetHandler(mouse_cursor_filter_.get());
471 #if defined(OS_CHROMEOS)
472 RemovePreTargetHandler(stylus_metrics_recorder_.get());
473 #endif
474 RemovePreTargetHandler(modality_filter_.get()); 470 RemovePreTargetHandler(modality_filter_.get());
475 471
476 // TooltipController is deleted with the Shell so removing its references. 472 // TooltipController is deleted with the Shell so removing its references.
477 RemovePreTargetHandler(tooltip_controller_.get()); 473 RemovePreTargetHandler(tooltip_controller_.get());
478 474
479 #if defined(OS_CHROMEOS) 475 #if defined(OS_CHROMEOS)
480 screen_orientation_controller_.reset(); 476 screen_orientation_controller_.reset();
481 screen_layout_observer_.reset(); 477 screen_layout_observer_.reset();
482 #endif 478 #endif
483 479
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
552 548
553 #if defined(OS_CHROMEOS) 549 #if defined(OS_CHROMEOS)
554 resolution_notification_controller_.reset(); 550 resolution_notification_controller_.reset();
555 #endif 551 #endif
556 screenshot_controller_.reset(); 552 screenshot_controller_.reset();
557 mouse_cursor_filter_.reset(); 553 mouse_cursor_filter_.reset();
558 modality_filter_.reset(); 554 modality_filter_.reset();
559 555
560 #if defined(OS_CHROMEOS) 556 #if defined(OS_CHROMEOS)
561 touch_transformer_controller_.reset(); 557 touch_transformer_controller_.reset();
562 stylus_metrics_recorder_.reset();
563 audio_a11y_controller_.reset(); 558 audio_a11y_controller_.reset();
564 laser_pointer_controller_.reset(); 559 laser_pointer_controller_.reset();
565 partial_magnification_controller_.reset(); 560 partial_magnification_controller_.reset();
566 #endif // defined(OS_CHROMEOS) 561 #endif // defined(OS_CHROMEOS)
567 562
568 // This also deletes all RootWindows. Note that we invoke Shutdown() on 563 // This also deletes all RootWindows. Note that we invoke Shutdown() on
569 // WindowTreeHostManager before resetting |window_tree_host_manager_|, since 564 // WindowTreeHostManager before resetting |window_tree_host_manager_|, since
570 // destruction 565 // destruction
571 // of its owned RootWindowControllers relies on the value. 566 // of its owned RootWindowControllers relies on the value.
572 ScreenAsh::CreateScreenForShutdown(); 567 ScreenAsh::CreateScreenForShutdown();
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
765 760
766 drag_drop_controller_.reset(new DragDropController); 761 drag_drop_controller_.reset(new DragDropController);
767 // |screenshot_controller_| needs to be created (and prepended as a 762 // |screenshot_controller_| needs to be created (and prepended as a
768 // pre-target handler) at this point, because |mouse_cursor_filter_| needs to 763 // pre-target handler) at this point, because |mouse_cursor_filter_| needs to
769 // process mouse events prior to screenshot session. 764 // process mouse events prior to screenshot session.
770 // See http://crbug.com/459214 765 // See http://crbug.com/459214
771 screenshot_controller_.reset(new ScreenshotController()); 766 screenshot_controller_.reset(new ScreenshotController());
772 mouse_cursor_filter_.reset(new MouseCursorEventFilter()); 767 mouse_cursor_filter_.reset(new MouseCursorEventFilter());
773 PrependPreTargetHandler(mouse_cursor_filter_.get()); 768 PrependPreTargetHandler(mouse_cursor_filter_.get());
774 769
775 #if defined(OS_CHROMEOS)
776 // |stylus_metrics_recorder| records stylus metrics for certain events.
777 // It does not handle/consume any events, so prepend it as a pre-target hander
778 // before events are consumed elsewhere.
779 stylus_metrics_recorder_.reset(new StylusMetricsRecorder());
780 PrependPreTargetHandler(stylus_metrics_recorder_.get());
781 #endif
782
783 // Create Controllers that may need root window. 770 // Create Controllers that may need root window.
784 // TODO(oshima): Move as many controllers before creating 771 // TODO(oshima): Move as many controllers before creating
785 // RootWindowController as possible. 772 // RootWindowController as possible.
786 visibility_controller_.reset(new AshVisibilityController); 773 visibility_controller_.reset(new AshVisibilityController);
787 774
788 #if defined(OS_CHROMEOS) 775 #if defined(OS_CHROMEOS)
789 laser_pointer_controller_.reset(new LaserPointerController()); 776 laser_pointer_controller_.reset(new LaserPointerController());
790 partial_magnification_controller_.reset(new PartialMagnificationController()); 777 partial_magnification_controller_.reset(new PartialMagnificationController());
791 #endif 778 #endif
792 779
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
936 std::unique_ptr<ui::EventTargetIterator> Shell::GetChildIterator() const { 923 std::unique_ptr<ui::EventTargetIterator> Shell::GetChildIterator() const {
937 return std::unique_ptr<ui::EventTargetIterator>(); 924 return std::unique_ptr<ui::EventTargetIterator>();
938 } 925 }
939 926
940 ui::EventTargeter* Shell::GetEventTargeter() { 927 ui::EventTargeter* Shell::GetEventTargeter() {
941 NOTREACHED(); 928 NOTREACHED();
942 return nullptr; 929 return nullptr;
943 } 930 }
944 931
945 } // namespace ash 932 } // namespace ash
OLDNEW
« no previous file with comments | « ash/shell.h ('k') | ash/wm/stylus_metrics_recorder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698