| 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/docked_panel_strip.h" | 8 #include "chrome/browser/ui/panels/docked_panel_strip.h" |
| 9 #include "chrome/browser/ui/panels/panel_manager.h" | 9 #include "chrome/browser/ui/panels/panel_manager.h" |
| 10 #include "chrome/browser/ui/panels/panel_mouse_watcher.h" | 10 #include "chrome/browser/ui/panels/panel_mouse_watcher.h" |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 // Make a copy of the iterator as closing panels can modify the vector. | 144 // Make a copy of the iterator as closing panels can modify the vector. |
| 145 Panels panels_copy = panels_; | 145 Panels panels_copy = panels_; |
| 146 | 146 |
| 147 // Start from the bottom to avoid reshuffling. | 147 // Start from the bottom to avoid reshuffling. |
| 148 for (Panels::reverse_iterator iter = panels_copy.rbegin(); | 148 for (Panels::reverse_iterator iter = panels_copy.rbegin(); |
| 149 iter != panels_copy.rend(); ++iter) | 149 iter != panels_copy.rend(); ++iter) |
| 150 (*iter)->Close(); | 150 (*iter)->Close(); |
| 151 } | 151 } |
| 152 | 152 |
| 153 void OverflowPanelStrip::ResizePanelWindow( | 153 void OverflowPanelStrip::ResizePanelWindow( |
| 154 Panel* panel, const gfx::Size& preferred_window_size) { | 154 Panel* panel, |
| 155 const gfx::Size& preferred_window_size) { |
| 155 // Overflow uses its own panel window sizes. | 156 // Overflow uses its own panel window sizes. |
| 156 } | 157 } |
| 157 | 158 |
| 158 void OverflowPanelStrip::OnPanelAttentionStateChanged(Panel* panel) { | 159 void OverflowPanelStrip::OnPanelAttentionStateChanged(Panel* panel) { |
| 159 DCHECK_EQ(this, panel->panel_strip()); | 160 DCHECK_EQ(this, panel->panel_strip()); |
| 160 UpdateOverflowIndicatorAttention(); | 161 UpdateOverflowIndicatorAttention(); |
| 161 } | 162 } |
| 162 | 163 |
| 163 void OverflowPanelStrip::ActivatePanel(Panel* panel) { | 164 void OverflowPanelStrip::ActivatePanel(Panel* panel) { |
| 164 DCHECK_EQ(this, panel->panel_strip()); | 165 DCHECK_EQ(this, panel->panel_strip()); |
| (...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 395 // expanded overflow panels when in full screen mode so no need | 396 // expanded overflow panels when in full screen mode so no need |
| 396 // to detect when mouse hovers over the overflow strip. | 397 // to detect when mouse hovers over the overflow strip. |
| 397 if (is_full_screen) | 398 if (is_full_screen) |
| 398 panel_manager_->mouse_watcher()->RemoveObserver(this); | 399 panel_manager_->mouse_watcher()->RemoveObserver(this); |
| 399 else | 400 else |
| 400 panel_manager_->mouse_watcher()->AddObserver(this); | 401 panel_manager_->mouse_watcher()->AddObserver(this); |
| 401 | 402 |
| 402 for (size_t i = 0; i < panels_.size(); ++i) | 403 for (size_t i = 0; i < panels_.size(); ++i) |
| 403 panels_[i]->FullScreenModeChanged(is_full_screen); | 404 panels_[i]->FullScreenModeChanged(is_full_screen); |
| 404 } | 405 } |
| OLD | NEW |