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

Side by Side Diff: ui/aura_shell/desktop_layout_manager.cc

Issue 7890054: Adds code for a new Aura shell. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 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 | Annotate | Revision Log
« no previous file with comments | « ui/aura_shell/desktop_layout_manager.h ('k') | ui/aura_shell/launcher/launcher_button.h » ('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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "ui/aura_shell/desktop_layout_manager.h" 5 #include "ui/aura_shell/desktop_layout_manager.h"
6 6
7 #include "ui/aura/window.h" 7 #include "ui/aura/window.h"
8 #include "views/widget/widget.h" 8 #include "views/widget/widget.h"
9 9
10 //////////////////////////////////////////////////////////////////////////////// 10 ////////////////////////////////////////////////////////////////////////////////
11 // DesktopLayoutManager, public: 11 // DesktopLayoutManager, public:
12 12
13 DesktopLayoutManager::DesktopLayoutManager(aura::Window* owner) 13 DesktopLayoutManager::DesktopLayoutManager(aura::Window* owner)
14 : owner_(owner), 14 : owner_(owner),
15 background_widget_(NULL) { 15 background_widget_(NULL),
16 launcher_widget_(NULL) {
16 } 17 }
17 18
18 DesktopLayoutManager::~DesktopLayoutManager() { 19 DesktopLayoutManager::~DesktopLayoutManager() {
19 } 20 }
20 21
21 //////////////////////////////////////////////////////////////////////////////// 22 ////////////////////////////////////////////////////////////////////////////////
22 // DesktopLayoutManager, aura::LayoutManager implementation: 23 // DesktopLayoutManager, aura::LayoutManager implementation:
23 24
24 void DesktopLayoutManager::OnWindowResized() { 25 void DesktopLayoutManager::OnWindowResized() {
25 background_widget_->SetBounds( 26 background_widget_->SetBounds(
26 gfx::Rect(owner_->bounds().width(), owner_->bounds().height())); 27 gfx::Rect(owner_->bounds().width(), owner_->bounds().height()));
28
29 gfx::Rect launcher_bounds = launcher_widget_->GetWindowScreenBounds();
30 launcher_widget_->SetBounds(
31 gfx::Rect(owner_->bounds().width() / 2 - launcher_bounds.width() / 2,
32 owner_->bounds().bottom() - launcher_bounds.height(),
33 launcher_bounds.width(),
34 launcher_bounds.height()));
27 } 35 }
OLDNEW
« no previous file with comments | « ui/aura_shell/desktop_layout_manager.h ('k') | ui/aura_shell/launcher/launcher_button.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698