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

Unified Diff: chrome/browser/ui/app_list/app_list_controller_delegate.cc

Issue 276833002: Make the App Info Dialog appear modal (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed comment Created 6 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/app_list/app_list_controller_delegate.cc
diff --git a/chrome/browser/ui/app_list/app_list_controller_delegate.cc b/chrome/browser/ui/app_list/app_list_controller_delegate.cc
index 18daa5a7deaed9896711c70e3cff109fbf09c2f2..1c73cd1a630bd71937b4fc154e7d96afccb250b8 100644
--- a/chrome/browser/ui/app_list/app_list_controller_delegate.cc
+++ b/chrome/browser/ui/app_list/app_list_controller_delegate.cc
@@ -99,9 +99,24 @@ void AppListControllerDelegate::DoShowAppInfoFlow(
if (!parent_window)
return;
+ // The dialog is inset so the app list is still visible around the edges.
+ unsigned int kAppListDialogHorizontalBorderInsets = 10;
tapted 2014/05/21 03:40:57 nit: just `int` is fine - shouldn't use unsigned i
sashab 2014/05/22 07:20:21 Done.
+ unsigned int kAppListDialogVerticalBorderInsets = 10;
+
+ // If we are using the experimental app list, inset the dialog further so it
+ // appears as a vertical column in the center of the app list.
+ if (app_list::switches::IsExperimentalAppListEnabled()) {
tapted 2014/05/21 03:40:57 this should check IsCenteredAppListEnabled() inste
sashab 2014/05/22 07:20:21 Yes, you're right! Good find! Done :)
+ kAppListDialogHorizontalBorderInsets += 100;
tapted 2014/05/21 03:40:57 Hm - I would make them both actually const. e.g.
sashab 2014/05/22 07:20:21 Done.
+ }
+
+ gfx::Rect dialog_bounds = GetAppListBounds();
+ dialog_bounds.Inset(kAppListDialogHorizontalBorderInsets,
+ kAppListDialogVerticalBorderInsets);
+
OnShowExtensionPrompt();
ShowAppInfoDialog(
parent_window,
+ dialog_bounds,
profile,
extension,
base::Bind(&AppListControllerDelegate::OnCloseExtensionPrompt,

Powered by Google App Engine
This is Rietveld 408576698