| 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 iter != panels_copy.end(); ++iter) | 50 iter != panels_copy.end(); ++iter) |
| 51 (*iter)->Close(); | 51 (*iter)->Close(); |
| 52 } | 52 } |
| 53 | 53 |
| 54 void DetachedPanelStrip::OnPanelAttentionStateChanged(Panel* panel) { | 54 void DetachedPanelStrip::OnPanelAttentionStateChanged(Panel* panel) { |
| 55 DCHECK_EQ(this, panel->panel_strip()); | 55 DCHECK_EQ(this, panel->panel_strip()); |
| 56 NOTIMPLEMENTED(); | 56 NOTIMPLEMENTED(); |
| 57 } | 57 } |
| 58 | 58 |
| 59 void DetachedPanelStrip::ResizePanelWindow( | 59 void DetachedPanelStrip::ResizePanelWindow( |
| 60 Panel* panel, const gfx::Size& preferred_window_size) { | 60 Panel* panel, |
| 61 const gfx::Size& preferred_window_size) { |
| 61 NOTIMPLEMENTED(); | 62 NOTIMPLEMENTED(); |
| 62 } | 63 } |
| 63 | 64 |
| 64 void DetachedPanelStrip::ActivatePanel(Panel* panel) { | 65 void DetachedPanelStrip::ActivatePanel(Panel* panel) { |
| 65 DCHECK_EQ(this, panel->panel_strip()); | 66 DCHECK_EQ(this, panel->panel_strip()); |
| 66 NOTIMPLEMENTED(); | 67 NOTIMPLEMENTED(); |
| 67 } | 68 } |
| 68 | 69 |
| 69 void DetachedPanelStrip::MinimizePanel(Panel* panel) { | 70 void DetachedPanelStrip::MinimizePanel(Panel* panel) { |
| 70 DCHECK_EQ(this, panel->panel_strip()); | 71 DCHECK_EQ(this, panel->panel_strip()); |
| (...skipping 29 matching lines...) Expand all Loading... |
| 100 gfx::Rect new_bounds(panel->GetBounds()); | 101 gfx::Rect new_bounds(panel->GetBounds()); |
| 101 new_bounds.set_origin( | 102 new_bounds.set_origin( |
| 102 panel_manager_->drag_controller()->dragging_panel_original_position()); | 103 panel_manager_->drag_controller()->dragging_panel_original_position()); |
| 103 panel->SetPanelBounds(new_bounds); | 104 panel->SetPanelBounds(new_bounds); |
| 104 } | 105 } |
| 105 } | 106 } |
| 106 | 107 |
| 107 bool DetachedPanelStrip::HasPanel(Panel* panel) const { | 108 bool DetachedPanelStrip::HasPanel(Panel* panel) const { |
| 108 return panels_.find(panel) != panels_.end(); | 109 return panels_.find(panel) != panels_.end(); |
| 109 } | 110 } |
| OLD | NEW |