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

Side by Side Diff: ash/shell.cc

Issue 1921673005: mus: Add PointerWatcher for passively observing mouse and touch events (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 7 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.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 19 matching lines...) Expand all
30 #include "ash/gpu_support.h" 30 #include "ash/gpu_support.h"
31 #include "ash/high_contrast/high_contrast_controller.h" 31 #include "ash/high_contrast/high_contrast_controller.h"
32 #include "ash/host/ash_window_tree_host_init_params.h" 32 #include "ash/host/ash_window_tree_host_init_params.h"
33 #include "ash/ime/input_method_event_handler.h" 33 #include "ash/ime/input_method_event_handler.h"
34 #include "ash/keyboard/keyboard_ui.h" 34 #include "ash/keyboard/keyboard_ui.h"
35 #include "ash/keyboard_uma_event_filter.h" 35 #include "ash/keyboard_uma_event_filter.h"
36 #include "ash/magnifier/magnification_controller.h" 36 #include "ash/magnifier/magnification_controller.h"
37 #include "ash/magnifier/partial_magnification_controller.h" 37 #include "ash/magnifier/partial_magnification_controller.h"
38 #include "ash/media_delegate.h" 38 #include "ash/media_delegate.h"
39 #include "ash/new_window_delegate.h" 39 #include "ash/new_window_delegate.h"
40 #include "ash/pointer_watcher_delegate.h"
40 #include "ash/root_window_controller.h" 41 #include "ash/root_window_controller.h"
41 #include "ash/session/session_state_delegate.h" 42 #include "ash/session/session_state_delegate.h"
42 #include "ash/shelf/app_list_shelf_item_delegate.h" 43 #include "ash/shelf/app_list_shelf_item_delegate.h"
43 #include "ash/shelf/shelf.h" 44 #include "ash/shelf/shelf.h"
44 #include "ash/shelf/shelf_delegate.h" 45 #include "ash/shelf/shelf_delegate.h"
45 #include "ash/shelf/shelf_item_delegate.h" 46 #include "ash/shelf/shelf_item_delegate.h"
46 #include "ash/shelf/shelf_item_delegate_manager.h" 47 #include "ash/shelf/shelf_item_delegate_manager.h"
47 #include "ash/shelf/shelf_model.h" 48 #include "ash/shelf/shelf_model.h"
48 #include "ash/shelf/shelf_widget.h" 49 #include "ash/shelf/shelf_widget.h"
49 #include "ash/shelf/shelf_window_watcher.h" 50 #include "ash/shelf/shelf_window_watcher.h"
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after
484 } 485 }
485 486
486 void Shell::AddShellObserver(ShellObserver* observer) { 487 void Shell::AddShellObserver(ShellObserver* observer) {
487 observers_.AddObserver(observer); 488 observers_.AddObserver(observer);
488 } 489 }
489 490
490 void Shell::RemoveShellObserver(ShellObserver* observer) { 491 void Shell::RemoveShellObserver(ShellObserver* observer) {
491 observers_.RemoveObserver(observer); 492 observers_.RemoveObserver(observer);
492 } 493 }
493 494
495 void Shell::AddPointerWatcher(views::PointerWatcher* watcher) {
496 pointer_watcher_delegate_->AddPointerWatcher(watcher);
497 }
498
499 void Shell::RemovePointerWatcher(views::PointerWatcher* watcher) {
500 pointer_watcher_delegate_->RemovePointerWatcher(watcher);
501 }
502
494 #if defined(OS_CHROMEOS) 503 #if defined(OS_CHROMEOS)
495 bool Shell::ShouldSaveDisplaySettings() { 504 bool Shell::ShouldSaveDisplaySettings() {
496 return !(screen_orientation_controller_ 505 return !(screen_orientation_controller_
497 ->ignore_display_configuration_updates() || 506 ->ignore_display_configuration_updates() ||
498 resolution_notification_controller_->DoesNotificationTimeout()); 507 resolution_notification_controller_->DoesNotificationTimeout());
499 } 508 }
500 #endif 509 #endif
501 510
502 void Shell::UpdateShelfVisibility() { 511 void Shell::UpdateShelfVisibility() {
503 RootWindowControllerList controllers = GetAllRootWindowControllers(); 512 RootWindowControllerList controllers = GetAllRootWindowControllers();
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
824 wm_globals_.reset(); 833 wm_globals_.reset();
825 834
826 // Depends on |focus_client_|, so must be destroyed before. 835 // Depends on |focus_client_|, so must be destroyed before.
827 window_tree_host_manager_->Shutdown(); 836 window_tree_host_manager_->Shutdown();
828 window_tree_host_manager_.reset(); 837 window_tree_host_manager_.reset();
829 focus_client_.reset(); 838 focus_client_.reset();
830 screen_position_controller_.reset(); 839 screen_position_controller_.reset();
831 accessibility_delegate_.reset(); 840 accessibility_delegate_.reset();
832 new_window_delegate_.reset(); 841 new_window_delegate_.reset();
833 media_delegate_.reset(); 842 media_delegate_.reset();
843 pointer_watcher_delegate_.reset();
834 844
835 keyboard::KeyboardController::ResetInstance(nullptr); 845 keyboard::KeyboardController::ResetInstance(nullptr);
836 846
837 #if defined(OS_CHROMEOS) 847 #if defined(OS_CHROMEOS)
838 display_color_manager_.reset(); 848 display_color_manager_.reset();
839 if (display_change_observer_) 849 if (display_change_observer_)
840 display_configurator_->RemoveObserver(display_change_observer_.get()); 850 display_configurator_->RemoveObserver(display_change_observer_.get());
841 if (display_error_observer_) 851 if (display_error_observer_)
842 display_configurator_->RemoveObserver(display_error_observer_.get()); 852 display_configurator_->RemoveObserver(display_error_observer_.get());
843 if (projecting_observer_) { 853 if (projecting_observer_) {
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
1062 1072
1063 // This controller needs to be set before SetupManagedWindowMode. 1073 // This controller needs to be set before SetupManagedWindowMode.
1064 desktop_background_controller_.reset( 1074 desktop_background_controller_.reset(
1065 new DesktopBackgroundController(blocking_pool_)); 1075 new DesktopBackgroundController(blocking_pool_));
1066 user_wallpaper_delegate_.reset(delegate_->CreateUserWallpaperDelegate()); 1076 user_wallpaper_delegate_.reset(delegate_->CreateUserWallpaperDelegate());
1067 1077
1068 session_state_delegate_.reset(delegate_->CreateSessionStateDelegate()); 1078 session_state_delegate_.reset(delegate_->CreateSessionStateDelegate());
1069 accessibility_delegate_.reset(delegate_->CreateAccessibilityDelegate()); 1079 accessibility_delegate_.reset(delegate_->CreateAccessibilityDelegate());
1070 new_window_delegate_.reset(delegate_->CreateNewWindowDelegate()); 1080 new_window_delegate_.reset(delegate_->CreateNewWindowDelegate());
1071 media_delegate_.reset(delegate_->CreateMediaDelegate()); 1081 media_delegate_.reset(delegate_->CreateMediaDelegate());
1082 pointer_watcher_delegate_ = delegate_->CreatePointerWatcherDelegate();
1072 1083
1073 resize_shadow_controller_.reset(new ResizeShadowController()); 1084 resize_shadow_controller_.reset(new ResizeShadowController());
1074 shadow_controller_.reset( 1085 shadow_controller_.reset(
1075 new ::wm::ShadowController(activation_client_)); 1086 new ::wm::ShadowController(activation_client_));
1076 1087
1077 // Create system_tray_notifier_ before the delegate. 1088 // Create system_tray_notifier_ before the delegate.
1078 system_tray_notifier_.reset(new SystemTrayNotifier()); 1089 system_tray_notifier_.reset(new SystemTrayNotifier());
1079 1090
1080 // Initialize system_tray_delegate_ before initializing StatusAreaWidget. 1091 // Initialize system_tray_delegate_ before initializing StatusAreaWidget.
1081 system_tray_delegate_.reset(delegate()->CreateSystemTrayDelegate()); 1092 system_tray_delegate_.reset(delegate()->CreateSystemTrayDelegate());
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
1240 1251
1241 void Shell::OnWindowActivated( 1252 void Shell::OnWindowActivated(
1242 aura::client::ActivationChangeObserver::ActivationReason reason, 1253 aura::client::ActivationChangeObserver::ActivationReason reason,
1243 aura::Window* gained_active, 1254 aura::Window* gained_active,
1244 aura::Window* lost_active) { 1255 aura::Window* lost_active) {
1245 if (gained_active) 1256 if (gained_active)
1246 target_root_window_ = gained_active->GetRootWindow(); 1257 target_root_window_ = gained_active->GetRootWindow();
1247 } 1258 }
1248 1259
1249 } // namespace ash 1260 } // namespace ash
OLDNEW
« no previous file with comments | « ash/shell.h ('k') | ash/shell/shell_delegate_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698