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

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

Issue 9958006: Create Linux platform app shortcuts to run in their own process. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Create updated shortcuts from NTP, add enable flag Created 8 years, 9 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/web_app.h
diff --git a/chrome/browser/web_applications/web_app.h b/chrome/browser/web_applications/web_app.h
index 4a6367fd7c65ece46c8d4e48f12177802a4f89e2..7fb058ef762eaac04220f3d3eb8659ca0a3f4492 100644
--- a/chrome/browser/web_applications/web_app.h
+++ b/chrome/browser/web_applications/web_app.h
@@ -46,14 +46,20 @@ std::string GenerateApplicationNameFromExtensionId(const std::string& id);
std::string GetExtensionIdFromApplicationName(const std::string& app_name);
// Creates a shortcut for web application based on given shortcut data.
-// |profile_path| is used as root directory for persisted data such as icon.
-// Directory layout is similar to what Gears has, i.e. an web application's
-// file is stored under "#/host_name/scheme_port", where '#' is the
-// |root_dir|. A crx based app uses a directory named _crx_<app id>.
+// |profile_path| is the path of the creating profile. |shortcut_info)
+// contains information about the shortcut to create.
void CreateShortcut(
const FilePath& profile_path,
const ShellIntegration::ShortcutInfo& shortcut_info);
+// Creates a shortcut. Must be called on the file thread. This is used to
+// implement CreateShortcut() above, and can also be used directly from the
+// file thread. |profile_path| is the path of the creating profile.
+// |shortcut_info| constains info about the shortcut to create.
+bool CreateShortcutOnFileThread(
+ const FilePath& profile_path,
sail 2012/04/12 15:06:29 do you really need this? if you just call CreateSh
benwells 2012/04/13 01:48:48 This function returns success or failure, which th
sail 2012/04/13 01:59:14 what's the point of returning failure? putting up
benwells 2012/04/13 02:09:02 In the NTP there is a command to create the shortc
sail 2012/04/13 02:16:41 ok
+ const ShellIntegration::ShortcutInfo& shortcut_info);
+
// Returns true if given url is a valid web app url.
bool IsValidUrl(const GURL& url);
@@ -78,11 +84,16 @@ namespace internals {
bool CheckAndSaveIcon(const FilePath& icon_file, const SkBitmap& image);
#endif
-// Does the actual job of creating a shortcut (see CreateShortcut() above).
-// This must be called on the file thread.
-void CreateShortcutTask(const FilePath& web_app_path,
- const FilePath& profile_path,
- const ShellIntegration::ShortcutInfo& shortcut_info);
+// Implemented for each platform, does the platform specific parts of creating
+// shortcuts. Used internally by CreateShortcutOnFileThread.
+// |shortcut_data_path| is where to store any resources created for the
+// shortcut, and is also used as the UserDataDir for platform app shortcuts.
+// |profile_path| is the path of the creating profile. |shortcut_info|
+// contains info about the shortcut to create.
+bool CreatePlatformShortcut(
+ const FilePath& shortcut_data_path,
+ const FilePath& profile_path,
+ const ShellIntegration::ShortcutInfo& shortcut_info);
// Sanitizes |name| and returns a version of it that is safe to use as an
// on-disk file name .

Powered by Google App Engine
This is Rietveld 408576698