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

Unified Diff: chrome/browser/ui/views/apps/app_info_dialog/app_info_dialog_views.cc

Issue 1166823002: Add a chrome://flag for the App Info dialog on Mac (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@20150603-MacViews-ModalChildConstrained-fromcl
Patch Set: rebase+fix conflicts Created 5 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/apps/app_info_dialog/app_info_dialog_views.cc
diff --git a/chrome/browser/ui/views/apps/app_info_dialog/app_info_dialog_views.cc b/chrome/browser/ui/views/apps/app_info_dialog/app_info_dialog_views.cc
index 6ef7371c4a070461f8c61d1b4a57ea476ff3a7bf..703daa863d591d3b685b5b823f2226e2d87d1de1 100644
--- a/chrome/browser/ui/views/apps/app_info_dialog/app_info_dialog_views.cc
+++ b/chrome/browser/ui/views/apps/app_info_dialog/app_info_dialog_views.cc
@@ -5,6 +5,7 @@
#include "chrome/browser/ui/views/apps/app_info_dialog/app_info_dialog_views.h"
#include "base/bind.h"
+#include "base/command_line.h"
#include "base/memory/scoped_ptr.h"
#include "base/metrics/histogram.h"
#include "chrome/browser/chrome_notification_types.h"
@@ -15,6 +16,7 @@
#include "chrome/browser/ui/views/apps/app_info_dialog/app_info_header_panel.h"
#include "chrome/browser/ui/views/apps/app_info_dialog/app_info_permissions_panel.h"
#include "chrome/browser/ui/views/apps/app_info_dialog/app_info_summary_panel.h"
+#include "chrome/common/chrome_switches.h"
#include "components/constrained_window/constrained_window_views.h"
#include "content/public/browser/web_contents.h"
#include "extensions/browser/extension_registry.h"
@@ -31,9 +33,26 @@
#include "ui/views/widget/widget.h"
#include "ui/views/window/dialog_delegate.h"
+namespace {
+
+#if defined(OS_MACOSX)
+bool GetSwitchFromCommandLine() {
benwells 2015/06/03 04:30:41 Nit: rename to IsAppInfoDialogMacEnabled or someth
tapted 2015/06/03 05:00:21 Done.
+ const base::CommandLine* command_line =
+ base::CommandLine::ForCurrentProcess();
+ if (command_line->HasSwitch(switches::kDisableAppInfoDialogMac))
+ return false;
+ if (command_line->HasSwitch(switches::kEnableAppInfoDialogMac))
+ return true;
+ return false; // Current default.
+}
+#endif
+
+} // namespace
+
bool CanShowAppInfoDialog() {
#if defined(OS_MACOSX)
- return app_list::switches::IsMacViewsAppListListEnabled();
benwells 2015/06/03 04:30:41 (not related to this patch) why is this ListList?
tapted 2015/06/03 05:00:21 It is Frerman, "L'ist" for "the is". (fix: https:
+ static const bool can_show = GetSwitchFromCommandLine();
+ return can_show;
#else
return true;
#endif

Powered by Google App Engine
This is Rietveld 408576698