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