Chromium Code Reviews| Index: chrome/browser/ui/panels/panel_browser_view.h |
| =================================================================== |
| --- chrome/browser/ui/panels/panel_browser_view.h (revision 90291) |
| +++ chrome/browser/ui/panels/panel_browser_view.h (working copy) |
| @@ -24,13 +24,22 @@ |
| public NativePanel, |
| public ui::AnimationDelegate { |
| public: |
| + enum ExpandState { |
|
jennb
2011/06/27 23:18:02
This ExpandState seems like something all platform
jianli
2011/06/29 01:28:12
Moved to Panel.
|
| + FULLY_RESTORED, |
| + TITLEBAR_RESTORED, |
| + FULLY_MINIMIZED |
| + }; |
| + |
| PanelBrowserView(Browser* browser, Panel* panel, const gfx::Rect& bounds); |
| virtual ~PanelBrowserView(); |
| Panel* panel() const { return panel_.get(); } |
| bool closed() const { return closed_; } |
| bool focused() const { return focused_; } |
| + ExpandState expand_state() const { return expand_state_; } |
| + PanelBrowserFrameView* GetFrameView() const; |
| + |
| // Called from frame view when title bar receives a mouse event. |
| // Return true if the event is handled. |
| bool OnTitleBarMousePressed(const views::MouseEvent& event); |
| @@ -64,7 +73,7 @@ |
| virtual gfx::Rect GetPanelBounds() const OVERRIDE; |
| virtual void SetPanelBounds(const gfx::Rect& bounds) OVERRIDE; |
| virtual void MinimizePanel() OVERRIDE; |
| - virtual void RestorePanel() OVERRIDE; |
| + virtual void RestorePanel(bool titlebar_only) OVERRIDE; |
| virtual void ClosePanel() OVERRIDE; |
| virtual void ActivatePanel() OVERRIDE; |
| virtual void DeactivatePanel() OVERRIDE; |
| @@ -79,9 +88,9 @@ |
| // Overridden from AnimationDelegate: |
| virtual void AnimationProgressed(const ui::Animation* animation) OVERRIDE; |
| - PanelBrowserFrameView* GetFrameView() const; |
| bool EndDragging(bool cancelled); |
| void MinimizeOrRestore(); |
| + void AdjustHeight(int height); |
| scoped_ptr<Panel> panel_; |
| gfx::Rect bounds_; |
| @@ -89,8 +98,10 @@ |
| // Stores the original height of the panel so we can restore it after it's |
| // been minimized. |
| int original_height_; |
| - bool minimized_; |
| + // Is the panel restored, minimized, or partially restored with titlebar? |
| + ExpandState expand_state_; |
| + |
| // Is the panel being closed? Do not use it when it is closed. |
| bool closed_; |