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

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

Issue 10831383: No browserless Panels unless enabled by flag. (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 | chrome/common/chrome_switches.h » ('j') | 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() <= 96 // http://crbug.com/143506
97 chrome::VersionInfo::CHANNEL_UNKNOWN; 97 // TODO(jennb): Remove after channel check can be used.
98 // return chrome::VersionInfo::GetChannel() <= chrome::VersionInfo::CHANNEL_DEV;
99 // For now, use former flag to turn on browserless panels.
100 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kBrowserlessPanels))
101 return true;
102
103 return false;
98 } 104 }
99 105
100 PanelManager::PanelManager() 106 PanelManager::PanelManager()
101 : panel_mouse_watcher_(PanelMouseWatcher::Create()), 107 : panel_mouse_watcher_(PanelMouseWatcher::Create()),
102 auto_sizing_enabled_(true) { 108 auto_sizing_enabled_(true) {
103 // DisplaySettingsProvider should be created before the creation of strips 109 // DisplaySettingsProvider should be created before the creation of strips
104 // since some strip might depend on it. 110 // since some strip might depend on it.
105 display_settings_provider_.reset(DisplaySettingsProvider::Create()); 111 display_settings_provider_.reset(DisplaySettingsProvider::Create());
106 display_settings_provider_->AddDisplayAreaObserver(this); 112 display_settings_provider_->AddDisplayAreaObserver(this);
107 113
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 void PanelManager::SetMouseWatcher(PanelMouseWatcher* watcher) { 363 void PanelManager::SetMouseWatcher(PanelMouseWatcher* watcher) {
358 panel_mouse_watcher_.reset(watcher); 364 panel_mouse_watcher_.reset(watcher);
359 } 365 }
360 366
361 void PanelManager::OnPanelAnimationEnded(Panel* panel) { 367 void PanelManager::OnPanelAnimationEnded(Panel* panel) {
362 content::NotificationService::current()->Notify( 368 content::NotificationService::current()->Notify(
363 chrome::NOTIFICATION_PANEL_BOUNDS_ANIMATIONS_FINISHED, 369 chrome::NOTIFICATION_PANEL_BOUNDS_ANIMATIONS_FINISHED,
364 content::Source<Panel>(panel), 370 content::Source<Panel>(panel),
365 content::NotificationService::NoDetails()); 371 content::NotificationService::NoDetails());
366 } 372 }
OLDNEW
« no previous file with comments | « no previous file | chrome/common/chrome_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698