| Index: chrome/browser/ui/panels/panel_manager.h
|
| ===================================================================
|
| --- chrome/browser/ui/panels/panel_manager.h (revision 96619)
|
| +++ chrome/browser/ui/panels/panel_manager.h (working copy)
|
| @@ -9,6 +9,7 @@
|
| #include <vector>
|
| #include "base/basictypes.h"
|
| #include "base/memory/scoped_ptr.h"
|
| +#include "base/timer.h"
|
| #include "chrome/browser/ui/panels/panel.h"
|
| #include "ui/gfx/rect.h"
|
|
|
| @@ -43,12 +44,20 @@
|
| int mouse_y) const;
|
|
|
| // Brings up or down the title-bar for all minimized panels.
|
| - void BringUpOrDownTitleBarForAllMinimizedPanels(bool bring_up);
|
| + void BringUpTitleBar();
|
| + void BringDownTitleBar();
|
|
|
| + // Returns the bottom position for the panel per its expansion state. If auto-
|
| + // hide bottom bar is present, we want to move the minimized panel to the
|
| + // bottom of the screen, not the bottom of the work area.
|
| + int GetBottomPositionPerExpansionState(
|
| + Panel::ExpansionState expansion_state) const;
|
| +
|
| int num_panels() const { return panels_.size(); }
|
|
|
| private:
|
| friend class PanelBrowserTest;
|
| + friend class PanelBrowserViewTest;
|
|
|
| typedef std::vector<Panel*> Panels;
|
|
|
| @@ -56,7 +65,7 @@
|
|
|
| // Applies the new work area. This is called by OnDisplayChanged and the test
|
| // code.
|
| - void SetWorkArea(const gfx::Rect& work_area);
|
| + void SetWorkArea(const gfx::Rect& work_area, int bottom_bar_height);
|
|
|
| // Handles all the panels that're delayed to be removed.
|
| void DelayedRemove();
|
| @@ -83,6 +92,8 @@
|
| void DragLeft();
|
| void DragRight();
|
|
|
| + void DoBringUpOrDownTitleBar(bool bring_up);
|
| +
|
| Panels panels_;
|
|
|
| // Stores the panels that are pending to remove. We want to delay the removal
|
| @@ -90,14 +101,20 @@
|
| Panels panels_pending_to_remove_;
|
|
|
| // Current work area used in computing the panel bounds.
|
| + // If the top-most bottom bar, like Windows taskbar or MacOSX dock, is always
|
| + // visible, it should not be included in the work area. Otherwise, the work
|
| + // area includes the potential area that would be taken by the bottom bar
|
| + // when it becomes visible.
|
| gfx::Rect work_area_;
|
|
|
| + // The height of the top-most bottom bar if it is auto-hidden. Otherwise, this
|
| + // value is 0.
|
| + int auto_hide_bottom_bar_height_;
|
| +
|
| // Used in computing the bounds of the next panel.
|
| int max_width_;
|
| int max_height_;
|
| - int min_x_;
|
| int current_x_;
|
| - int bottom_edge_y_;
|
|
|
| // Panel to drag.
|
| size_t dragging_panel_index_;
|
| @@ -111,6 +128,13 @@
|
| // to when the dragging ends.
|
| gfx::Rect dragging_panel_bounds_;
|
|
|
| + // Timer to check the visibility of auto-hide bottom bar to decide when to
|
| + // bring up or down the titlebar.
|
| + base::RepeatingTimer<PanelManager> bring_up_or_down_titlebar_timer_;
|
| +
|
| + // This is only used by the testing code to disable the above check.
|
| + bool should_check_auto_hide_bottom_bar_on_titlebar_change_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(PanelManager);
|
| };
|
|
|
|
|