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

Unified Diff: chrome/browser/ui/views/create_application_shortcut_view.cc

Issue 337023002: Fixed app shortcut creation broken in r276419 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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/views/create_application_shortcut_view.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/create_application_shortcut_view.cc
diff --git a/chrome/browser/ui/views/create_application_shortcut_view.cc b/chrome/browser/ui/views/create_application_shortcut_view.cc
index b9dd297887f624008a1836eb0f39443fe1d7f34b..54a0d3528261a735ae72b89f83dc9758c891d1e5 100644
--- a/chrome/browser/ui/views/create_application_shortcut_view.cc
+++ b/chrome/browser/ui/views/create_application_shortcut_view.cc
@@ -532,6 +532,14 @@ CreateChromeApplicationShortcutView::CreateChromeApplicationShortcutView(
create_in_chrome_apps_subdir_ = true;
InitControls(DIALOG_LAYOUT_APP_SHORTCUT);
+
+ // Get shortcut information and icon; they are needed for creating the
+ // shortcut.
+ web_app::UpdateShortcutInfoAndIconForApp(
+ app,
+ profile,
+ base::Bind(&CreateChromeApplicationShortcutView::OnShortcutInfoLoaded,
+ weak_ptr_factory_.GetWeakPtr()));
}
CreateChromeApplicationShortcutView::~CreateChromeApplicationShortcutView() {}
@@ -547,3 +555,9 @@ bool CreateChromeApplicationShortcutView::Cancel() {
close_callback_.Run(false);
return CreateApplicationShortcutView::Cancel();
}
+
+// Called when the app's ShortcutInfo (with icon) is loaded.
+void CreateChromeApplicationShortcutView::OnShortcutInfoLoaded(
+ const web_app::ShortcutInfo& shortcut_info) {
+ shortcut_info_ = shortcut_info;
+}
« no previous file with comments | « chrome/browser/ui/views/create_application_shortcut_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698