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

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

Issue 411543006: Explicit container priority (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/common/container_priorities.h"
7 #include "athena/input/public/accelerator_manager.h" 8 #include "athena/input/public/accelerator_manager.h"
8 #include "athena/screen/public/screen_manager.h" 9 #include "athena/screen/public/screen_manager.h"
9 #include "athena/wm/public/window_manager_observer.h" 10 #include "athena/wm/public/window_manager_observer.h"
10 #include "athena/wm/window_overview_mode.h" 11 #include "athena/wm/window_overview_mode.h"
11 #include "base/logging.h" 12 #include "base/logging.h"
12 #include "base/observer_list.h" 13 #include "base/observer_list.h"
13 #include "ui/aura/layout_manager.h" 14 #include "ui/aura/layout_manager.h"
14 #include "ui/aura/window.h" 15 #include "ui/aura/window.h"
15 #include "ui/wm/public/window_types.h" 16 #include "ui/wm/public/window_types.h"
16 17
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 virtual void SetChildBounds(aura::Window* child, 122 virtual void SetChildBounds(aura::Window* child,
122 const gfx::Rect& requested_bounds) OVERRIDE { 123 const gfx::Rect& requested_bounds) OVERRIDE {
123 if (!requested_bounds.IsEmpty()) 124 if (!requested_bounds.IsEmpty())
124 SetChildBoundsDirect(child, requested_bounds); 125 SetChildBoundsDirect(child, requested_bounds);
125 } 126 }
126 127
127 DISALLOW_COPY_AND_ASSIGN(AthenaContainerLayoutManager); 128 DISALLOW_COPY_AND_ASSIGN(AthenaContainerLayoutManager);
128 }; 129 };
129 130
130 WindowManagerImpl::WindowManagerImpl() { 131 WindowManagerImpl::WindowManagerImpl() {
131 ScreenManager::ContainerParams params("DefaultContainer"); 132 ScreenManager::ContainerParams params("DefaultContainer", CP_DEFAULT);
132 params.can_activate_children = true; 133 params.can_activate_children = true;
133 container_.reset(ScreenManager::Get()->CreateDefaultContainer(params)); 134 container_.reset(ScreenManager::Get()->CreateDefaultContainer(params));
134 container_->SetLayoutManager(new AthenaContainerLayoutManager); 135 container_->SetLayoutManager(new AthenaContainerLayoutManager);
135 container_->AddObserver(this); 136 container_->AddObserver(this);
136 instance = this; 137 instance = this;
137 InstallAccelerators(); 138 InstallAccelerators();
138 } 139 }
139 140
140 WindowManagerImpl::~WindowManagerImpl() { 141 WindowManagerImpl::~WindowManagerImpl() {
141 if (container_) 142 if (container_)
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 DCHECK(!instance); 176 DCHECK(!instance);
176 } 177 }
177 178
178 // static 179 // static
179 WindowManager* WindowManager::GetInstance() { 180 WindowManager* WindowManager::GetInstance() {
180 DCHECK(instance); 181 DCHECK(instance);
181 return instance; 182 return instance;
182 } 183 }
183 184
184 } // namespace athena 185 } // namespace athena
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698