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

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: Synced 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
« no previous file with comments | « chrome/browser/ui/panels/panel_manager.h ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 ea53bfce947407ef2ee33396e676231017d72206..6120c3971786885a564e71e974bac9001f51508a 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"
@@ -13,6 +14,8 @@
#include "chrome/browser/ui/panels/panel_overflow_strip.h"
#include "chrome/browser/ui/panels/panel_strip.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"
#include "ui/gfx/screen.h"
@@ -37,6 +40,22 @@ PanelManager* PanelManager::GetInstance() {
return instance.Pointer();
}
+// static
+bool PanelManager::ShouldUsePanels(const std::string& extension_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) ||
+ extension_id == std::string("nckgahadagoaajjgafhacjanaoiihapd") ||
+ extension_id == std::string("ljclpkphhpbpinifbeabbhlfddcpfdde") ||
+ extension_id == std::string("ppleadejekpmccmnpjdimmlfljlkdfej") ||
+ extension_id == std::string("eggnbpckecmjlblplehfpjjdhhidfdoj");
+ }
+
+ return true;
+}
+
PanelManager::PanelManager()
: panel_mouse_watcher_(PanelMouseWatcher::Create()),
auto_sizing_enabled_(true),
« no previous file with comments | « chrome/browser/ui/panels/panel_manager.h ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698