| Index: chrome/browser/ui/panels/panel_browser_view.cc
|
| ===================================================================
|
| --- chrome/browser/ui/panels/panel_browser_view.cc (revision 96104)
|
| +++ chrome/browser/ui/panels/panel_browser_view.cc (working copy)
|
| @@ -40,7 +40,7 @@
|
| : BrowserView(browser),
|
| panel_(panel),
|
| bounds_(bounds),
|
| - original_height_(bounds.height()),
|
| + restored_height_(bounds.height()),
|
| closed_(false),
|
| focused_(false),
|
| mouse_pressed_(false),
|
| @@ -86,6 +86,8 @@
|
|
|
| void PanelBrowserView::SetBounds(const gfx::Rect& bounds) {
|
| bounds_ = bounds;
|
| + if (panel_->expansion_state() == Panel::EXPANDED)
|
| + restored_height_ = bounds.height();
|
|
|
| //// No animation if the panel is being dragged.
|
| if (mouse_dragging_) {
|
| @@ -190,7 +192,7 @@
|
| int height;
|
| switch (expansion_state) {
|
| case Panel::EXPANDED:
|
| - height = original_height_;
|
| + height = restored_height_;
|
| break;
|
| case Panel::TITLE_ONLY:
|
| height = GetFrameView()->NonClientTopBorderHeight();
|
| @@ -206,7 +208,7 @@
|
| break;
|
| default:
|
| NOTREACHED();
|
| - height = original_height_;
|
| + height = restored_height_;
|
| break;
|
| }
|
|
|
| @@ -301,6 +303,18 @@
|
| GetFrameView()->SchedulePaint();
|
| }
|
|
|
| +gfx::Size PanelBrowserView::GetNonClientAreaExtent() const {
|
| + return GetFrameView()->NonClientAreaSize();
|
| +}
|
| +
|
| +int PanelBrowserView::GetRestoredHeight() const {
|
| + return restored_height_;
|
| +}
|
| +
|
| +void PanelBrowserView::SetRestoredHeight(int height) {
|
| + restored_height_ = height;
|
| +}
|
| +
|
| Browser* PanelBrowserView::GetPanelBrowser() const {
|
| return browser();
|
| }
|
|
|