| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_PANEL_LAYOUT_MANAGER_H_ | 5 #ifndef ASH_WM_PANEL_LAYOUT_MANAGER_H_ |
| 6 #define ASH_WM_PANEL_LAYOUT_MANAGER_H_ | 6 #define ASH_WM_PANEL_LAYOUT_MANAGER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <list> | 9 #include <list> |
| 10 | 10 |
| 11 #include "ash/ash_export.h" | 11 #include "ash/ash_export.h" |
| 12 #include "ash/launcher/launcher_icon_observer.h" | 12 #include "ash/launcher/launcher_icon_observer.h" |
| 13 #include "base/basictypes.h" | 13 #include "base/basictypes.h" |
| 14 #include "base/compiler_specific.h" | 14 #include "base/compiler_specific.h" |
| 15 #include "base/memory/scoped_ptr.h" |
| 15 #include "ui/aura/layout_manager.h" | 16 #include "ui/aura/layout_manager.h" |
| 16 #include "ui/aura/window_observer.h" | 17 #include "ui/aura/window_observer.h" |
| 17 | 18 |
| 18 namespace aura { | 19 namespace aura { |
| 19 class Window; | 20 class Window; |
| 20 } | 21 } |
| 21 | 22 |
| 22 namespace gfx { | 23 namespace gfx { |
| 23 class Rect; | 24 class Rect; |
| 24 } | 25 } |
| 25 | 26 |
| 27 namespace views { |
| 28 class Widget; |
| 29 } |
| 30 |
| 26 namespace ash { | 31 namespace ash { |
| 27 class Launcher; | 32 class Launcher; |
| 28 | 33 |
| 29 namespace internal { | 34 namespace internal { |
| 30 | 35 |
| 31 // PanelLayoutManager is responsible for organizing panels within the | 36 // PanelLayoutManager is responsible for organizing panels within the |
| 32 // workspace. It is associated with a specific container window (i.e. | 37 // workspace. It is associated with a specific container window (i.e. |
| 33 // kShellWindowId_PanelContainer) and controls the layout of any windows | 38 // kShellWindowId_PanelContainer) and controls the layout of any windows |
| 34 // added to that container. | 39 // added to that container. |
| 35 // | 40 // |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 aura::Window* window, const void* key, intptr_t old) OVERRIDE; | 74 aura::Window* window, const void* key, intptr_t old) OVERRIDE; |
| 70 | 75 |
| 71 private: | 76 private: |
| 72 typedef std::list<aura::Window*> PanelList; | 77 typedef std::list<aura::Window*> PanelList; |
| 73 | 78 |
| 74 // Called whenever the panel layout might change. | 79 // Called whenever the panel layout might change. |
| 75 void Relayout(); | 80 void Relayout(); |
| 76 | 81 |
| 77 // Called whenever the panel stacking order needs to be updated (e.g. focus | 82 // Called whenever the panel stacking order needs to be updated (e.g. focus |
| 78 // changes or a panel is moved). | 83 // changes or a panel is moved). |
| 79 void UpdateStacking(aura::Window* active_window); | 84 void UpdateStacking(aura::Window* active_panel); |
| 85 |
| 86 void UpdateCallout(aura::Window* active_panel); |
| 80 | 87 |
| 81 // Parent window associated with this layout manager. | 88 // Parent window associated with this layout manager. |
| 82 aura::Window* panel_container_; | 89 aura::Window* panel_container_; |
| 83 // Protect against recursive calls to Relayout(). | 90 // Protect against recursive calls to Relayout(). |
| 84 bool in_layout_; | 91 bool in_layout_; |
| 85 // Ordered list of unowned pointers to panel windows. | 92 // Ordered list of unowned pointers to panel windows. |
| 86 PanelList panel_windows_; | 93 PanelList panel_windows_; |
| 87 // The panel being dragged. | 94 // The panel being dragged. |
| 88 aura::Window* dragged_panel_; | 95 aura::Window* dragged_panel_; |
| 89 // The launcher we are observing for launcher icon changes. | 96 // The launcher we are observing for launcher icon changes. |
| 90 Launcher* launcher_; | 97 Launcher* launcher_; |
| 91 // The last active panel. Used to maintain stacking even if no panels are | 98 // The last active panel. Used to maintain stacking even if no panels are |
| 92 // currently focused. | 99 // currently focused. |
| 93 aura::Window* last_active_panel_; | 100 aura::Window* last_active_panel_; |
| 101 scoped_ptr<views::Widget> callout_widget_; |
| 94 | 102 |
| 95 DISALLOW_COPY_AND_ASSIGN(PanelLayoutManager); | 103 DISALLOW_COPY_AND_ASSIGN(PanelLayoutManager); |
| 96 }; | 104 }; |
| 97 | 105 |
| 98 } // namespace internal | 106 } // namespace internal |
| 99 } // namespace ash | 107 } // namespace ash |
| 100 | 108 |
| 101 #endif // ASH_WM_PANEL_LAYOUT_MANAGER_H_ | 109 #endif // ASH_WM_PANEL_LAYOUT_MANAGER_H_ |
| OLD | NEW |