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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 void DetachedPanelStrip::MinimizePanel(Panel* panel) { | 70 void DetachedPanelStrip::MinimizePanel(Panel* panel) { |
71 DCHECK_EQ(this, panel->panel_strip()); | 71 DCHECK_EQ(this, panel->panel_strip()); |
72 NOTIMPLEMENTED(); | 72 NOTIMPLEMENTED(); |
73 } | 73 } |
74 | 74 |
75 void DetachedPanelStrip::RestorePanel(Panel* panel) { | 75 void DetachedPanelStrip::RestorePanel(Panel* panel) { |
76 DCHECK_EQ(this, panel->panel_strip()); | 76 DCHECK_EQ(this, panel->panel_strip()); |
77 NOTIMPLEMENTED(); | 77 NOTIMPLEMENTED(); |
78 } | 78 } |
79 | 79 |
80 bool DetachedPanelStrip::IsPanelMinimized(Panel* panel) const { | |
81 DCHECK_EQ(this, panel->panel_strip()); | |
82 NOTIMPLEMENTED(); | |
83 return false; | |
84 } | |
85 | |
86 bool DetachedPanelStrip::CanShowPanelAsActive(const Panel* panel) const { | 80 bool DetachedPanelStrip::CanShowPanelAsActive(const Panel* panel) const { |
87 // All detached panels can be shown as active. | 81 // All detached panels can be shown as active. |
88 return true; | 82 return true; |
89 } | 83 } |
90 | 84 |
91 bool DetachedPanelStrip::CanDragPanel(const Panel* panel) const { | 85 bool DetachedPanelStrip::CanDragPanel(const Panel* panel) const { |
92 // All detached panels are draggable. | 86 // All detached panels are draggable. |
93 return true; | 87 return true; |
94 } | 88 } |
95 | 89 |
(...skipping 11 matching lines...) Expand all Loading... |
107 gfx::Rect new_bounds(panel->GetBounds()); | 101 gfx::Rect new_bounds(panel->GetBounds()); |
108 new_bounds.set_origin( | 102 new_bounds.set_origin( |
109 panel_manager_->drag_controller()->dragging_panel_original_position()); | 103 panel_manager_->drag_controller()->dragging_panel_original_position()); |
110 panel->SetPanelBounds(new_bounds); | 104 panel->SetPanelBounds(new_bounds); |
111 } | 105 } |
112 } | 106 } |
113 | 107 |
114 bool DetachedPanelStrip::HasPanel(Panel* panel) const { | 108 bool DetachedPanelStrip::HasPanel(Panel* panel) const { |
115 return panels_.find(panel) != panels_.end(); | 109 return panels_.find(panel) != panels_.end(); |
116 } | 110 } |
OLD | NEW |