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

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

Issue 10829402: Stop using browserless panels by default beyond trunk. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | 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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 } 86 }
87 87
88 return true; 88 return true;
89 } 89 }
90 90
91 // static 91 // static
92 bool PanelManager::UseBrowserlessPanels() { 92 bool PanelManager::UseBrowserlessPanels() {
93 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kOldPanels)) 93 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kOldPanels))
94 return false; 94 return false;
95 95
96 return chrome::VersionInfo::GetChannel() <= chrome::VersionInfo::CHANNEL_DEV; 96 return chrome::VersionInfo::GetChannel() <=
97 chrome::VersionInfo::CHANNEL_UNKNOWN;
97 } 98 }
98 99
99 PanelManager::PanelManager() 100 PanelManager::PanelManager()
100 : panel_mouse_watcher_(PanelMouseWatcher::Create()), 101 : panel_mouse_watcher_(PanelMouseWatcher::Create()),
101 auto_sizing_enabled_(true) { 102 auto_sizing_enabled_(true) {
102 // DisplaySettingsProvider should be created before the creation of strips 103 // DisplaySettingsProvider should be created before the creation of strips
103 // since some strip might depend on it. 104 // since some strip might depend on it.
104 display_settings_provider_.reset(DisplaySettingsProvider::Create()); 105 display_settings_provider_.reset(DisplaySettingsProvider::Create());
105 display_settings_provider_->AddDisplayAreaObserver(this); 106 display_settings_provider_->AddDisplayAreaObserver(this);
106 107
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 void PanelManager::SetMouseWatcher(PanelMouseWatcher* watcher) { 357 void PanelManager::SetMouseWatcher(PanelMouseWatcher* watcher) {
357 panel_mouse_watcher_.reset(watcher); 358 panel_mouse_watcher_.reset(watcher);
358 } 359 }
359 360
360 void PanelManager::OnPanelAnimationEnded(Panel* panel) { 361 void PanelManager::OnPanelAnimationEnded(Panel* panel) {
361 content::NotificationService::current()->Notify( 362 content::NotificationService::current()->Notify(
362 chrome::NOTIFICATION_PANEL_BOUNDS_ANIMATIONS_FINISHED, 363 chrome::NOTIFICATION_PANEL_BOUNDS_ANIMATIONS_FINISHED,
363 content::Source<Panel>(panel), 364 content::Source<Panel>(panel),
364 content::NotificationService::NoDetails()); 365 content::NotificationService::NoDetails());
365 } 366 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698