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::GetSavedWindowBounds(gfx::Rect* bounds) const { | 110 bool PanelBrowserView::GetSavedWindowPlacement( |
| 111 gfx::Rect* bounds, |
| 112 ui::WindowShowState* show_state) const { |
111 *bounds = GetPanelBounds(); | 113 *bounds = GetPanelBounds(); |
| 114 *show_state = ui::SHOW_STATE_NORMAL; |
112 return true; | 115 return true; |
113 } | 116 } |
114 | 117 |
115 void PanelBrowserView::OnWidgetActivationChanged(views::Widget* widget, | 118 void PanelBrowserView::OnWidgetActivationChanged(views::Widget* widget, |
116 bool active) { | 119 bool active) { |
117 ::BrowserView::OnWidgetActivationChanged(widget, active); | 120 ::BrowserView::OnWidgetActivationChanged(widget, active); |
118 | 121 |
119 #if defined(OS_WIN) | 122 #if defined(OS_WIN) |
120 // The panel window is in focus (actually accepting keystrokes) if it is | 123 // The panel window is in focus (actually accepting keystrokes) if it is |
121 // active and belongs to a foreground application. | 124 // active and belongs to a foreground application. |
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
429 panel_browser_view_->mouse_pressed_point_.y() + delta_y)); | 432 panel_browser_view_->mouse_pressed_point_.y() + delta_y)); |
430 } | 433 } |
431 | 434 |
432 void NativePanelTestingWin::CancelDragTitlebar() { | 435 void NativePanelTestingWin::CancelDragTitlebar() { |
433 panel_browser_view_->OnTitlebarMouseCaptureLost(); | 436 panel_browser_view_->OnTitlebarMouseCaptureLost(); |
434 } | 437 } |
435 | 438 |
436 void NativePanelTestingWin::FinishDragTitlebar() { | 439 void NativePanelTestingWin::FinishDragTitlebar() { |
437 panel_browser_view_->OnTitlebarMouseReleased(); | 440 panel_browser_view_->OnTitlebarMouseReleased(); |
438 } | 441 } |
OLD | NEW |