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

Side by Side Diff: chrome/browser/ui/panels/stacked_panel_collection.h

Issue 14188014: Rename NativePanelStack to NativePanelStackWindow (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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
OLDNEW
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 CHROME_BROWSER_UI_PANELS_STACKED_PANEL_COLLECTION_H_ 5 #ifndef CHROME_BROWSER_UI_PANELS_STACKED_PANEL_COLLECTION_H_
6 #define CHROME_BROWSER_UI_PANELS_STACKED_PANEL_COLLECTION_H_ 6 #define CHROME_BROWSER_UI_PANELS_STACKED_PANEL_COLLECTION_H_
7 7
8 #include <list> 8 #include <list>
9 #include <vector> 9 #include <vector>
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "chrome/browser/ui/panels/panel_collection.h" 11 #include "chrome/browser/ui/panels/panel_collection.h"
12 #include "chrome/browser/ui/panels/panel_constants.h" 12 #include "chrome/browser/ui/panels/panel_constants.h"
13 #include "ui/gfx/rect.h" 13 #include "ui/gfx/rect.h"
14 14
15 class NativePanelStack; 15 class NativePanelStackWindow;
16 class PanelManager; 16 class PanelManager;
17 namespace gfx { 17 namespace gfx {
18 class Vector2d; 18 class Vector2d;
19 } 19 }
20 20
21 class StackedPanelCollection : public PanelCollection { 21 class StackedPanelCollection : public PanelCollection {
22 public: 22 public:
23 typedef std::list<Panel*> Panels; 23 typedef std::list<Panel*> Panels;
24 24
25 explicit StackedPanelCollection(PanelManager* panel_manager); 25 explicit StackedPanelCollection(PanelManager* panel_manager);
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 bool HasPanel(Panel* panel) const; 64 bool HasPanel(Panel* panel) const;
65 65
66 void MoveAllDraggingPanelsInstantly(const gfx::Vector2d& delta_origin); 66 void MoveAllDraggingPanelsInstantly(const gfx::Vector2d& delta_origin);
67 67
68 // Returns the maximum available space from the bottom of the stack. The 68 // Returns the maximum available space from the bottom of the stack. The
69 // maximum available space is defined as the distance between the bottom 69 // maximum available space is defined as the distance between the bottom
70 // of the stack and the bottom of the working area, assuming that all inactive 70 // of the stack and the bottom of the working area, assuming that all inactive
71 // panels are collapsed. 71 // panels are collapsed.
72 int GetMaximiumAvailableBottomSpace() const; 72 int GetMaximiumAvailableBottomSpace() const;
73 73
74 NativePanelStack* native_stack() const { return native_stack_; } 74 NativePanelStackWindow* native_stack() const { return native_stack_; }
75 int num_panels() const { return panels_.size(); } 75 int num_panels() const { return panels_.size(); }
76 const Panels& panels() const { return panels_; } 76 const Panels& panels() const { return panels_; }
77 Panel* top_panel() const { return panels_.empty() ? NULL : panels_.front(); } 77 Panel* top_panel() const { return panels_.empty() ? NULL : panels_.front(); }
78 Panel* bottom_panel() const { 78 Panel* bottom_panel() const {
79 return panels_.empty() ? NULL : panels_.back(); 79 return panels_.empty() ? NULL : panels_.back();
80 } 80 }
81 Panel* most_recently_active_panel() const { 81 Panel* most_recently_active_panel() const {
82 return most_recently_active_panels_.empty() ? 82 return most_recently_active_panels_.empty() ?
83 NULL : most_recently_active_panels_.front(); 83 NULL : most_recently_active_panels_.front();
84 } 84 }
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 // Minimizes or restores all panels in the collection. 123 // Minimizes or restores all panels in the collection.
124 void MinimizeAll(); 124 void MinimizeAll();
125 void RestoreAll(Panel* panel_clicked); 125 void RestoreAll(Panel* panel_clicked);
126 126
127 void UpdatePanelCornerStyle(Panel* panel); 127 void UpdatePanelCornerStyle(Panel* panel);
128 128
129 void UpdateNativeStackBounds(); 129 void UpdateNativeStackBounds();
130 130
131 PanelManager* panel_manager_; 131 PanelManager* panel_manager_;
132 132
133 NativePanelStack* native_stack_; // Weak, owns us. 133 NativePanelStackWindow* native_stack_; // Weak, owns us.
134 134
135 Panels panels_; // The top panel is in the front of the list. 135 Panels panels_; // The top panel is in the front of the list.
136 136
137 // Keeps track of the panels in their active order. The most recently active 137 // Keeps track of the panels in their active order. The most recently active
138 // panel is in the front of the list. 138 // panel is in the front of the list.
139 Panels most_recently_active_panels_; 139 Panels most_recently_active_panels_;
140 140
141 // Used to save the placement information for a panel. 141 // Used to save the placement information for a panel.
142 PanelPlacement saved_panel_placement_; 142 PanelPlacement saved_panel_placement_;
143 143
144 bool minimizing_all_; // True while minimizing all panels. 144 bool minimizing_all_; // True while minimizing all panels.
145 145
146 DISALLOW_COPY_AND_ASSIGN(StackedPanelCollection); 146 DISALLOW_COPY_AND_ASSIGN(StackedPanelCollection);
147 }; 147 };
148 148
149 #endif // CHROME_BROWSER_UI_PANELS_STACKED_PANEL_COLLECTION_H_ 149 #endif // CHROME_BROWSER_UI_PANELS_STACKED_PANEL_COLLECTION_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/panels/panel_manager.cc ('k') | chrome/browser/ui/panels/stacked_panel_collection.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698