| 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_STRIP_H_ | 5 #ifndef CHROME_BROWSER_UI_PANELS_PANEL_STRIP_H_ |
| 6 #define CHROME_BROWSER_UI_PANELS_PANEL_STRIP_H_ | 6 #define CHROME_BROWSER_UI_PANELS_PANEL_STRIP_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "ui/gfx/rect.h" | 9 #include "ui/gfx/rect.h" |
| 10 | 10 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 | 29 |
| 30 // Updates the positioning of all panels in the collection, usually as | 30 // Updates the positioning of all panels in the collection, usually as |
| 31 // a result of removing or resizing a panel in collection. | 31 // a result of removing or resizing a panel in collection. |
| 32 virtual void RefreshLayout() = 0; | 32 virtual void RefreshLayout() = 0; |
| 33 | 33 |
| 34 // Adds |panel| to the collection of panels. | 34 // Adds |panel| to the collection of panels. |
| 35 virtual void AddPanel(Panel* panel) = 0; | 35 virtual void AddPanel(Panel* panel) = 0; |
| 36 | 36 |
| 37 // Removes |panel| from the collection of panels. Invoked asynchronously | 37 // Removes |panel| from the collection of panels. Invoked asynchronously |
| 38 // after a panel has been closed. | 38 // after a panel has been closed. |
| 39 // Returns |false| if the panel is not in the strip. | 39 virtual void RemovePanel(Panel* panel) = 0; |
| 40 virtual bool RemovePanel(Panel* panel) = 0; | |
| 41 | 40 |
| 42 // Closes all panels in the collection. Panels will be removed after closing. | 41 // Closes all panels in the collection. Panels will be removed after closing. |
| 43 virtual void CloseAll() = 0; | 42 virtual void CloseAll() = 0; |
| 44 | 43 |
| 45 // Resizes the |panel| to the |preferred_window_size| and updates the layout | 44 // Resizes the |panel| to the |preferred_window_size| and updates the layout |
| 46 // of other panels in the collection accordingly. | 45 // of other panels in the collection accordingly. |
| 47 // |preferred_window_size| is the outer dimensions of the window, not | 46 // |preferred_window_size| is the outer dimensions of the window, not |
| 48 // the content area, and is in screen coordinates. | 47 // the content area, and is in screen coordinates. |
| 49 // The preferred size may be adjusted to fit layout constraints. | 48 // The preferred size may be adjusted to fit layout constraints. |
| 50 virtual void ResizePanelWindow(Panel* panel, | 49 virtual void ResizePanelWindow(Panel* panel, |
| (...skipping 25 matching lines...) Expand all Loading... |
| 76 virtual void EndDraggingPanel(Panel* panel, bool cancelled) = 0; | 75 virtual void EndDraggingPanel(Panel* panel, bool cancelled) = 0; |
| 77 | 76 |
| 78 protected: | 77 protected: |
| 79 explicit PanelStrip(Type type); | 78 explicit PanelStrip(Type type); |
| 80 virtual ~PanelStrip(); | 79 virtual ~PanelStrip(); |
| 81 | 80 |
| 82 const Type type_; // Type of this panel strip. | 81 const Type type_; // Type of this panel strip. |
| 83 }; | 82 }; |
| 84 | 83 |
| 85 #endif // CHROME_BROWSER_UI_PANELS_PANEL_STRIP_H_ | 84 #endif // CHROME_BROWSER_UI_PANELS_PANEL_STRIP_H_ |
| OLD | NEW |