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

Unified Diff: chrome/browser/web_applications/update_relaunch_details_worker_win.h

Issue 258243002: Support "Pin to taskbar" for hosted app windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 8 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/web_applications/update_relaunch_details_worker_win.h
diff --git a/chrome/browser/web_applications/update_relaunch_details_worker_win.h b/chrome/browser/web_applications/update_relaunch_details_worker_win.h
new file mode 100644
index 0000000000000000000000000000000000000000..a663fd06cd9f07345a751db947d57b65088548cc
--- /dev/null
+++ b/chrome/browser/web_applications/update_relaunch_details_worker_win.h
@@ -0,0 +1,53 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_WEB_APPLICATIONS_UPDATE_RELAUNCH_DETAILS_WORKER_WIN_H_
+#define CHROME_BROWSER_WEB_APPLICATIONS_UPDATE_RELAUNCH_DETAILS_WORKER_WIN_H_
+
+#include "chrome/browser/shell_integration.h"
jackhou1 2014/04/29 08:50:18 You probably need to sync. It's web_app::ShortcutI
calamity 2014/05/19 06:11:54 Done.
+#include "chrome/browser/web_applications/web_app.h"
+
+namespace extensions {
+class Extension;
+}
+
+namespace web_app {
+
+// UpdateRelaunchDetailsWorker holds all context data needed for updating the
+// relaunch details of an app.
+class UpdateRelaunchDetailsWorker {
+ public:
+ UpdateRelaunchDetailsWorker(Profile* profile,
+ const extensions::Extension* extension,
+ HWND hwnd);
+
+ void Run();
+
+ private:
+ ~UpdateRelaunchDetailsWorker();
+
+ void OnShortcutInfoLoaded(
+ const ShellIntegration::ShortcutInfo& shortcut_info);
+
+ // Sets the relaunch data so "Pin this program to taskbar" has the app's
+ // information.
+ void CreateIconAndSetRelaunchDetails(
+ const base::FilePath& web_app_path,
+ const base::FilePath& icon_file,
+ const ShellIntegration::ShortcutInfo& shortcut_info);
+
+ void DeleteMeOnUIThread();
+
+ Profile* profile_;
+
+ const extensions::Extension* extension_;
+
+ HWND hwnd_;
+
+ DISALLOW_COPY_AND_ASSIGN(UpdateRelaunchDetailsWorker);
+};
+
+} // namespace web_app
+
+#endif // CHROME_BROWSER_WEB_APPLICATIONS_UPDATE_RELAUNCH_DETAILS_WORKER_WIN_H_

Powered by Google App Engine
This is Rietveld 408576698