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 #include <string> | 8 #include <string> |
9 | 9 |
10 class CommandLine; | 10 class CommandLine; |
| 11 class Profile; |
| 12 |
| 13 namespace base { |
11 class FilePath; | 14 class FilePath; |
12 class Profile; | 15 } |
13 | 16 |
14 namespace content { | 17 namespace content { |
15 class WebContents; | 18 class WebContents; |
16 class WebIntentsDispatcher; | 19 class WebIntentsDispatcher; |
17 } | 20 } |
18 | 21 |
19 namespace extensions { | 22 namespace extensions { |
20 | 23 |
21 class Extension; | 24 class Extension; |
22 | 25 |
23 // Launches the platform app |extension|. Creates appropriate launch data for | 26 // Launches the platform app |extension|. Creates appropriate launch data for |
24 // the |command_line| fields present. |extension| and |profile| must not be | 27 // the |command_line| fields present. |extension| and |profile| must not be |
25 // NULL. A NULL |command_line| means there is no launch data. If non-empty, | 28 // NULL. A NULL |command_line| means there is no launch data. If non-empty, |
26 // |current_directory| is used to expand any relative paths on the command line. | 29 // |current_directory| is used to expand any relative paths on the command line. |
27 void LaunchPlatformApp(Profile* profile, | 30 void LaunchPlatformApp(Profile* profile, |
28 const Extension* extension, | 31 const Extension* extension, |
29 const CommandLine* command_line, | 32 const CommandLine* command_line, |
30 const FilePath& current_directory); | 33 const base::FilePath& current_directory); |
31 | 34 |
32 // Launches the platform app |extension| with the contents of |file_path| | 35 // Launches the platform app |extension| with the contents of |file_path| |
33 // available through the launch data. | 36 // available through the launch data. |
34 void LaunchPlatformAppWithPath(Profile* profile, | 37 void LaunchPlatformAppWithPath(Profile* profile, |
35 const Extension* extension, | 38 const Extension* extension, |
36 const FilePath& file_path); | 39 const base::FilePath& file_path); |
37 | 40 |
38 // Launches the platform app |extension| with the contents of |file_path| | 41 // Launches the platform app |extension| with the contents of |file_path| |
39 // available through the launch data. | 42 // available through the launch data. |
40 void LaunchPlatformAppWithFileHandler(Profile* profile, | 43 void LaunchPlatformAppWithFileHandler(Profile* profile, |
41 const Extension* extension, | 44 const Extension* extension, |
42 const std::string& handler_id, | 45 const std::string& handler_id, |
43 const FilePath& file_path); | 46 const base::FilePath& file_path); |
44 | 47 |
45 #if defined(ENABLE_WEB_INTENTS) | 48 #if defined(ENABLE_WEB_INTENTS) |
46 // Launches the platform app |extension| with the supplied web intent. Creates | 49 // Launches the platform app |extension| with the supplied web intent. Creates |
47 // appropriate launch data for the |web_intent_data| field present. |extension| | 50 // appropriate launch data for the |web_intent_data| field present. |extension| |
48 // and |profile| must not be NULL. | 51 // and |profile| must not be NULL. |
49 void LaunchPlatformAppWithWebIntent( | 52 void LaunchPlatformAppWithWebIntent( |
50 Profile* profile, | 53 Profile* profile, |
51 const Extension* extension, | 54 const Extension* extension, |
52 content::WebIntentsDispatcher* intents_dispatcher, | 55 content::WebIntentsDispatcher* intents_dispatcher, |
53 content::WebContents* source); | 56 content::WebContents* source); |
54 #endif | 57 #endif |
55 | 58 |
56 } // namespace extensions | 59 } // namespace extensions |
57 | 60 |
58 #endif // CHROME_BROWSER_EXTENSIONS_PLATFORM_APP_LAUNCHER_H_ | 61 #endif // CHROME_BROWSER_EXTENSIONS_PLATFORM_APP_LAUNCHER_H_ |
OLD | NEW |