| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/ui/panels/panel_browser_view.h" | 5 #include "chrome/browser/ui/panels/panel_browser_view.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "chrome/browser/ui/panels/panel.h" | 8 #include "chrome/browser/ui/panels/panel.h" |
| 9 #include "chrome/browser/ui/panels/panel_browser_frame_view.h" | 9 #include "chrome/browser/ui/panels/panel_browser_frame_view.h" |
| 10 #include "chrome/browser/ui/panels/panel_manager.h" | 10 #include "chrome/browser/ui/panels/panel_manager.h" |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 if (bounds_animator_->IsShowing()) | 100 if (bounds_animator_->IsShowing()) |
| 101 bounds_animator_->Reset(); | 101 bounds_animator_->Reset(); |
| 102 bounds_animator_->Show(); | 102 bounds_animator_->Show(); |
| 103 } | 103 } |
| 104 | 104 |
| 105 void PanelBrowserView::UpdateTitleBar() { | 105 void PanelBrowserView::UpdateTitleBar() { |
| 106 ::BrowserView::UpdateTitleBar(); | 106 ::BrowserView::UpdateTitleBar(); |
| 107 GetFrameView()->UpdateTitleBar(); | 107 GetFrameView()->UpdateTitleBar(); |
| 108 } | 108 } |
| 109 | 109 |
| 110 bool PanelBrowserView::GetSavedWindowPlacement( | 110 bool PanelBrowserView::GetSavedWindowBounds(gfx::Rect* bounds) const { |
| 111 gfx::Rect* bounds, | |
| 112 ui::WindowShowState* show_state) const { | |
| 113 *bounds = GetPanelBounds(); | 111 *bounds = GetPanelBounds(); |
| 114 *show_state = ui::SHOW_STATE_NORMAL; | |
| 115 return true; | 112 return true; |
| 116 } | 113 } |
| 117 | 114 |
| 118 void PanelBrowserView::OnWidgetActivationChanged(views::Widget* widget, | 115 void PanelBrowserView::OnWidgetActivationChanged(views::Widget* widget, |
| 119 bool active) { | 116 bool active) { |
| 120 ::BrowserView::OnWidgetActivationChanged(widget, active); | 117 ::BrowserView::OnWidgetActivationChanged(widget, active); |
| 121 | 118 |
| 122 #if defined(OS_WIN) | 119 #if defined(OS_WIN) |
| 123 // The panel window is in focus (actually accepting keystrokes) if it is | 120 // The panel window is in focus (actually accepting keystrokes) if it is |
| 124 // active and belongs to a foreground application. | 121 // active and belongs to a foreground application. |
| (...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 430 panel_browser_view_->mouse_pressed_point_.y() + delta_y)); | 427 panel_browser_view_->mouse_pressed_point_.y() + delta_y)); |
| 431 } | 428 } |
| 432 | 429 |
| 433 void NativePanelTestingWin::CancelDragTitlebar() { | 430 void NativePanelTestingWin::CancelDragTitlebar() { |
| 434 panel_browser_view_->OnTitlebarMouseCaptureLost(); | 431 panel_browser_view_->OnTitlebarMouseCaptureLost(); |
| 435 } | 432 } |
| 436 | 433 |
| 437 void NativePanelTestingWin::FinishDragTitlebar() { | 434 void NativePanelTestingWin::FinishDragTitlebar() { |
| 438 panel_browser_view_->OnTitlebarMouseReleased(); | 435 panel_browser_view_->OnTitlebarMouseReleased(); |
| 439 } | 436 } |
| OLD | NEW |