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

Side by Side Diff: ash/shell.cc

Issue 2072853002: Implement "pinned" mode in ash. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix linux build breakage Created 4 years, 6 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 #include "ash/utility/screenshot_controller.h" 68 #include "ash/utility/screenshot_controller.h"
69 #include "ash/wm/ash_focus_rules.h" 69 #include "ash/wm/ash_focus_rules.h"
70 #include "ash/wm/ash_native_cursor_manager.h" 70 #include "ash/wm/ash_native_cursor_manager.h"
71 #include "ash/wm/event_client_impl.h" 71 #include "ash/wm/event_client_impl.h"
72 #include "ash/wm/lock_state_controller.h" 72 #include "ash/wm/lock_state_controller.h"
73 #include "ash/wm/maximize_mode/maximize_mode_controller.h" 73 #include "ash/wm/maximize_mode/maximize_mode_controller.h"
74 #include "ash/wm/maximize_mode/maximize_mode_window_manager.h" 74 #include "ash/wm/maximize_mode/maximize_mode_window_manager.h"
75 #include "ash/wm/overlay_event_filter.h" 75 #include "ash/wm/overlay_event_filter.h"
76 #include "ash/wm/overview/scoped_overview_animation_settings_factory_aura.h" 76 #include "ash/wm/overview/scoped_overview_animation_settings_factory_aura.h"
77 #include "ash/wm/overview/window_selector_controller.h" 77 #include "ash/wm/overview/window_selector_controller.h"
78 #include "ash/wm/pinned_controller.h"
78 #include "ash/wm/power_button_controller.h" 79 #include "ash/wm/power_button_controller.h"
79 #include "ash/wm/resize_shadow_controller.h" 80 #include "ash/wm/resize_shadow_controller.h"
80 #include "ash/wm/system_gesture_event_filter.h" 81 #include "ash/wm/system_gesture_event_filter.h"
81 #include "ash/wm/system_modal_container_event_filter.h" 82 #include "ash/wm/system_modal_container_event_filter.h"
82 #include "ash/wm/system_modal_container_layout_manager.h" 83 #include "ash/wm/system_modal_container_layout_manager.h"
83 #include "ash/wm/toplevel_window_event_handler.h" 84 #include "ash/wm/toplevel_window_event_handler.h"
84 #include "ash/wm/video_detector.h" 85 #include "ash/wm/video_detector.h"
85 #include "ash/wm/window_animations.h" 86 #include "ash/wm/window_animations.h"
86 #include "ash/wm/window_cycle_controller.h" 87 #include "ash/wm/window_cycle_controller.h"
87 #include "ash/wm/window_properties.h" 88 #include "ash/wm/window_properties.h"
(...skipping 695 matching lines...) Expand 10 before | Expand all | Expand 10 after
783 toplevel_window_event_handler_.reset(); 784 toplevel_window_event_handler_.reset();
784 visibility_controller_.reset(); 785 visibility_controller_.reset();
785 // |shelf_item_delegate_manager_| observes |shelf_model_|. It must be 786 // |shelf_item_delegate_manager_| observes |shelf_model_|. It must be
786 // destroyed before |shelf_model_| is destroyed. 787 // destroyed before |shelf_model_| is destroyed.
787 shelf_item_delegate_manager_.reset(); 788 shelf_item_delegate_manager_.reset();
788 shelf_model_.reset(); 789 shelf_model_.reset();
789 790
790 power_button_controller_.reset(); 791 power_button_controller_.reset();
791 lock_state_controller_.reset(); 792 lock_state_controller_.reset();
792 793
794 window_tree_host_manager_->RemoveObserver(pinned_controller_.get());
795 wm_shell_common_->RemoveShellObserver(pinned_controller_.get());
796 pinned_controller_.reset();
797
793 #if defined(OS_CHROMEOS) 798 #if defined(OS_CHROMEOS)
794 resolution_notification_controller_.reset(); 799 resolution_notification_controller_.reset();
795 #endif 800 #endif
796 desktop_background_controller_.reset(); 801 desktop_background_controller_.reset();
797 screenshot_controller_.reset(); 802 screenshot_controller_.reset();
798 mouse_cursor_filter_.reset(); 803 mouse_cursor_filter_.reset();
799 804
800 #if defined(OS_CHROMEOS) 805 #if defined(OS_CHROMEOS)
801 touch_transformer_controller_.reset(); 806 touch_transformer_controller_.reset();
802 #endif // defined(OS_CHROMEOS) 807 #endif // defined(OS_CHROMEOS)
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
1009 1014
1010 system_gesture_filter_.reset(new SystemGestureEventFilter); 1015 system_gesture_filter_.reset(new SystemGestureEventFilter);
1011 AddPreTargetHandler(system_gesture_filter_.get()); 1016 AddPreTargetHandler(system_gesture_filter_.get());
1012 1017
1013 keyboard_metrics_filter_.reset(new KeyboardUMAEventFilter); 1018 keyboard_metrics_filter_.reset(new KeyboardUMAEventFilter);
1014 AddPreTargetHandler(keyboard_metrics_filter_.get()); 1019 AddPreTargetHandler(keyboard_metrics_filter_.get());
1015 1020
1016 #if defined(OS_CHROMEOS) 1021 #if defined(OS_CHROMEOS)
1017 sticky_keys_controller_.reset(new StickyKeysController); 1022 sticky_keys_controller_.reset(new StickyKeysController);
1018 #endif 1023 #endif
1024 pinned_controller_.reset(new wm::PinnedController);
oshima 2016/06/17 10:26:54 could you please reset explicitly?
hidehiko 2016/06/17 17:19:22 It is already explicit?
oshima 2016/06/18 04:47:44 Sorry I think I need more sleep.
1025 wm_shell_common_->AddShellObserver(pinned_controller_.get());
1026 window_tree_host_manager_->AddObserver(pinned_controller_.get());
oshima 2016/06/17 10:26:54 Can you do this in PinnedController ctor , and rem
hidehiko 2016/06/17 17:19:22 Done.
1019 1027
1020 lock_state_controller_.reset(new LockStateController); 1028 lock_state_controller_.reset(new LockStateController);
1021 power_button_controller_.reset(new PowerButtonController( 1029 power_button_controller_.reset(new PowerButtonController(
1022 lock_state_controller_.get())); 1030 lock_state_controller_.get()));
1023 #if defined(OS_CHROMEOS) 1031 #if defined(OS_CHROMEOS)
1024 // Pass the initial display state to PowerButtonController. 1032 // Pass the initial display state to PowerButtonController.
1025 power_button_controller_->OnDisplayModeChanged( 1033 power_button_controller_->OnDisplayModeChanged(
1026 display_configurator_->cached_displays()); 1034 display_configurator_->cached_displays());
1027 #endif 1035 #endif
1028 wm_shell_common_->AddShellObserver(lock_state_controller_.get()); 1036 wm_shell_common_->AddShellObserver(lock_state_controller_.get());
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
1243 1251
1244 void Shell::OnWindowActivated( 1252 void Shell::OnWindowActivated(
1245 aura::client::ActivationChangeObserver::ActivationReason reason, 1253 aura::client::ActivationChangeObserver::ActivationReason reason,
1246 aura::Window* gained_active, 1254 aura::Window* gained_active,
1247 aura::Window* lost_active) { 1255 aura::Window* lost_active) {
1248 if (gained_active) 1256 if (gained_active)
1249 target_root_window_ = gained_active->GetRootWindow(); 1257 target_root_window_ = gained_active->GetRootWindow();
1250 } 1258 }
1251 1259
1252 } // namespace ash 1260 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698