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

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

Issue 665803003: Revert of Support modal windows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git/+/master
Patch Set: Created 6 years, 2 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 | « athena/wm/window_list_provider_impl_unittest.cc ('k') | athena/wm/window_manager_unittest.cc » ('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 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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 void AthenaContainerLayoutManager::SetChildBounds( 143 void AthenaContainerLayoutManager::SetChildBounds(
144 aura::Window* child, 144 aura::Window* child,
145 const gfx::Rect& requested_bounds) { 145 const gfx::Rect& requested_bounds) {
146 if (!requested_bounds.IsEmpty()) 146 if (!requested_bounds.IsEmpty())
147 SetChildBoundsDirect(child, requested_bounds); 147 SetChildBoundsDirect(child, requested_bounds);
148 } 148 }
149 149
150 WindowManagerImpl::WindowManagerImpl() { 150 WindowManagerImpl::WindowManagerImpl() {
151 ScreenManager::ContainerParams params("DefaultContainer", CP_DEFAULT); 151 ScreenManager::ContainerParams params("DefaultContainer", CP_DEFAULT);
152 params.can_activate_children = true; 152 params.can_activate_children = true;
153 params.default_parent = true; 153 container_.reset(ScreenManager::Get()->CreateDefaultContainer(params));
154 params.modal_container_priority = CP_SYSTEM_MODAL;
155 container_.reset(ScreenManager::Get()->CreateContainer(params));
156 container_->SetLayoutManager(new AthenaContainerLayoutManager); 154 container_->SetLayoutManager(new AthenaContainerLayoutManager);
157 container_->AddObserver(this); 155 container_->AddObserver(this);
158 window_list_provider_.reset(new WindowListProviderImpl(container_.get())); 156 window_list_provider_.reset(new WindowListProviderImpl(container_.get()));
159 bezel_controller_.reset(new BezelController(container_.get())); 157 bezel_controller_.reset(new BezelController(container_.get()));
160 split_view_controller_.reset( 158 split_view_controller_.reset(
161 new SplitViewController(container_.get(), window_list_provider_.get())); 159 new SplitViewController(container_.get(), window_list_provider_.get()));
162 AddObserver(split_view_controller_.get()); 160 AddObserver(split_view_controller_.get());
163 bezel_controller_->set_left_right_delegate(split_view_controller_.get()); 161 bezel_controller_->set_left_right_delegate(split_view_controller_.get());
164 container_->AddPreTargetHandler(bezel_controller_.get()); 162 container_->AddPreTargetHandler(bezel_controller_.get());
165 title_drag_controller_.reset(new TitleDragController(container_.get(), this)); 163 title_drag_controller_.reset(new TitleDragController(container_.get(), this));
166 wm_state_.reset(new wm::WMState()); 164 wm_state_.reset(new wm::WMState());
167 aura::client::ActivationClient* activation_client = 165 aura::client::ActivationClient* activation_client =
168 aura::client::GetActivationClient(container_->GetRootWindow()); 166 aura::client::GetActivationClient(container_->GetRootWindow());
169 DCHECK(container_->GetRootWindow());
170 DCHECK(activation_client);
171 shadow_controller_.reset(new wm::ShadowController(activation_client)); 167 shadow_controller_.reset(new wm::ShadowController(activation_client));
172 instance = this; 168 instance = this;
173 InstallAccelerators(); 169 InstallAccelerators();
174 } 170 }
175 171
176 WindowManagerImpl::~WindowManagerImpl() { 172 WindowManagerImpl::~WindowManagerImpl() {
177 overview_.reset(); 173 overview_.reset();
178 RemoveObserver(split_view_controller_.get()); 174 RemoveObserver(split_view_controller_.get());
179 split_view_controller_.reset(); 175 split_view_controller_.reset();
180 window_list_provider_.reset(); 176 window_list_provider_.reset();
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
457 DCHECK(!instance); 453 DCHECK(!instance);
458 } 454 }
459 455
460 // static 456 // static
461 WindowManager* WindowManager::Get() { 457 WindowManager* WindowManager::Get() {
462 DCHECK(instance); 458 DCHECK(instance);
463 return instance; 459 return instance;
464 } 460 }
465 461
466 } // namespace athena 462 } // namespace athena
OLDNEW
« no previous file with comments | « athena/wm/window_list_provider_impl_unittest.cc ('k') | athena/wm/window_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698