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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: ash/shell.cc
diff --git a/ash/shell.cc b/ash/shell.cc
index 9d15218621caed7de0e2b2a5fbb747e93603d93b..882850322bd77516bf516255297cc04f0484ae05 100644
--- a/ash/shell.cc
+++ b/ash/shell.cc
@@ -75,6 +75,7 @@
#include "ash/wm/overlay_event_filter.h"
#include "ash/wm/overview/scoped_overview_animation_settings_factory_aura.h"
#include "ash/wm/overview/window_selector_controller.h"
+#include "ash/wm/pinned_controller.h"
#include "ash/wm/power_button_controller.h"
#include "ash/wm/resize_shadow_controller.h"
#include "ash/wm/system_gesture_event_filter.h"
@@ -790,6 +791,10 @@ Shell::~Shell() {
power_button_controller_.reset();
lock_state_controller_.reset();
+ window_tree_host_manager_->RemoveObserver(pinned_controller_.get());
+ wm_shell_common_->RemoveShellObserver(pinned_controller_.get());
+ pinned_controller_.reset();
+
#if defined(OS_CHROMEOS)
resolution_notification_controller_.reset();
#endif
@@ -1016,6 +1021,9 @@ void Shell::Init(const ShellInitParams& init_params) {
#if defined(OS_CHROMEOS)
sticky_keys_controller_.reset(new StickyKeysController);
#endif
+ 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.
+ wm_shell_common_->AddShellObserver(pinned_controller_.get());
+ 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.
lock_state_controller_.reset(new LockStateController);
power_button_controller_.reset(new PowerButtonController(

Powered by Google App Engine
This is Rietveld 408576698