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

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 after typo fix 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
« no previous file with comments | « chrome/browser/ui/app_list/app_list_controller_delegate.cc ('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/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 7ac17d1adc68a0bc821d9caf34f1f22d01908791..0eb10bc18c5c9a48247253431485fbf5803bcc4d 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 IsAppInfoDialogMacEnabled() {
+ 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::IsMacViewsAppListEnabled();
+ static const bool can_show = IsAppInfoDialogMacEnabled();
+ return can_show;
#else
return true;
#endif
« no previous file with comments | « chrome/browser/ui/app_list/app_list_controller_delegate.cc ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698