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

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: Moved new function into shell_integration_linux.h Created 8 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/web_app.h
diff --git a/chrome/browser/web_applications/web_app.h b/chrome/browser/web_applications/web_app.h
index cfdbdbd5ed4d0d1fb8c7a6ce54b977d5203a9943..a9e55a6f6fff327e59b9053a1474f5ad964e6bd5 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,
+ 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 .
« no previous file with comments | « chrome/browser/ui/gtk/create_application_shortcuts_dialog_gtk.cc ('k') | chrome/browser/web_applications/web_app.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698