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

Side by Side Diff: ash/shell.cc

Issue 2167643005: Revert of mus: Rename .*PointerWatcher.* to .*PointerDownWatcher.*. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: resolve conflicts Created 4 years, 5 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
11 #include "ash/accelerators/accelerator_controller_delegate_aura.h" 11 #include "ash/accelerators/accelerator_controller_delegate_aura.h"
12 #include "ash/accelerators/accelerator_delegate.h" 12 #include "ash/accelerators/accelerator_delegate.h"
13 #include "ash/accelerators/focus_manager_factory.h" 13 #include "ash/accelerators/focus_manager_factory.h"
14 #include "ash/aura/wm_shell_aura.h" 14 #include "ash/aura/wm_shell_aura.h"
15 #include "ash/aura/wm_window_aura.h" 15 #include "ash/aura/wm_window_aura.h"
16 #include "ash/autoclick/autoclick_controller.h" 16 #include "ash/autoclick/autoclick_controller.h"
17 #include "ash/common/accelerators/accelerator_controller.h" 17 #include "ash/common/accelerators/accelerator_controller.h"
18 #include "ash/common/ash_switches.h" 18 #include "ash/common/ash_switches.h"
19 #include "ash/common/gpu_support.h" 19 #include "ash/common/gpu_support.h"
20 #include "ash/common/keyboard/keyboard_ui.h" 20 #include "ash/common/keyboard/keyboard_ui.h"
21 #include "ash/common/login_status.h" 21 #include "ash/common/login_status.h"
22 #include "ash/common/pointer_down_watcher_delegate.h" 22 #include "ash/common/pointer_watcher_delegate.h"
23 #include "ash/common/session/session_state_delegate.h" 23 #include "ash/common/session/session_state_delegate.h"
24 #include "ash/common/shelf/app_list_shelf_item_delegate.h" 24 #include "ash/common/shelf/app_list_shelf_item_delegate.h"
25 #include "ash/common/shelf/shelf_item_delegate.h" 25 #include "ash/common/shelf/shelf_item_delegate.h"
26 #include "ash/common/shelf/shelf_item_delegate_manager.h" 26 #include "ash/common/shelf/shelf_item_delegate_manager.h"
27 #include "ash/common/shelf/shelf_model.h" 27 #include "ash/common/shelf/shelf_model.h"
28 #include "ash/common/shell_delegate.h" 28 #include "ash/common/shell_delegate.h"
29 #include "ash/common/shell_window_ids.h" 29 #include "ash/common/shell_window_ids.h"
30 #include "ash/common/system/locale/locale_notification_controller.h" 30 #include "ash/common/system/locale/locale_notification_controller.h"
31 #include "ash/common/system/status_area_widget.h" 31 #include "ash/common/system/status_area_widget.h"
32 #include "ash/common/system/tray/system_tray_delegate.h" 32 #include "ash/common/system/tray/system_tray_delegate.h"
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after
418 418
419 void Shell::ShutdownShelf() { 419 void Shell::ShutdownShelf() {
420 RootWindowControllerList controllers = GetAllRootWindowControllers(); 420 RootWindowControllerList controllers = GetAllRootWindowControllers();
421 for (RootWindowControllerList::iterator iter = controllers.begin(); 421 for (RootWindowControllerList::iterator iter = controllers.begin();
422 iter != controllers.end(); ++iter) { 422 iter != controllers.end(); ++iter) {
423 if ((*iter)->shelf_widget()) 423 if ((*iter)->shelf_widget())
424 (*iter)->shelf_widget()->Shutdown(); 424 (*iter)->shelf_widget()->Shutdown();
425 } 425 }
426 } 426 }
427 427
428 void Shell::AddPointerDownWatcher(views::PointerDownWatcher* watcher) { 428 void Shell::AddPointerWatcher(views::PointerWatcher* watcher) {
429 pointer_down_watcher_delegate_->AddPointerDownWatcher(watcher); 429 pointer_watcher_delegate_->AddPointerWatcher(watcher);
430 } 430 }
431 431
432 void Shell::RemovePointerDownWatcher(views::PointerDownWatcher* watcher) { 432 void Shell::RemovePointerWatcher(views::PointerWatcher* watcher) {
433 pointer_down_watcher_delegate_->RemovePointerDownWatcher(watcher); 433 pointer_watcher_delegate_->RemovePointerWatcher(watcher);
434 } 434 }
435 435
436 #if defined(OS_CHROMEOS) 436 #if defined(OS_CHROMEOS)
437 bool Shell::ShouldSaveDisplaySettings() { 437 bool Shell::ShouldSaveDisplaySettings() {
438 return !( 438 return !(
439 screen_orientation_controller_->ignore_display_configuration_updates() || 439 screen_orientation_controller_->ignore_display_configuration_updates() ||
440 resolution_notification_controller_->DoesNotificationTimeout()); 440 resolution_notification_controller_->DoesNotificationTimeout());
441 } 441 }
442 #endif 442 #endif
443 443
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
729 display_manager_->CreateScreenForShutdown(); 729 display_manager_->CreateScreenForShutdown();
730 display_configuration_controller_.reset(); 730 display_configuration_controller_.reset();
731 731
732 wm_shell_->Shutdown(); 732 wm_shell_->Shutdown();
733 // Depends on |focus_client_|, so must be destroyed before. 733 // Depends on |focus_client_|, so must be destroyed before.
734 window_tree_host_manager_->Shutdown(); 734 window_tree_host_manager_->Shutdown();
735 window_tree_host_manager_.reset(); 735 window_tree_host_manager_.reset();
736 focus_client_.reset(); 736 focus_client_.reset();
737 screen_position_controller_.reset(); 737 screen_position_controller_.reset();
738 new_window_delegate_.reset(); 738 new_window_delegate_.reset();
739 pointer_down_watcher_delegate_.reset(); 739 pointer_watcher_delegate_.reset();
740 740
741 keyboard::KeyboardController::ResetInstance(nullptr); 741 keyboard::KeyboardController::ResetInstance(nullptr);
742 742
743 #if defined(OS_CHROMEOS) 743 #if defined(OS_CHROMEOS)
744 display_color_manager_.reset(); 744 display_color_manager_.reset();
745 if (display_change_observer_) 745 if (display_change_observer_)
746 display_configurator_->RemoveObserver(display_change_observer_.get()); 746 display_configurator_->RemoveObserver(display_change_observer_.get());
747 if (display_error_observer_) 747 if (display_error_observer_)
748 display_configurator_->RemoveObserver(display_error_observer_.get()); 748 display_configurator_->RemoveObserver(display_error_observer_.get());
749 if (projecting_observer_) { 749 if (projecting_observer_) {
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
974 974
975 // This controller needs to be set before SetupManagedWindowMode. 975 // This controller needs to be set before SetupManagedWindowMode.
976 desktop_background_controller_.reset( 976 desktop_background_controller_.reset(
977 new DesktopBackgroundController(blocking_pool_)); 977 new DesktopBackgroundController(blocking_pool_));
978 user_wallpaper_delegate_.reset( 978 user_wallpaper_delegate_.reset(
979 wm_shell_->delegate()->CreateUserWallpaperDelegate()); 979 wm_shell_->delegate()->CreateUserWallpaperDelegate());
980 980
981 session_state_delegate_.reset( 981 session_state_delegate_.reset(
982 wm_shell_->delegate()->CreateSessionStateDelegate()); 982 wm_shell_->delegate()->CreateSessionStateDelegate());
983 new_window_delegate_.reset(wm_shell_->delegate()->CreateNewWindowDelegate()); 983 new_window_delegate_.reset(wm_shell_->delegate()->CreateNewWindowDelegate());
984 pointer_down_watcher_delegate_ = 984 pointer_watcher_delegate_ =
985 wm_shell_->delegate()->CreatePointerDownWatcherDelegate(); 985 wm_shell_->delegate()->CreatePointerWatcherDelegate();
986 986
987 resize_shadow_controller_.reset(new ResizeShadowController()); 987 resize_shadow_controller_.reset(new ResizeShadowController());
988 shadow_controller_.reset(new ::wm::ShadowController(activation_client_)); 988 shadow_controller_.reset(new ::wm::ShadowController(activation_client_));
989 989
990 wm_shell_->SetSystemTrayDelegate( 990 wm_shell_->SetSystemTrayDelegate(
991 base::WrapUnique(wm_shell_->delegate()->CreateSystemTrayDelegate())); 991 base::WrapUnique(wm_shell_->delegate()->CreateSystemTrayDelegate()));
992 992
993 locale_notification_controller_.reset(new LocaleNotificationController); 993 locale_notification_controller_.reset(new LocaleNotificationController);
994 994
995 #if defined(OS_CHROMEOS) 995 #if defined(OS_CHROMEOS)
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
1127 1127
1128 void Shell::OnWindowActivated( 1128 void Shell::OnWindowActivated(
1129 aura::client::ActivationChangeObserver::ActivationReason reason, 1129 aura::client::ActivationChangeObserver::ActivationReason reason,
1130 aura::Window* gained_active, 1130 aura::Window* gained_active,
1131 aura::Window* lost_active) { 1131 aura::Window* lost_active) {
1132 if (gained_active) 1132 if (gained_active)
1133 target_root_window_ = gained_active->GetRootWindow(); 1133 target_root_window_ = gained_active->GetRootWindow();
1134 } 1134 }
1135 1135
1136 } // namespace ash 1136 } // 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