OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/detached_panel_strip.h" | 5 #include "chrome/browser/ui/panels/detached_panel_strip.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "chrome/browser/ui/panels/panel_drag_controller.h" | 9 #include "chrome/browser/ui/panels/panel_drag_controller.h" |
10 #include "chrome/browser/ui/panels/panel_manager.h" | 10 #include "chrome/browser/ui/panels/panel_manager.h" |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 iter != panels_copy.end(); ++iter) | 54 iter != panels_copy.end(); ++iter) |
55 (*iter)->Close(); | 55 (*iter)->Close(); |
56 } | 56 } |
57 | 57 |
58 void DetachedPanelStrip::OnPanelAttentionStateChanged(Panel* panel) { | 58 void DetachedPanelStrip::OnPanelAttentionStateChanged(Panel* panel) { |
59 DCHECK_EQ(this, panel->panel_strip()); | 59 DCHECK_EQ(this, panel->panel_strip()); |
60 NOTIMPLEMENTED(); | 60 NOTIMPLEMENTED(); |
61 } | 61 } |
62 | 62 |
63 void DetachedPanelStrip::ResizePanelWindow( | 63 void DetachedPanelStrip::ResizePanelWindow( |
64 Panel* panel, const gfx::Size& preferred_window_size) { | 64 Panel* panel, |
| 65 const gfx::Size& preferred_window_size, |
| 66 AutoResizeState auto_resize_state) { |
65 NOTIMPLEMENTED(); | 67 NOTIMPLEMENTED(); |
66 } | 68 } |
67 | 69 |
68 void DetachedPanelStrip::ActivatePanel(Panel* panel) { | 70 void DetachedPanelStrip::ActivatePanel(Panel* panel) { |
69 DCHECK_EQ(this, panel->panel_strip()); | 71 DCHECK_EQ(this, panel->panel_strip()); |
70 NOTIMPLEMENTED(); | 72 NOTIMPLEMENTED(); |
71 } | 73 } |
72 | 74 |
73 void DetachedPanelStrip::MinimizePanel(Panel* panel) { | 75 void DetachedPanelStrip::MinimizePanel(Panel* panel) { |
74 DCHECK_EQ(this, panel->panel_strip()); | 76 DCHECK_EQ(this, panel->panel_strip()); |
(...skipping 25 matching lines...) Expand all Loading... |
100 } | 102 } |
101 | 103 |
102 void DetachedPanelStrip::EndDraggingPanel(Panel* panel, bool cancelled) { | 104 void DetachedPanelStrip::EndDraggingPanel(Panel* panel, bool cancelled) { |
103 if (cancelled) { | 105 if (cancelled) { |
104 gfx::Rect new_bounds(panel->GetBounds()); | 106 gfx::Rect new_bounds(panel->GetBounds()); |
105 new_bounds.set_origin( | 107 new_bounds.set_origin( |
106 panel_manager_->drag_controller()->dragging_panel_original_position()); | 108 panel_manager_->drag_controller()->dragging_panel_original_position()); |
107 panel->SetPanelBounds(new_bounds); | 109 panel->SetPanelBounds(new_bounds); |
108 } | 110 } |
109 } | 111 } |
OLD | NEW |