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/panel_manager.h" | 5 #include "chrome/browser/ui/panels/panel_manager.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "chrome/browser/fullscreen.h" | 10 #include "chrome/browser/fullscreen.h" |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 } | 171 } |
172 | 172 |
173 void PanelManager::Drag(int delta_x) { | 173 void PanelManager::Drag(int delta_x) { |
174 panel_strip_->Drag(delta_x); | 174 panel_strip_->Drag(delta_x); |
175 } | 175 } |
176 | 176 |
177 void PanelManager::EndDragging(bool cancelled) { | 177 void PanelManager::EndDragging(bool cancelled) { |
178 panel_strip_->EndDragging(cancelled); | 178 panel_strip_->EndDragging(cancelled); |
179 } | 179 } |
180 | 180 |
181 void PanelManager::OnPanelExpansionStateChanged(Panel* panel) { | 181 void PanelManager::OnPanelLayoutStateChanged(Panel* panel, |
182 panel_strip_->OnPanelExpansionStateChanged(panel); | 182 Panel::LayoutState old_state) { |
183 panel_overflow_strip_->OnPanelExpansionStateChanged(panel); | 183 panel_strip_->OnPanelLayoutStateChanged(panel, old_state); |
| 184 panel_overflow_strip_->OnPanelLayoutStateChanged(panel, old_state); |
| 185 } |
| 186 |
| 187 void PanelManager::OnPanelExpansionStateChanged( |
| 188 Panel* panel, Panel::ExpansionState old_state) { |
| 189 DCHECK_EQ(Panel::DOCKED, panel->layout_state()); |
| 190 panel_strip_->OnPanelExpansionStateChanged(panel, old_state); |
184 } | 191 } |
185 | 192 |
186 void PanelManager::OnPanelAttentionStateChanged(Panel* panel) { | 193 void PanelManager::OnPanelAttentionStateChanged(Panel* panel) { |
187 if (panel->expansion_state() == Panel::IN_OVERFLOW) | 194 if (panel->layout_state() == Panel::IN_OVERFLOW) |
188 panel_overflow_strip_->OnPanelAttentionStateChanged(panel); | 195 panel_overflow_strip_->OnPanelAttentionStateChanged(panel); |
189 } | 196 } |
190 | 197 |
191 void PanelManager::OnPreferredWindowSizeChanged( | 198 void PanelManager::OnPreferredWindowSizeChanged( |
192 Panel* panel, const gfx::Size& preferred_window_size) { | 199 Panel* panel, const gfx::Size& preferred_window_size) { |
193 if (!auto_sizing_enabled_) | 200 if (!auto_sizing_enabled_) |
194 return; | 201 return; |
195 panel_strip_->OnWindowSizeChanged(panel, preferred_window_size); | 202 panel_strip_->OnWindowSizeChanged(panel, preferred_window_size); |
196 } | 203 } |
197 | 204 |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
269 for (PanelOverflowStrip::Panels::const_iterator iter = | 276 for (PanelOverflowStrip::Panels::const_iterator iter = |
270 panel_overflow_strip_->panels().begin(); | 277 panel_overflow_strip_->panels().begin(); |
271 iter != panel_overflow_strip_->panels().end(); ++iter) | 278 iter != panel_overflow_strip_->panels().end(); ++iter) |
272 panels.push_back(*iter); | 279 panels.push_back(*iter); |
273 return panels; | 280 return panels; |
274 } | 281 } |
275 | 282 |
276 void PanelManager::SetMouseWatcher(PanelMouseWatcher* watcher) { | 283 void PanelManager::SetMouseWatcher(PanelMouseWatcher* watcher) { |
277 panel_mouse_watcher_.reset(watcher); | 284 panel_mouse_watcher_.reset(watcher); |
278 } | 285 } |
OLD | NEW |