Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(25)

Side by Side Diff: chrome/browser/ui/panels/panel_manager.cc

Issue 12430013: Fix panel showing logic when Chrome enters the fullscreen mode (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fix per feedback Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/browser/ui/panels/docked_panel_collection.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/panels/docked_panel_collection.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698