| 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 CHROME_BROWSER_UI_PANELS_PANEL_COLLECTION_H_ | 5 #ifndef CHROME_BROWSER_UI_PANELS_PANEL_COLLECTION_H_ |
| 6 #define CHROME_BROWSER_UI_PANELS_PANEL_COLLECTION_H_ | 6 #define CHROME_BROWSER_UI_PANELS_PANEL_COLLECTION_H_ |
| 7 | 7 |
| 8 #include "chrome/browser/ui/panels/panel_constants.h" | 8 #include "chrome/browser/ui/panels/panel_constants.h" |
| 9 #include "ui/gfx/point.h" | 9 #include "ui/gfx/point.h" |
| 10 #include "ui/gfx/rect.h" | 10 #include "ui/gfx/rect.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 // The panel is added and placed at default position that is decided by the | 27 // The panel is added and placed at default position that is decided by the |
| 28 // collection. | 28 // collection. |
| 29 DEFAULT_POSITION = 0x0, | 29 DEFAULT_POSITION = 0x0, |
| 30 // The panel is being added based on its current known position. | 30 // The panel is being added based on its current known position. |
| 31 KNOWN_POSITION = 0x1, | 31 KNOWN_POSITION = 0x1, |
| 32 // The panel is added and placed at top position (currently only used by | 32 // The panel is added and placed at top position (currently only used by |
| 33 // stacked collection) | 33 // stacked collection) |
| 34 TOP_POSITION = 0x2, | 34 TOP_POSITION = 0x2, |
| 35 // Do not update panel bounds. Only valid with DEFAULT_POSIITON. | 35 // Do not update panel bounds. Only valid with DEFAULT_POSIITON. |
| 36 DO_NOT_UPDATE_BOUNDS = 0x4, | 36 DO_NOT_UPDATE_BOUNDS = 0x4, |
| 37 // Wait for a brief delay before refreshing layout of the collection after | |
| 38 // adding panel to the collection. If not set, the collection will refresh | |
| 39 // its layout immediately. | |
| 40 DELAY_LAYOUT_REFRESH = 0x8, | |
| 41 // Do not refresh layout. Used by stacking. | 37 // Do not refresh layout. Used by stacking. |
| 42 NO_LAYOUT_REFRESH = 0x10, | 38 NO_LAYOUT_REFRESH = 0x8, |
| 43 // Collapse other inactive stacked panels such the tha new panel can fit | 39 // Collapse other inactive stacked panels such the tha new panel can fit |
| 44 // within the working area. Used by stacking. | 40 // within the working area. Used by stacking. |
| 45 COLLAPSE_TO_FIT = 0x20 | 41 COLLAPSE_TO_FIT = 0x10 |
| 46 }; | 42 }; |
| 47 | 43 |
| 48 enum RemovalReason { | 44 enum RemovalReason { |
| 49 PANEL_CLOSED, | 45 PANEL_CLOSED, |
| 50 PANEL_CHANGED_COLLECTION | 46 PANEL_CHANGED_COLLECTION |
| 51 }; | 47 }; |
| 52 | 48 |
| 53 Type type() const { return type_; } | 49 Type type() const { return type_; } |
| 54 | 50 |
| 55 // Called when the display area is changed. | 51 // Called when the display area is changed. |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 virtual void UpdatePanelOnCollectionChange(Panel* panel) = 0; | 139 virtual void UpdatePanelOnCollectionChange(Panel* panel) = 0; |
| 144 | 140 |
| 145 protected: | 141 protected: |
| 146 explicit PanelCollection(Type type); | 142 explicit PanelCollection(Type type); |
| 147 virtual ~PanelCollection(); | 143 virtual ~PanelCollection(); |
| 148 | 144 |
| 149 const Type type_; // Type of this panel collection. | 145 const Type type_; // Type of this panel collection. |
| 150 }; | 146 }; |
| 151 | 147 |
| 152 #endif // CHROME_BROWSER_UI_PANELS_PANEL_COLLECTION_H_ | 148 #endif // CHROME_BROWSER_UI_PANELS_PANEL_COLLECTION_H_ |
| OLD | NEW |