| 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/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 | 188 |
| 189 void PanelManager::OnDisplayChanged() { | 189 void PanelManager::OnDisplayChanged() { |
| 190 docked_collection_->OnDisplayChanged(); | 190 docked_collection_->OnDisplayChanged(); |
| 191 detached_collection_->OnDisplayChanged(); | 191 detached_collection_->OnDisplayChanged(); |
| 192 for (Stacks::const_iterator iter = stacks_.begin(); | 192 for (Stacks::const_iterator iter = stacks_.begin(); |
| 193 iter != stacks_.end(); iter++) | 193 iter != stacks_.end(); iter++) |
| 194 (*iter)->OnDisplayChanged(); | 194 (*iter)->OnDisplayChanged(); |
| 195 } | 195 } |
| 196 | 196 |
| 197 void PanelManager::OnFullScreenModeChanged(bool is_full_screen) { | 197 void PanelManager::OnFullScreenModeChanged(bool is_full_screen) { |
| 198 docked_collection_->OnFullScreenModeChanged(is_full_screen); | 198 std::vector<Panel*> all_panels = panels(); |
| 199 for (std::vector<Panel*>::const_iterator iter = all_panels.begin(); |
| 200 iter != all_panels.end(); ++iter) { |
| 201 (*iter)->FullScreenModeChanged(is_full_screen); |
| 202 } |
| 199 } | 203 } |
| 200 | 204 |
| 201 int PanelManager::GetMaxPanelWidth(const gfx::Rect& work_area) const { | 205 int PanelManager::GetMaxPanelWidth(const gfx::Rect& work_area) const { |
| 202 return static_cast<int>(work_area.width() * kPanelMaxWidthFactor); | 206 return static_cast<int>(work_area.width() * kPanelMaxWidthFactor); |
| 203 } | 207 } |
| 204 | 208 |
| 205 int PanelManager::GetMaxPanelHeight(const gfx::Rect& work_area) const { | 209 int PanelManager::GetMaxPanelHeight(const gfx::Rect& work_area) const { |
| 206 return static_cast<int>(work_area.height() * kPanelMaxHeightFactor); | 210 return static_cast<int>(work_area.height() * kPanelMaxHeightFactor); |
| 207 } | 211 } |
| 208 | 212 |
| (...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 536 void PanelManager::SetMouseWatcher(PanelMouseWatcher* watcher) { | 540 void PanelManager::SetMouseWatcher(PanelMouseWatcher* watcher) { |
| 537 panel_mouse_watcher_.reset(watcher); | 541 panel_mouse_watcher_.reset(watcher); |
| 538 } | 542 } |
| 539 | 543 |
| 540 void PanelManager::OnPanelAnimationEnded(Panel* panel) { | 544 void PanelManager::OnPanelAnimationEnded(Panel* panel) { |
| 541 content::NotificationService::current()->Notify( | 545 content::NotificationService::current()->Notify( |
| 542 chrome::NOTIFICATION_PANEL_BOUNDS_ANIMATIONS_FINISHED, | 546 chrome::NOTIFICATION_PANEL_BOUNDS_ANIMATIONS_FINISHED, |
| 543 content::Source<Panel>(panel), | 547 content::Source<Panel>(panel), |
| 544 content::NotificationService::NoDetails()); | 548 content::NotificationService::NoDetails()); |
| 545 } | 549 } |
| OLD | NEW |