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

Side by Side Diff: athena/wm/window_manager_impl.cc

Issue 545393002: Adding split view divider widget. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing sadrul's feedback Created 6 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "athena/wm/window_manager_impl.h" 5 #include "athena/wm/window_manager_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "athena/screen/public/screen_manager.h" 9 #include "athena/screen/public/screen_manager.h"
10 #include "athena/util/container_priorities.h" 10 #include "athena/util/container_priorities.h"
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 WindowManagerImpl::WindowManagerImpl() { 134 WindowManagerImpl::WindowManagerImpl() {
135 ScreenManager::ContainerParams params("DefaultContainer", CP_DEFAULT); 135 ScreenManager::ContainerParams params("DefaultContainer", CP_DEFAULT);
136 params.can_activate_children = true; 136 params.can_activate_children = true;
137 container_.reset(ScreenManager::Get()->CreateDefaultContainer(params)); 137 container_.reset(ScreenManager::Get()->CreateDefaultContainer(params));
138 container_->SetLayoutManager(new AthenaContainerLayoutManager); 138 container_->SetLayoutManager(new AthenaContainerLayoutManager);
139 container_->AddObserver(this); 139 container_->AddObserver(this);
140 window_list_provider_.reset(new WindowListProviderImpl(container_.get())); 140 window_list_provider_.reset(new WindowListProviderImpl(container_.get()));
141 bezel_controller_.reset(new BezelController(container_.get())); 141 bezel_controller_.reset(new BezelController(container_.get()));
142 split_view_controller_.reset( 142 split_view_controller_.reset(
143 new SplitViewController(container_.get(), window_list_provider_.get())); 143 new SplitViewController(container_.get(), window_list_provider_.get()));
144 AddObserver(split_view_controller_.get());
144 bezel_controller_->set_left_right_delegate(split_view_controller_.get()); 145 bezel_controller_->set_left_right_delegate(split_view_controller_.get());
145 container_->AddPreTargetHandler(bezel_controller_.get()); 146 container_->AddPreTargetHandler(bezel_controller_.get());
146 title_drag_controller_.reset(new TitleDragController(container_.get(), this)); 147 title_drag_controller_.reset(new TitleDragController(container_.get(), this));
147 wm_state_.reset(new wm::WMState()); 148 wm_state_.reset(new wm::WMState());
148 aura::client::ActivationClient* activation_client = 149 aura::client::ActivationClient* activation_client =
149 aura::client::GetActivationClient(container_->GetRootWindow()); 150 aura::client::GetActivationClient(container_->GetRootWindow());
150 shadow_controller_.reset(new wm::ShadowController(activation_client)); 151 shadow_controller_.reset(new wm::ShadowController(activation_client));
151 instance = this; 152 instance = this;
152 InstallAccelerators(); 153 InstallAccelerators();
153 } 154 }
154 155
155 WindowManagerImpl::~WindowManagerImpl() { 156 WindowManagerImpl::~WindowManagerImpl() {
156 overview_.reset(); 157 overview_.reset();
158 RemoveObserver(split_view_controller_.get());
157 split_view_controller_.reset(); 159 split_view_controller_.reset();
158 window_list_provider_.reset(); 160 window_list_provider_.reset();
159 if (container_) { 161 if (container_) {
160 container_->RemoveObserver(this); 162 container_->RemoveObserver(this);
161 container_->RemovePreTargetHandler(bezel_controller_.get()); 163 container_->RemovePreTargetHandler(bezel_controller_.get());
162 } 164 }
163 // |title_drag_controller_| needs to be reset before |container_|. 165 // |title_drag_controller_| needs to be reset before |container_|.
164 title_drag_controller_.reset(); 166 title_drag_controller_.reset();
165 container_.reset(); 167 container_.reset();
166 instance = NULL; 168 instance = NULL;
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
402 DCHECK(!instance); 404 DCHECK(!instance);
403 } 405 }
404 406
405 // static 407 // static
406 WindowManager* WindowManager::GetInstance() { 408 WindowManager* WindowManager::GetInstance() {
407 DCHECK(instance); 409 DCHECK(instance);
408 return instance; 410 return instance;
409 } 411 }
410 412
411 } // namespace athena 413 } // namespace athena
OLDNEW
« athena/wm/split_view_controller.cc ('K') | « athena/wm/split_view_controller.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698