| 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 webkit_glue { |
| 13 struct WebIntentData; | 13 struct WebIntentData; |
| 14 } | 14 } |
| 15 | 15 |
| 16 namespace extensions { | 16 namespace extensions { |
| 17 | 17 |
| 18 class Extension; | 18 class Extension; |
| 19 | 19 |
| 20 // Launches the platform app |extension|. Creates appropriate launch data for | 20 // Launches the platform app |extension|. Creates appropriate launch data for |
| 21 // the |command_line| fields present. |extension| and |profile| must not be | 21 // 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, | 22 // 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. | 23 // |current_directory| is used to expand any relative paths on the command line. |
| 24 void LaunchPlatformApp(Profile* profile, | 24 void LaunchPlatformApp(Profile* profile, |
| 25 const Extension* extension, | 25 const Extension* extension, |
| 26 const CommandLine* command_line, | 26 const CommandLine* command_line, |
| 27 const FilePath& current_directory); | 27 const FilePath& current_directory); |
| 28 | 28 |
| 29 // Launches the platform app |extension| at the specific |file_path| given. |
| 30 void LaunchPlatformAppWithPath(Profile* profile, |
| 31 const Extension* extension, |
| 32 const FilePath& file_path); |
| 33 |
| 29 // Launches the platform app |extension| with the supplied web intent. Creates | 34 // Launches the platform app |extension| with the supplied web intent. Creates |
| 30 // appropriate launch data for the |web_intent_data| field present. |extension| | 35 // appropriate launch data for the |web_intent_data| field present. |extension| |
| 31 // and |profile| must not be NULL. | 36 // and |profile| must not be NULL. |
| 32 void LaunchPlatformAppWithWebIntent( | 37 void LaunchPlatformAppWithWebIntent( |
| 33 Profile* profile, | 38 Profile* profile, |
| 34 const Extension* extension, | 39 const Extension* extension, |
| 35 const webkit_glue::WebIntentData& web_intent_data); | 40 const webkit_glue::WebIntentData& web_intent_data); |
| 36 | 41 |
| 37 } // namespace extensions | 42 } // namespace extensions |
| 38 | 43 |
| 39 #endif // CHROME_BROWSER_EXTENSIONS_PLATFORM_APP_LAUNCHER_H_ | 44 #endif // CHROME_BROWSER_EXTENSIONS_PLATFORM_APP_LAUNCHER_H_ |
| OLD | NEW |