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

Unified Diff: chrome/browser/ui/panels/panel_manager.cc

Issue 8863011: Panels back behind a flag. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix typo Created 9 years 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/panels/panel_manager.cc
diff --git a/chrome/browser/ui/panels/panel_manager.cc b/chrome/browser/ui/panels/panel_manager.cc
index 30eb6cd95df05814e63b4b48a5ebe3500667a3f1..1dd3ea21483da644dc6d777a002db46737bb2e04 100644
--- a/chrome/browser/ui/panels/panel_manager.cc
+++ b/chrome/browser/ui/panels/panel_manager.cc
@@ -4,6 +4,7 @@
#include "chrome/browser/ui/panels/panel_manager.h"
+#include "base/command_line.h"
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
#include "chrome/browser/fullscreen.h"
@@ -14,6 +15,8 @@
#include "chrome/browser/ui/panels/panel_strip.h"
#include "chrome/browser/ui/window_sizer.h"
#include "chrome/common/chrome_notification_types.h"
+#include "chrome/common/chrome_switches.h"
+#include "chrome/common/chrome_version_info.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_source.h"
@@ -37,6 +40,22 @@ PanelManager* PanelManager::GetInstance() {
return instance.Pointer();
}
+// static
+bool PanelManager::ShouldUsePanels(const std::string& id) {
+ chrome::VersionInfo::Channel channel = chrome::VersionInfo::GetChannel();
+ if (channel == chrome::VersionInfo::CHANNEL_STABLE ||
+ channel == chrome::VersionInfo::CHANNEL_BETA) {
+ return CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnablePanels) ||
+ id == std::string("nckgahadagoaajjgafhacjanaoiihapd") ||
+ id == std::string("ljclpkphhpbpinifbeabbhlfddcpfdde") ||
+ id == std::string("ppleadejekpmccmnpjdimmlfljlkdfej") ||
+ id == std::string("eggnbpckecmjlblplehfpjjdhhidfdoj");
+ }
+
+ return true;
+}
+
PanelManager::PanelManager()
: panel_mouse_watcher_(PanelMouseWatcher::Create()),
auto_sizing_enabled_(true),

Powered by Google App Engine
This is Rietveld 408576698