| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_EXTENSIONS_PLATFORM_APP_LAUNCHER_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_PLATFORM_APP_LAUNCHER_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_PLATFORM_APP_LAUNCHER_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_PLATFORM_APP_LAUNCHER_H_ |
| 7 | 7 |
| 8 class CommandLine; | 8 class CommandLine; |
| 9 class FilePath; | 9 class FilePath; |
| 10 class Profile; | 10 class Profile; |
| 11 | 11 |
| 12 namespace webkit_glue { | 12 namespace content { |
| 13 struct WebIntentData; | 13 class WebContents; |
| 14 class WebIntentsDispatcher; |
| 14 } | 15 } |
| 15 | 16 |
| 16 namespace extensions { | 17 namespace extensions { |
| 17 | 18 |
| 18 class Extension; | 19 class Extension; |
| 19 | 20 |
| 20 // Launches the platform app |extension|. Creates appropriate launch data for | 21 // Launches the platform app |extension|. Creates appropriate launch data for |
| 21 // the |command_line| fields present. |extension| and |profile| must not be | 22 // the |command_line| fields present. |extension| and |profile| must not be |
| 22 // NULL. A NULL |command_line| means there is no launch data. If non-empty, | 23 // NULL. A NULL |command_line| means there is no launch data. If non-empty, |
| 23 // |current_directory| is used to expand any relative paths on the command line. | 24 // |current_directory| is used to expand any relative paths on the command line. |
| 24 void LaunchPlatformApp(Profile* profile, | 25 void LaunchPlatformApp(Profile* profile, |
| 25 const Extension* extension, | 26 const Extension* extension, |
| 26 const CommandLine* command_line, | 27 const CommandLine* command_line, |
| 27 const FilePath& current_directory); | 28 const FilePath& current_directory); |
| 28 | 29 |
| 29 // Launches the platform app |extension| with the supplied web intent. Creates | 30 // Launches the platform app |extension| with the supplied web intent. Creates |
| 30 // appropriate launch data for the |web_intent_data| field present. |extension| | 31 // appropriate launch data for the |web_intent_data| field present. |extension| |
| 31 // and |profile| must not be NULL. | 32 // and |profile| must not be NULL. |
| 32 void LaunchPlatformAppWithWebIntent( | 33 void LaunchPlatformAppWithWebIntent( |
| 33 Profile* profile, | 34 Profile* profile, |
| 34 const Extension* extension, | 35 const Extension* extension, |
| 35 const webkit_glue::WebIntentData& web_intent_data); | 36 content::WebIntentsDispatcher* intents_dispatcher, |
| 37 content::WebContents* source); |
| 36 | 38 |
| 37 } // namespace extensions | 39 } // namespace extensions |
| 38 | 40 |
| 39 #endif // CHROME_BROWSER_EXTENSIONS_PLATFORM_APP_LAUNCHER_H_ | 41 #endif // CHROME_BROWSER_EXTENSIONS_PLATFORM_APP_LAUNCHER_H_ |
| OLD | NEW |