Chromium Code Reviews| Index: chrome/browser/ui/panels/panel.h |
| diff --git a/chrome/browser/ui/panels/panel.h b/chrome/browser/ui/panels/panel.h |
| index 6a78d4d2cbfae750d31a7b1c9065c32bfb183f5d..aa0289ec72542c3c72a9b2d3ee186c5643031370 100644 |
| --- a/chrome/browser/ui/panels/panel.h |
| +++ b/chrome/browser/ui/panels/panel.h |
| @@ -32,16 +32,25 @@ class Panel : public BrowserWindow, |
| public TabStripModelObserver, |
| public content::NotificationObserver { |
| public: |
| + enum StripOwner { |
|
jennb
2012/01/19 18:14:26
PanelLayout? More informative than StripOwner.
jianli
2012/01/19 22:24:41
Renamed to LayoutState, per discussion.
|
| + // The panel is docked to the bottom of the screen. The user might only be |
|
jennb
2012/01/19 18:14:26
For this comment and the next, I would drop the se
jianli
2012/01/19 22:24:41
Done.
|
| + // able to resize the panel. |
| + DOCKED, |
| + // The panel can appear anywhere on the screen. The user can resize or |
| + // reposition the panel at will. |
| + DETACHED, |
| + // The panel is put into the overflow area due to no space available in the |
|
jennb
2012/01/19 18:14:26
s/no space available/insufficient space
jianli
2012/01/19 22:24:41
Done.
|
| + // normal display area. |
|
jennb
2012/01/19 18:14:26
s/normal/docked
"normal" is vague and open to int
jianli
2012/01/19 22:24:41
Done.
|
| + IN_OVERFLOW |
| + }; |
| + |
| enum ExpansionState { |
| - // The panel is fully expanded with both title-bar and the client-area. |
| - EXPANDED, |
| - // The panel is shown with the title-bar only. |
| - TITLE_ONLY, |
| - // The panel is shown with 3-pixel line. |
| - MINIMIZED, |
| - // The panel is put into the overflow area due to no space available in the |
| - // normal display area. |
| - IN_OVERFLOW |
| + // The panel is fully expanded with both title-bar and the client-area. |
| + EXPANDED, |
| + // The panel is shown with the title-bar only. |
| + TITLE_ONLY, |
| + // The panel is shown with 3-pixel line. |
| + MINIMIZED |
| }; |
| // The panel can be minimized to 4-pixel lines. |
| @@ -56,6 +65,7 @@ class Panel : public BrowserWindow, |
| // Returns NULL if it cannot be found. |
| const Extension* GetExtension() const; |
| + void SetStripOwner(StripOwner new_strip_owner); |
| void SetExpansionState(ExpansionState new_expansion_state); |
| bool IsDrawingAttention() const; |
| @@ -218,8 +228,8 @@ class Panel : public BrowserWindow, |
| NativePanel* native_panel() { return native_panel_; } |
| Browser* browser() const { return browser_; } |
| + StripOwner strip_owner() const { return strip_owner_; } |
| ExpansionState expansion_state() const { return expansion_state_; } |
| - ExpansionState old_expansion_state() const { return old_expansion_state_; } |
| const gfx::Size& min_size() const { return min_size_; } |
| const gfx::Size& max_size() const { return max_size_; } |
| bool auto_resizable() const { return auto_resizable_; } |
| @@ -310,8 +320,8 @@ class Panel : public BrowserWindow, |
| // PanelBrowserWindowGtk/PanelBrowserView/PanelBrowserWindowCocoa. |
| NativePanel* native_panel_; // Weak, owns us. |
| + StripOwner strip_owner_; |
| ExpansionState expansion_state_; |
| - ExpansionState old_expansion_state_; |
| // Indicates whether the panel app icon is visible in the taskbar. |
| bool app_icon_visible_; |