| Index: chrome/browser/ui/panels/panel_browser_view.cc
|
| ===================================================================
|
| --- chrome/browser/ui/panels/panel_browser_view.cc (revision 98900)
|
| +++ chrome/browser/ui/panels/panel_browser_view.cc (working copy)
|
| @@ -37,7 +37,7 @@
|
| : BrowserView(browser),
|
| panel_(panel),
|
| bounds_(bounds),
|
| - original_height_(bounds.height()),
|
| + restored_height_(bounds.height()),
|
| closed_(false),
|
| focused_(false),
|
| mouse_pressed_(false),
|
| @@ -82,8 +82,13 @@
|
| }
|
|
|
| void PanelBrowserView::SetBounds(const gfx::Rect& bounds) {
|
| + if (bounds_ == bounds)
|
| + return;
|
| bounds_ = bounds;
|
|
|
| + if (panel_->expansion_state() == Panel::EXPANDED)
|
| + restored_height_ = bounds.height();
|
| +
|
| // No animation if the panel is being dragged.
|
| if (mouse_dragging_) {
|
| ::BrowserView::SetBounds(bounds);
|
| @@ -187,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();
|
| @@ -203,7 +208,7 @@
|
| break;
|
| default:
|
| NOTREACHED();
|
| - height = original_height_;
|
| + height = restored_height_;
|
| break;
|
| }
|
|
|
| @@ -311,6 +316,18 @@
|
| HandleKeyboardEvent(event);
|
| }
|
|
|
| +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();
|
| }
|
|
|