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

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

Issue 8743014: [cros, Aura] Refresh status area widget bounds on StatusAreaView layout. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nit fixes, merge, prevent double deletion of ShelfLayoutManager Created 9 years 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/aura_shell.gyp ('k') | ui/aura_shell/desktop_layout_manager.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 (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 #ifndef UI_AURA_SHELL_DESKTOP_LAYOUT_MANAGER_H_ 5 #ifndef UI_AURA_SHELL_DESKTOP_LAYOUT_MANAGER_H_
6 #define UI_AURA_SHELL_DESKTOP_LAYOUT_MANAGER_H_ 6 #define UI_AURA_SHELL_DESKTOP_LAYOUT_MANAGER_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
11 #include "ui/aura/layout_manager.h" 11 #include "ui/aura/layout_manager.h"
12 12
13 namespace aura { 13 namespace aura {
14 class Window; 14 class Window;
15 } 15 }
16 namespace gfx { 16 namespace gfx {
17 class Rect; 17 class Rect;
18 } 18 }
19 namespace views { 19 namespace views {
20 class Widget; 20 class Widget;
21 } 21 }
22 22
23 namespace aura_shell { 23 namespace aura_shell {
24 namespace internal { 24 namespace internal {
25 25
26 class ShelfLayoutController;
27
28 // A layout manager for the root window. 26 // A layout manager for the root window.
29 // Resizes all of its immediate children to fill the bounds of the root window. 27 // Resizes all of its immediate children to fill the bounds of the root window.
30 class DesktopLayoutManager : public aura::LayoutManager { 28 class DesktopLayoutManager : public aura::LayoutManager {
31 public: 29 public:
32 explicit DesktopLayoutManager(aura::Window* owner); 30 explicit DesktopLayoutManager(aura::Window* owner);
33 virtual ~DesktopLayoutManager(); 31 virtual ~DesktopLayoutManager();
34 32
35 void set_shelf(ShelfLayoutController* shelf) { shelf_ = shelf; }
36
37 void set_background_widget(views::Widget* background_widget) { 33 void set_background_widget(views::Widget* background_widget) {
38 background_widget_ = background_widget; 34 background_widget_ = background_widget;
39 } 35 }
40 36
41 // Overridden from aura::LayoutManager: 37 // Overridden from aura::LayoutManager:
42 virtual void OnWindowResized() OVERRIDE; 38 virtual void OnWindowResized() OVERRIDE;
43 virtual void OnWindowAddedToLayout(aura::Window* child) OVERRIDE; 39 virtual void OnWindowAddedToLayout(aura::Window* child) OVERRIDE;
44 virtual void OnWillRemoveWindowFromLayout(aura::Window* child) OVERRIDE; 40 virtual void OnWillRemoveWindowFromLayout(aura::Window* child) OVERRIDE;
45 virtual void OnChildWindowVisibilityChanged(aura::Window* child, 41 virtual void OnChildWindowVisibilityChanged(aura::Window* child,
46 bool visible) OVERRIDE; 42 bool visible) OVERRIDE;
47 virtual void SetChildBounds(aura::Window* child, 43 virtual void SetChildBounds(aura::Window* child,
48 const gfx::Rect& requested_bounds) OVERRIDE; 44 const gfx::Rect& requested_bounds) OVERRIDE;
49 45
50 private: 46 private:
51 aura::Window* owner_; 47 aura::Window* owner_;
52 48
53 views::Widget* background_widget_; 49 views::Widget* background_widget_;
54 50
55 ShelfLayoutController* shelf_;
56
57 DISALLOW_COPY_AND_ASSIGN(DesktopLayoutManager); 51 DISALLOW_COPY_AND_ASSIGN(DesktopLayoutManager);
58 }; 52 };
59 53
60 } // namespace internal 54 } // namespace internal
61 } // namespace aura_shell 55 } // namespace aura_shell
62 56
63 #endif // UI_AURA_SHELL_DESKTOP_LAYOUT_MANAGER_H_ 57 #endif // UI_AURA_SHELL_DESKTOP_LAYOUT_MANAGER_H_
OLDNEW
« no previous file with comments | « ui/aura_shell/aura_shell.gyp ('k') | ui/aura_shell/desktop_layout_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698