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

Side by Side Diff: ash/shell.cc

Issue 2331093002: UMA stats for stylus usage (Closed)
Patch Set: Incorporate comments from xiyuan@ and mpearson@ 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 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"
132 #include "base/bind_helpers.h" 131 #include "base/bind_helpers.h"
133 #include "base/sys_info.h" 132 #include "base/sys_info.h"
134 #include "chromeos/audio/audio_a11y_controller.h" 133 #include "chromeos/audio/audio_a11y_controller.h"
135 #include "chromeos/dbus/dbus_thread_manager.h" 134 #include "chromeos/dbus/dbus_thread_manager.h"
136 #include "ui/chromeos/user_activity_power_manager_notifier.h" 135 #include "ui/chromeos/user_activity_power_manager_notifier.h"
137 #include "ui/display/chromeos/display_configurator.h" 136 #include "ui/display/chromeos/display_configurator.h"
138 137
139 #if defined(USE_X11) 138 #if defined(USE_X11)
140 #include "ui/display/chromeos/x11/native_display_delegate_x11.h" 139 #include "ui/display/chromeos/x11/native_display_delegate_x11.h"
141 #endif 140 #endif
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
460 RemovePreTargetHandler(speech_feedback_handler_.get()); 459 RemovePreTargetHandler(speech_feedback_handler_.get());
461 speech_feedback_handler_.reset(); 460 speech_feedback_handler_.reset();
462 #endif 461 #endif
463 RemovePreTargetHandler(overlay_filter_.get()); 462 RemovePreTargetHandler(overlay_filter_.get());
464 RemovePreTargetHandler(accelerator_filter_.get()); 463 RemovePreTargetHandler(accelerator_filter_.get());
465 RemovePreTargetHandler(event_transformation_handler_.get()); 464 RemovePreTargetHandler(event_transformation_handler_.get());
466 RemovePreTargetHandler(toplevel_window_event_handler_.get()); 465 RemovePreTargetHandler(toplevel_window_event_handler_.get());
467 RemovePostTargetHandler(toplevel_window_event_handler_.get()); 466 RemovePostTargetHandler(toplevel_window_event_handler_.get());
468 RemovePreTargetHandler(system_gesture_filter_.get()); 467 RemovePreTargetHandler(system_gesture_filter_.get());
469 RemovePreTargetHandler(mouse_cursor_filter_.get()); 468 RemovePreTargetHandler(mouse_cursor_filter_.get());
470 #if defined(OS_CHROMEOS)
471 RemovePreTargetHandler(stylus_metrics_recorder_.get());
472 #endif
473 RemovePreTargetHandler(modality_filter_.get()); 469 RemovePreTargetHandler(modality_filter_.get());
474 470
475 // TooltipController is deleted with the Shell so removing its references. 471 // TooltipController is deleted with the Shell so removing its references.
476 RemovePreTargetHandler(tooltip_controller_.get()); 472 RemovePreTargetHandler(tooltip_controller_.get());
477 473
478 #if defined(OS_CHROMEOS) 474 #if defined(OS_CHROMEOS)
479 screen_orientation_controller_.reset(); 475 screen_orientation_controller_.reset();
480 screen_layout_observer_.reset(); 476 screen_layout_observer_.reset();
481 #endif 477 #endif
482 478
(...skipping 69 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 #endif // defined(OS_CHROMEOS) 559 #endif // defined(OS_CHROMEOS)
565 560
566 // This also deletes all RootWindows. Note that we invoke Shutdown() on 561 // This also deletes all RootWindows. Note that we invoke Shutdown() on
567 // WindowTreeHostManager before resetting |window_tree_host_manager_|, since 562 // WindowTreeHostManager before resetting |window_tree_host_manager_|, since
568 // destruction 563 // destruction
569 // of its owned RootWindowControllers relies on the value. 564 // of its owned RootWindowControllers relies on the value.
570 ScreenAsh::CreateScreenForShutdown(); 565 ScreenAsh::CreateScreenForShutdown();
571 display_configuration_controller_.reset(); 566 display_configuration_controller_.reset();
572 567
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
763 758
764 drag_drop_controller_.reset(new DragDropController); 759 drag_drop_controller_.reset(new DragDropController);
765 // |screenshot_controller_| needs to be created (and prepended as a 760 // |screenshot_controller_| needs to be created (and prepended as a
766 // pre-target handler) at this point, because |mouse_cursor_filter_| needs to 761 // pre-target handler) at this point, because |mouse_cursor_filter_| needs to
767 // process mouse events prior to screenshot session. 762 // process mouse events prior to screenshot session.
768 // See http://crbug.com/459214 763 // See http://crbug.com/459214
769 screenshot_controller_.reset(new ScreenshotController()); 764 screenshot_controller_.reset(new ScreenshotController());
770 mouse_cursor_filter_.reset(new MouseCursorEventFilter()); 765 mouse_cursor_filter_.reset(new MouseCursorEventFilter());
771 PrependPreTargetHandler(mouse_cursor_filter_.get()); 766 PrependPreTargetHandler(mouse_cursor_filter_.get());
772 767
773 #if defined(OS_CHROMEOS)
774 // |stylus_metrics_recorder| records stylus metrics for certain events.
775 // It does not handle/consume any events, so prepend it as a pre-target hander
776 // before events are consumed elsewhere.
777 stylus_metrics_recorder_.reset(new StylusMetricsRecorder());
778 PrependPreTargetHandler(stylus_metrics_recorder_.get());
779 #endif
780
781 // Create Controllers that may need root window. 768 // Create Controllers that may need root window.
782 // TODO(oshima): Move as many controllers before creating 769 // TODO(oshima): Move as many controllers before creating
783 // RootWindowController as possible. 770 // RootWindowController as possible.
784 visibility_controller_.reset(new AshVisibilityController); 771 visibility_controller_.reset(new AshVisibilityController);
785 772
786 magnification_controller_.reset(MagnificationController::CreateInstance()); 773 magnification_controller_.reset(MagnificationController::CreateInstance());
787 wm_shell_->CreateMruWindowTracker(); 774 wm_shell_->CreateMruWindowTracker();
788 775
789 partial_magnification_controller_.reset(new PartialMagnificationController()); 776 partial_magnification_controller_.reset(new PartialMagnificationController());
790 777
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
931 std::unique_ptr<ui::EventTargetIterator> Shell::GetChildIterator() const { 918 std::unique_ptr<ui::EventTargetIterator> Shell::GetChildIterator() const {
932 return std::unique_ptr<ui::EventTargetIterator>(); 919 return std::unique_ptr<ui::EventTargetIterator>();
933 } 920 }
934 921
935 ui::EventTargeter* Shell::GetEventTargeter() { 922 ui::EventTargeter* Shell::GetEventTargeter() {
936 NOTREACHED(); 923 NOTREACHED();
937 return nullptr; 924 return nullptr;
938 } 925 }
939 926
940 } // namespace ash 927 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698