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, |
| 157 AutoResizeState auto_resize_state) { |
156 // Overflow uses its own panel window sizes. | 158 // Overflow uses its own panel window sizes. |
157 } | 159 } |
158 | 160 |
159 void OverflowPanelStrip::OnPanelAttentionStateChanged(Panel* panel) { | 161 void OverflowPanelStrip::OnPanelAttentionStateChanged(Panel* panel) { |
160 DCHECK_EQ(this, panel->panel_strip()); | 162 DCHECK_EQ(this, panel->panel_strip()); |
161 UpdateOverflowIndicatorAttention(); | 163 UpdateOverflowIndicatorAttention(); |
162 } | 164 } |
163 | 165 |
164 void OverflowPanelStrip::ActivatePanel(Panel* panel) { | 166 void OverflowPanelStrip::ActivatePanel(Panel* panel) { |
165 DCHECK_EQ(this, panel->panel_strip()); | 167 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 | 398 // expanded overflow panels when in full screen mode so no need |
397 // to detect when mouse hovers over the overflow strip. | 399 // to detect when mouse hovers over the overflow strip. |
398 if (is_full_screen) | 400 if (is_full_screen) |
399 panel_manager_->mouse_watcher()->RemoveObserver(this); | 401 panel_manager_->mouse_watcher()->RemoveObserver(this); |
400 else | 402 else |
401 panel_manager_->mouse_watcher()->AddObserver(this); | 403 panel_manager_->mouse_watcher()->AddObserver(this); |
402 | 404 |
403 for (size_t i = 0; i < panels_.size(); ++i) | 405 for (size_t i = 0; i < panels_.size(); ++i) |
404 panels_[i]->FullScreenModeChanged(is_full_screen); | 406 panels_[i]->FullScreenModeChanged(is_full_screen); |
405 } | 407 } |
OLD | NEW |