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

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: Added new browser test 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..c174a07b22fed69a06a292b48076d184beff0ac0 100644
--- a/chrome/browser/ui/app_list/app_list_controller_delegate.cc
+++ b/chrome/browser/ui/app_list/app_list_controller_delegate.cc
@@ -55,8 +55,14 @@ bool AppListControllerDelegate::ForceNativeDesktop() const {
void AppListControllerDelegate::ViewClosing() {}
-void AppListControllerDelegate::OnShowExtensionPrompt() {}
-void AppListControllerDelegate::OnCloseExtensionPrompt() {}
+gfx::Rect AppListControllerDelegate::GetAppListBounds() {
+ return gfx::Rect();
+}
+
+void AppListControllerDelegate::OnShowChildDialog() {
+}
+void AppListControllerDelegate::OnCloseChildDialog() {
+}
std::string AppListControllerDelegate::AppListSourceToString(
AppListSource source) {
@@ -99,13 +105,23 @@ void AppListControllerDelegate::DoShowAppInfoFlow(
if (!parent_window)
return;
- OnShowExtensionPrompt();
- ShowAppInfoDialog(
- parent_window,
- profile,
- extension,
- base::Bind(&AppListControllerDelegate::OnCloseExtensionPrompt,
- base::Unretained(this)));
+ // For the centered app list, inset the dialog further so it appears as a
+ // vertical column in the center of the app list.
+ const int kAppListDialogHorizontalBorderInsets =
+ app_list::switches::IsCenteredAppListEnabled() ? 110 : 10;
+ const int kAppListDialogVerticalBorderInsets = 10;
+
+ gfx::Rect dialog_bounds = GetAppListBounds();
+ dialog_bounds.Inset(kAppListDialogHorizontalBorderInsets,
+ kAppListDialogVerticalBorderInsets);
+
+ OnShowChildDialog();
+ ShowAppInfoDialog(parent_window,
+ dialog_bounds,
+ profile,
+ extension,
+ base::Bind(&AppListControllerDelegate::OnCloseChildDialog,
+ base::Unretained(this)));
}
void AppListControllerDelegate::UninstallApp(Profile* profile,

Powered by Google App Engine
This is Rietveld 408576698