| 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/overflow_panel_strip.h" | 5 #include "chrome/browser/ui/panels/overflow_panel_strip.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "chrome/browser/ui/panels/panel_manager.h" | 8 #include "chrome/browser/ui/panels/panel_manager.h" |
| 9 #include "chrome/browser/ui/panels/panel_mouse_watcher.h" | 9 #include "chrome/browser/ui/panels/panel_mouse_watcher.h" |
| 10 #include "chrome/browser/ui/panels/panel_overflow_indicator.h" | 10 #include "chrome/browser/ui/panels/panel_overflow_indicator.h" |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 bool OverflowPanelStrip::IsPanelMinimized(const Panel* panel) const { | 183 bool OverflowPanelStrip::IsPanelMinimized(const Panel* panel) const { |
| 184 // All overflow panels are considered minimized. | 184 // All overflow panels are considered minimized. |
| 185 return true; | 185 return true; |
| 186 } | 186 } |
| 187 | 187 |
| 188 bool OverflowPanelStrip::CanShowPanelAsActive(const Panel* panel) const { | 188 bool OverflowPanelStrip::CanShowPanelAsActive(const Panel* panel) const { |
| 189 // All overflow panels cannot be shown as active. | 189 // All overflow panels cannot be shown as active. |
| 190 return false; | 190 return false; |
| 191 } | 191 } |
| 192 | 192 |
| 193 void OverflowPanelStrip::SavePanelPlacement(Panel* panel) { |
| 194 NOTREACHED(); |
| 195 } |
| 196 |
| 197 void OverflowPanelStrip::RestorePanelToSavedPlacement() { |
| 198 NOTREACHED(); |
| 199 } |
| 200 |
| 201 void OverflowPanelStrip::DiscardSavedPanelPlacement() { |
| 202 NOTREACHED(); |
| 203 } |
| 204 |
| 193 bool OverflowPanelStrip::CanDragPanel(const Panel* panel) const { | 205 bool OverflowPanelStrip::CanDragPanel(const Panel* panel) const { |
| 194 // All overflow panels are not draggable. | 206 // All overflow panels are not draggable. |
| 195 return false; | 207 return false; |
| 196 } | 208 } |
| 197 | 209 |
| 198 void OverflowPanelStrip::StartDraggingPanel(Panel* panel) { | 210 void OverflowPanelStrip::StartDraggingPanelWithinStrip(Panel* panel) { |
| 199 NOTREACHED(); | 211 NOTREACHED(); |
| 200 } | 212 } |
| 201 | 213 |
| 202 void OverflowPanelStrip::DragPanel(Panel* panel, int delta_x, int delta_y) { | 214 void OverflowPanelStrip::DragPanelWithinStrip(Panel* panel, |
| 215 int delta_x, |
| 216 int delta_y) { |
| 203 NOTREACHED(); | 217 NOTREACHED(); |
| 204 } | 218 } |
| 205 | 219 |
| 206 void OverflowPanelStrip::EndDraggingPanel(Panel* panel, bool cancelled) { | 220 void OverflowPanelStrip::EndDraggingPanelWithinStrip(Panel* panel, |
| 221 bool aborted) { |
| 207 NOTREACHED(); | 222 NOTREACHED(); |
| 208 } | 223 } |
| 209 | 224 |
| 210 void OverflowPanelStrip::RefreshLayout() { | 225 void OverflowPanelStrip::RefreshLayout() { |
| 211 if (panels_.empty()) | 226 if (panels_.empty()) |
| 212 return; | 227 return; |
| 213 DoRefresh(0, panels_.size() - 1); | 228 DoRefresh(0, panels_.size() - 1); |
| 214 } | 229 } |
| 215 | 230 |
| 216 void OverflowPanelStrip::DoRefresh(size_t start_index, size_t end_index) { | 231 void OverflowPanelStrip::DoRefresh(size_t start_index, size_t end_index) { |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 400 // expanded overflow panels when in full screen mode so no need | 415 // expanded overflow panels when in full screen mode so no need |
| 401 // to detect when mouse hovers over the overflow strip. | 416 // to detect when mouse hovers over the overflow strip. |
| 402 if (is_full_screen) | 417 if (is_full_screen) |
| 403 panel_manager_->mouse_watcher()->RemoveObserver(this); | 418 panel_manager_->mouse_watcher()->RemoveObserver(this); |
| 404 else | 419 else |
| 405 panel_manager_->mouse_watcher()->AddObserver(this); | 420 panel_manager_->mouse_watcher()->AddObserver(this); |
| 406 | 421 |
| 407 for (size_t i = 0; i < panels_.size(); ++i) | 422 for (size_t i = 0; i < panels_.size(); ++i) |
| 408 panels_[i]->FullScreenModeChanged(is_full_screen); | 423 panels_[i]->FullScreenModeChanged(is_full_screen); |
| 409 } | 424 } |
| OLD | NEW |