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

Unified Diff: chrome/browser/extensions/extension_tabs_module.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/about_flags.cc ('k') | chrome/browser/extensions/window_open_apitest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_tabs_module.cc
diff --git a/chrome/browser/extensions/extension_tabs_module.cc b/chrome/browser/extensions/extension_tabs_module.cc
index c9cb966c4227be05140781d5338ffbe0b25894c7..a16fee5b3293a1e142460e89023fa1b775e9205d 100644
--- a/chrome/browser/extensions/extension_tabs_module.cc
+++ b/chrome/browser/extensions/extension_tabs_module.cc
@@ -31,6 +31,7 @@
#include "chrome/browser/ui/browser_list.h"
#include "chrome/browser/ui/browser_navigator.h"
#include "chrome/browser/ui/browser_window.h"
+#include "chrome/browser/ui/panels/panel_manager.h"
#include "chrome/browser/ui/snapshot_tab_helper.h"
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
#include "chrome/browser/ui/window_sizer.h"
@@ -462,13 +463,11 @@ bool CreateWindowFunction::RunImpl() {
window_type = Browser::TYPE_POPUP;
extension_id = GetExtension()->id();
} else if (type_str == keys::kWindowTypeValuePanel) {
- if (CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kDisablePanels)) {
- window_type = Browser::TYPE_POPUP;
- } else {
- window_type = Browser::TYPE_PANEL;
- }
extension_id = GetExtension()->id();
+ if (PanelManager::ShouldUsePanels(extension_id))
+ window_type = Browser::TYPE_PANEL;
+ else
+ window_type = Browser::TYPE_POPUP;
} else if (type_str != keys::kWindowTypeValueNormal) {
error_ = keys::kInvalidWindowTypeError;
return false;
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | chrome/browser/extensions/window_open_apitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698