diff options
author | benwells@chromium.org <benwells@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-17 00:28:56 +0000 |
---|---|---|
committer | benwells@chromium.org <benwells@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-17 00:28:56 +0000 |
commit | 98566d7a0f5396b4fda4863b4036bed441316b2f (patch) | |
tree | 82d05238c2619f8a1f75a88fe68da23581e90fa2 /chrome/browser/shell_integration_linux.h | |
parent | ab1c2c816b1f08b56f539a172f4c0b2e2004168d (diff) | |
download | chromium_src-98566d7a0f5396b4fda4863b4036bed441316b2f.zip chromium_src-98566d7a0f5396b4fda4863b4036bed441316b2f.tar.gz chromium_src-98566d7a0f5396b4fda4863b4036bed441316b2f.tar.bz2 |
Moved Linux specific shell integration declarations into own header.
This continues refactoring started in http://codereview.chromium.org/9958006/
BUG=None
TEST=Refactor; covered by existing tests
Review URL: http://codereview.chromium.org/10097004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@132489 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/shell_integration_linux.h')
-rw-r--r-- | chrome/browser/shell_integration_linux.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/chrome/browser/shell_integration_linux.h b/chrome/browser/shell_integration_linux.h index 2e839a5..c3a3a59 100644 --- a/chrome/browser/shell_integration_linux.h +++ b/chrome/browser/shell_integration_linux.h @@ -11,9 +11,39 @@ #include "base/basictypes.h" #include "base/file_path.h" #include "chrome/browser/shell_integration.h" +#include "googleurl/src/gurl.h" + +namespace base { +class Environment; +} namespace ShellIntegrationLinux { +// Returns filename of the desktop shortcut used to launch the browser. +std::string GetDesktopName(base::Environment* env); + +bool GetDesktopShortcutTemplate(base::Environment* env, + std::string* output); + +// Returns filename for .desktop file based on |url|, sanitized for security. +FilePath GetDesktopShortcutFilename(const GURL& url); + +// Returns contents for .desktop file based on |template_contents|, |url| +// and |title|. The |template_contents| should be contents of .desktop file +// used to launch Chrome. +std::string GetDesktopFileContents(const std::string& template_contents, + const std::string& app_name, + const GURL& url, + const std::string& extension_id, + const bool is_platform_app, + const FilePath& web_app_path, + const FilePath& extension_path, + const string16& title, + const std::string& icon_name); + +bool CreateDesktopShortcut(const ShellIntegration::ShortcutInfo& shortcut_info, + const std::string& shortcut_template); + bool CreateDesktopShortcutForChromeApp( const ShellIntegration::ShortcutInfo& shortcut_info, const FilePath& web_app_path, |