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

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

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