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 "chrome/browser/ui/panels/panel_constants.h" | 9 #include "chrome/browser/ui/panels/panel_constants.h" |
10 #include "ui/gfx/point.h" | 10 #include "ui/gfx/point.h" |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 virtual void CloseAll() = 0; | 56 virtual void CloseAll() = 0; |
57 | 57 |
58 // Resizes the |panel| to the |preferred_window_size| and updates the layout | 58 // Resizes the |panel| to the |preferred_window_size| and updates the layout |
59 // of other panels in the collection accordingly. | 59 // of other panels in the collection accordingly. |
60 // |preferred_window_size| is the outer dimensions of the window, not | 60 // |preferred_window_size| is the outer dimensions of the window, not |
61 // the content area, and is in screen coordinates. | 61 // the content area, and is in screen coordinates. |
62 // The preferred size may be adjusted to fit layout constraints. | 62 // The preferred size may be adjusted to fit layout constraints. |
63 virtual void ResizePanelWindow(Panel* panel, | 63 virtual void ResizePanelWindow(Panel* panel, |
64 const gfx::Size& preferred_window_size) = 0; | 64 const gfx::Size& preferred_window_size) = 0; |
65 | 65 |
66 // Returns true if |panel| can be resized by the user when in this strip. | 66 // Returns the sides from which |panel| can be resized by the user |
67 virtual bool CanResizePanel(const Panel* panel) const = 0; | 67 // if |panel| is resizable in this strip. |
| 68 virtual panel::Resizability GetPanelResizability( |
| 69 const Panel* panel) const = 0; |
68 | 70 |
69 // Change panel's bounds and take care of all possible side effects | 71 // Change panel's bounds and take care of all possible side effects |
70 // in ths strip as a result of the panel being resized by the user. | 72 // in ths strip as a result of the panel being resized by the user. |
71 // TODO (AndreiB) Add a parameter telling what how to approach animation | 73 // TODO (AndreiB) Add a parameter telling what how to approach animation |
72 // (no animation, continue existing, or start new). | 74 // (no animation, continue existing, or start new). |
73 virtual void OnPanelResizedByMouse(Panel* panel, | 75 virtual void OnPanelResizedByMouse(Panel* panel, |
74 const gfx::Rect& new_bounds) = 0; | 76 const gfx::Rect& new_bounds) = 0; |
75 | 77 |
76 // Invoked when the draw attention state of the panel has changed. | 78 // Invoked when the draw attention state of the panel has changed. |
77 // Subclass should update the display of the panel to match the new | 79 // Subclass should update the display of the panel to match the new |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 virtual void UpdatePanelOnStripChange(Panel* panel) = 0; | 134 virtual void UpdatePanelOnStripChange(Panel* panel) = 0; |
133 | 135 |
134 protected: | 136 protected: |
135 explicit PanelStrip(Type type); | 137 explicit PanelStrip(Type type); |
136 virtual ~PanelStrip(); | 138 virtual ~PanelStrip(); |
137 | 139 |
138 const Type type_; // Type of this panel strip. | 140 const Type type_; // Type of this panel strip. |
139 }; | 141 }; |
140 | 142 |
141 #endif // CHROME_BROWSER_UI_PANELS_PANEL_STRIP_H_ | 143 #endif // CHROME_BROWSER_UI_PANELS_PANEL_STRIP_H_ |
OLD | NEW |