diff options
author | rafaelw@chromium.org <rafaelw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-05 04:45:50 +0000 |
---|---|---|
committer | rafaelw@chromium.org <rafaelw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-05 04:45:50 +0000 |
commit | 28375ae7d27179af48386d37e78ca47a2563e0d0 (patch) | |
tree | eeda16c75ff2651afe1cc1738f19226e9cd7ec96 /chrome/browser/shell_integration_linux.cc | |
parent | 65b6cf331fd6bebe125635cffd01b595f58638c0 (diff) | |
download | chromium_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_linux.cc')
-rw-r--r-- | chrome/browser/shell_integration_linux.cc | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/chrome/browser/shell_integration_linux.cc b/chrome/browser/shell_integration_linux.cc index 3766249..78f765b 100644 --- a/chrome/browser/shell_integration_linux.cc +++ b/chrome/browser/shell_integration_linux.cc @@ -135,8 +135,8 @@ class CreateDesktopShortcutTask : public Task { std::string icon_name = CreateIcon(shortcut_filename); std::string contents = ShellIntegration::GetDesktopFileContents( - template_contents, shortcut_info_.url, shortcut_info_.title, - icon_name); + template_contents, shortcut_info_.url, shortcut_info_.extension_id, + shortcut_info_.title, icon_name); if (shortcut_info_.create_on_desktop) CreateOnDesktop(shortcut_filename, contents); @@ -327,7 +327,8 @@ FilePath ShellIntegration::GetDesktopShortcutFilename(const GURL& url) { std::string ShellIntegration::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) { // See http://standards.freedesktop.org/desktop-entry-spec/latest/ // Although not required by the spec, Nautilus on Ubuntu Karmic creates its // launchers with an xdg-open shebang. Follow that convention. @@ -342,8 +343,8 @@ std::string ShellIntegration::GetDesktopFileContents( if (exec_tokenizer.token() != "%U") final_path += exec_tokenizer.token() + " "; } - std::string switches; - CPB_GetCommandLineArgumentsCommon(url.spec().c_str(), &switches); + std::string switches = + ShellIntegration::GetCommandLineArgumentsCommon(url, extension_id); output_buffer += std::string("Exec=") + final_path + switches + "\n"; } else if (tokenizer.token().substr(0, 5) == "Name=") { std::string final_title = UTF16ToUTF8(title); |