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

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

Issue 332463002: Maximize only normal/popup window (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « athena/wm/DEPS ('k') | no next file » | 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/public/window_manager.h" 5 #include "athena/wm/public/window_manager.h"
6 6
7 #include "athena/screen/public/screen_manager.h" 7 #include "athena/screen/public/screen_manager.h"
8 #include "athena/wm/window_overview_mode.h" 8 #include "athena/wm/window_overview_mode.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "ui/aura/layout_manager.h" 10 #include "ui/aura/layout_manager.h"
11 #include "ui/aura/window.h" 11 #include "ui/aura/window.h"
12 #include "ui/wm/public/window_types.h"
12 13
13 namespace athena { 14 namespace athena {
14 namespace { 15 namespace {
15 16
16 class WindowManagerImpl : public WindowManager, 17 class WindowManagerImpl : public WindowManager,
17 public WindowOverviewModeDelegate, 18 public WindowOverviewModeDelegate,
18 public aura::WindowObserver { 19 public aura::WindowObserver {
19 public: 20 public:
20 WindowManagerImpl(); 21 WindowManagerImpl();
21 virtual ~WindowManagerImpl(); 22 virtual ~WindowManagerImpl();
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 } 118 }
118 119
119 void WindowManagerImpl::Layout() { 120 void WindowManagerImpl::Layout() {
120 if (!container_) 121 if (!container_)
121 return; 122 return;
122 gfx::Rect bounds = gfx::Rect(container_->bounds().size()); 123 gfx::Rect bounds = gfx::Rect(container_->bounds().size());
123 const aura::Window::Windows& children = container_->children(); 124 const aura::Window::Windows& children = container_->children();
124 for (aura::Window::Windows::const_iterator iter = children.begin(); 125 for (aura::Window::Windows::const_iterator iter = children.begin();
125 iter != children.end(); 126 iter != children.end();
126 ++iter) { 127 ++iter) {
127 (*iter)->SetBounds(bounds); 128 if ((*iter)->type() == ui::wm::WINDOW_TYPE_NORMAL ||
129 (*iter)->type() == ui::wm::WINDOW_TYPE_POPUP)
Mr4D (OOO till 08-26) 2014/06/11 18:09:25 There were some discussions about letting popups a
130 (*iter)->SetBounds(bounds);
128 } 131 }
129 } 132 }
130 133
131 } // namespace 134 } // namespace
132 135
133 // static 136 // static
134 WindowManager* WindowManager::Create() { 137 WindowManager* WindowManager::Create() {
135 DCHECK(!instance); 138 DCHECK(!instance);
136 new WindowManagerImpl; 139 new WindowManagerImpl;
137 DCHECK(instance); 140 DCHECK(instance);
138 return instance; 141 return instance;
139 } 142 }
140 143
141 // static 144 // static
142 void WindowManager::Shutdown() { 145 void WindowManager::Shutdown() {
143 DCHECK(instance); 146 DCHECK(instance);
144 delete instance; 147 delete instance;
145 DCHECK(!instance); 148 DCHECK(!instance);
146 } 149 }
147 150
148 } // namespace athena 151 } // namespace athena
OLDNEW
« no previous file with comments | « athena/wm/DEPS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698