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