| OLD | NEW |
| 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 ASH_WM_COMPACT_STATUS_AREA_LAYOUT_MANAGER_H_ | 5 #ifndef ASH_WM_COMPACT_STATUS_AREA_LAYOUT_MANAGER_H_ |
| 6 #define ASH_WM_COMPACT_STATUS_AREA_LAYOUT_MANAGER_H_ | 6 #define ASH_WM_COMPACT_STATUS_AREA_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 views { | 13 namespace views { |
| 14 class Widget; | 14 class Widget; |
| 15 } | 15 } |
| 16 | 16 |
| 17 namespace aura_shell { | 17 namespace ash { |
| 18 namespace internal { | 18 namespace internal { |
| 19 | 19 |
| 20 // CompactStatusAreaLayoutManager places the status area in the top-right | 20 // CompactStatusAreaLayoutManager places the status area in the top-right |
| 21 // corner of the screen. | 21 // corner of the screen. |
| 22 class CompactStatusAreaLayoutManager : public aura::LayoutManager { | 22 class CompactStatusAreaLayoutManager : public aura::LayoutManager { |
| 23 public: | 23 public: |
| 24 explicit CompactStatusAreaLayoutManager(views::Widget* status_widget); | 24 explicit CompactStatusAreaLayoutManager(views::Widget* status_widget); |
| 25 virtual ~CompactStatusAreaLayoutManager(); | 25 virtual ~CompactStatusAreaLayoutManager(); |
| 26 | 26 |
| 27 // Overridden from aura::LayoutManager: | 27 // Overridden from aura::LayoutManager: |
| 28 virtual void OnWindowResized() OVERRIDE; | 28 virtual void OnWindowResized() OVERRIDE; |
| 29 virtual void OnWindowAddedToLayout(aura::Window* child) OVERRIDE; | 29 virtual void OnWindowAddedToLayout(aura::Window* child) OVERRIDE; |
| 30 virtual void OnWillRemoveWindowFromLayout(aura::Window* child) OVERRIDE; | 30 virtual void OnWillRemoveWindowFromLayout(aura::Window* child) OVERRIDE; |
| 31 virtual void OnChildWindowVisibilityChanged(aura::Window* child, | 31 virtual void OnChildWindowVisibilityChanged(aura::Window* child, |
| 32 bool visible) OVERRIDE; | 32 bool visible) OVERRIDE; |
| 33 virtual void SetChildBounds(aura::Window* child, | 33 virtual void SetChildBounds(aura::Window* child, |
| 34 const gfx::Rect& requested_bounds) OVERRIDE; | 34 const gfx::Rect& requested_bounds) OVERRIDE; |
| 35 | 35 |
| 36 private: | 36 private: |
| 37 // Place the status area widget in the corner of the screen. | 37 // Place the status area widget in the corner of the screen. |
| 38 void LayoutStatusArea(); | 38 void LayoutStatusArea(); |
| 39 | 39 |
| 40 views::Widget* status_widget_; | 40 views::Widget* status_widget_; |
| 41 | 41 |
| 42 DISALLOW_COPY_AND_ASSIGN(CompactStatusAreaLayoutManager); | 42 DISALLOW_COPY_AND_ASSIGN(CompactStatusAreaLayoutManager); |
| 43 }; | 43 }; |
| 44 | 44 |
| 45 } // namespace internal | 45 } // namespace internal |
| 46 } // namespace aura_shell | 46 } // namespace ash |
| 47 | 47 |
| 48 #endif // ASH_WM_COMPACT_STATUS_AREA_LAYOUT_MANAGER_H_ | 48 #endif // ASH_WM_COMPACT_STATUS_AREA_LAYOUT_MANAGER_H_ |
| OLD | NEW |