summaryrefslogtreecommitdiffstats
path: root/chrome/browser/shell_integration.h
diff options
context:
space:
mode:
authorrafaelw@chromium.org <rafaelw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-05 04:45:50 +0000
committerrafaelw@chromium.org <rafaelw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-05 04:45:50 +0000
commit28375ae7d27179af48386d37e78ca47a2563e0d0 (patch)
treeeeda16c75ff2651afe1cc1738f19226e9cd7ec96 /chrome/browser/shell_integration.h
parent65b6cf331fd6bebe125635cffd01b595f58638c0 (diff)
downloadchromium_src-28375ae7d27179af48386d37e78ca47a2563e0d0.zip
chromium_src-28375ae7d27179af48386d37e78ca47a2563e0d0.tar.gz
chromium_src-28375ae7d27179af48386d37e78ca47a2563e0d0.tar.bz2
Implement launch disposition for extension-apps.
This change adds an --app-id command switch that signifies that the extension-app with the given id should be launched according to its configuration. It also adds parsing for app.window_type in the manifest and the behavior that when installed and a desktop shortcut is created, the --app-id switch is used rather than the --app switch. BUG=32361 Review URL: http://codereview.chromium.org/573016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38184 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/shell_integration.h')
-rw-r--r--chrome/browser/shell_integration.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/chrome/browser/shell_integration.h b/chrome/browser/shell_integration.h
index 020e46d..5a24ea9 100644
--- a/chrome/browser/shell_integration.h
+++ b/chrome/browser/shell_integration.h
@@ -43,6 +43,10 @@ class ShellIntegration {
struct ShortcutInfo {
GURL url;
+ // If |extension_id| is non-empty, this is short cut is to an extension-app
+ // and the launch url will be detected at start-up. In this case, |url|
+ // is still used to generate the app id (windows app id, not chrome app id).
+ string16 extension_id;
string16 title;
string16 description;
SkBitmap favicon;
@@ -57,6 +61,13 @@ class ShellIntegration {
bool create_in_quick_launch_bar;
};
+ // Re-implementation of chrome_plugin_utill::CPB_GetCommandLineArgumentsCommon
+ // which is deprecated. If |extension_app_id| is non-empty, an arguments
+ // string is created using the kAppId=<id> flag. Otherwise, the kApp=<url> is
+ // used.
+ static std::string GetCommandLineArgumentsCommon(const GURL& url,
+ const string16& extension_app_id);
+
#if defined(OS_LINUX)
// Returns filename for .desktop file based on |url|, sanitized for security.
static FilePath GetDesktopShortcutFilename(const GURL& url);
@@ -66,7 +77,8 @@ class ShellIntegration {
// used to launch Chrome.
static std::string GetDesktopFileContents(
const std::string& template_contents, const GURL& url,
- const string16& title, const std::string& icon_name);
+ const string16& extension_id, const string16& title,
+ const std::string& icon_name);
// Creates a desktop shortcut. It is not guaranteed to exist immediately after
// returning from this function, because actual file operation is done on the