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

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

Issue 404563002: Athena's FocusRules (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | Annotate | Revision Log
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/public/window_manager.h" 5 #include "athena/wm/public/window_manager.h"
6 6
7 #include "athena/input/public/accelerator_manager.h" 7 #include "athena/input/public/accelerator_manager.h"
8 #include "athena/screen/public/screen_manager.h" 8 #include "athena/screen/public/screen_manager.h"
9 #include "athena/wm/public/window_manager_observer.h" 9 #include "athena/wm/public/window_manager_observer.h"
10 #include "athena/wm/window_overview_mode.h" 10 #include "athena/wm/window_overview_mode.h"
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 } 120 }
121 virtual void SetChildBounds(aura::Window* child, 121 virtual void SetChildBounds(aura::Window* child,
122 const gfx::Rect& requested_bounds) OVERRIDE { 122 const gfx::Rect& requested_bounds) OVERRIDE {
123 if (!requested_bounds.IsEmpty()) 123 if (!requested_bounds.IsEmpty())
124 SetChildBoundsDirect(child, requested_bounds); 124 SetChildBoundsDirect(child, requested_bounds);
125 } 125 }
126 126
127 DISALLOW_COPY_AND_ASSIGN(AthenaContainerLayoutManager); 127 DISALLOW_COPY_AND_ASSIGN(AthenaContainerLayoutManager);
128 }; 128 };
129 129
130 WindowManagerImpl::WindowManagerImpl() 130 WindowManagerImpl::WindowManagerImpl() {
131 : container_( 131 ScreenManager::ContainerParams params("DefaultContainer");
132 ScreenManager::Get()->CreateDefaultContainer("MainContainer")) { 132 params.can_activate_children = true;
133 container_.reset(ScreenManager::Get()->CreateDefaultContainer(params));
133 container_->SetLayoutManager(new AthenaContainerLayoutManager); 134 container_->SetLayoutManager(new AthenaContainerLayoutManager);
134 container_->AddObserver(this); 135 container_->AddObserver(this);
135 instance = this; 136 instance = this;
136 InstallAccelerators(); 137 InstallAccelerators();
137 } 138 }
138 139
139 WindowManagerImpl::~WindowManagerImpl() { 140 WindowManagerImpl::~WindowManagerImpl() {
140 if (container_) 141 if (container_)
141 container_->RemoveObserver(this); 142 container_->RemoveObserver(this);
142 container_.reset(); 143 container_.reset();
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 DCHECK(!instance); 175 DCHECK(!instance);
175 } 176 }
176 177
177 // static 178 // static
178 WindowManager* WindowManager::GetInstance() { 179 WindowManager* WindowManager::GetInstance() {
179 DCHECK(instance); 180 DCHECK(instance);
180 return instance; 181 return instance;
181 } 182 }
182 183
183 } // namespace athena 184 } // namespace athena
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698