| 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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 // Detached panels do not minimize. However, extensions may call this API | 103 // Detached panels do not minimize. However, extensions may call this API |
| 104 // regardless of which strip the panel is in. So we just quietly return. | 104 // regardless of which strip the panel is in. So we just quietly return. |
| 105 } | 105 } |
| 106 | 106 |
| 107 void DetachedPanelStrip::RestorePanel(Panel* panel) { | 107 void DetachedPanelStrip::RestorePanel(Panel* panel) { |
| 108 DCHECK_EQ(this, panel->panel_strip()); | 108 DCHECK_EQ(this, panel->panel_strip()); |
| 109 // Detached panels do not minimize. However, extensions may call this API | 109 // Detached panels do not minimize. However, extensions may call this API |
| 110 // regardless of which strip the panel is in. So we just quietly return. | 110 // regardless of which strip the panel is in. So we just quietly return. |
| 111 } | 111 } |
| 112 | 112 |
| 113 void DetachedPanelStrip::MinimizeAll() { |
| 114 // Detached panels do not minimize. |
| 115 NOTREACHED(); |
| 116 } |
| 117 |
| 118 void DetachedPanelStrip::RestoreAll() { |
| 119 // Detached panels do not minimize. |
| 120 NOTREACHED(); |
| 121 } |
| 122 |
| 113 bool DetachedPanelStrip::CanMinimizePanel(const Panel* panel) const { | 123 bool DetachedPanelStrip::CanMinimizePanel(const Panel* panel) const { |
| 114 DCHECK_EQ(this, panel->panel_strip()); | 124 DCHECK_EQ(this, panel->panel_strip()); |
| 115 // Detached panels do not minimize. | 125 // Detached panels do not minimize. |
| 116 return false; | 126 return false; |
| 117 } | 127 } |
| 118 | 128 |
| 119 bool DetachedPanelStrip::IsPanelMinimized(const Panel* panel) const { | 129 bool DetachedPanelStrip::IsPanelMinimized(const Panel* panel) const { |
| 120 DCHECK_EQ(this, panel->panel_strip()); | 130 DCHECK_EQ(this, panel->panel_strip()); |
| 121 // Detached panels do not minimize. | 131 // Detached panels do not minimize. |
| 122 return false; | 132 return false; |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 panel->set_attention_mode( | 194 panel->set_attention_mode( |
| 185 static_cast<Panel::AttentionMode>(Panel::USE_PANEL_ATTENTION | | 195 static_cast<Panel::AttentionMode>(Panel::USE_PANEL_ATTENTION | |
| 186 Panel::USE_SYSTEM_ATTENTION)); | 196 Panel::USE_SYSTEM_ATTENTION)); |
| 187 panel->SetAlwaysOnTop(false); | 197 panel->SetAlwaysOnTop(false); |
| 188 panel->EnableResizeByMouse(true); | 198 panel->EnableResizeByMouse(true); |
| 189 } | 199 } |
| 190 | 200 |
| 191 void DetachedPanelStrip::OnPanelActiveStateChanged(Panel* panel) { | 201 void DetachedPanelStrip::OnPanelActiveStateChanged(Panel* panel) { |
| 192 } | 202 } |
| 193 | 203 |
| OLD | NEW |