Chromium Code Reviews| 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_ |
|
benwells
2013/08/30 05:41:39
This file now lives in apps. I think you need to r
sergeygs
2013/09/02 07:36:22
Done in the reworked CL.
| |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 class CommandLine; | 11 class CommandLine; |
| 12 class GURL; | |
| 12 class Profile; | 13 class Profile; |
| 13 | 14 |
| 14 namespace base { | 15 namespace base { |
| 15 class FilePath; | 16 class FilePath; |
| 16 } | 17 } |
| 17 | 18 |
| 18 namespace content { | 19 namespace content { |
| 19 class WebContents; | 20 class WebContents; |
| 20 } | 21 } |
| 21 | 22 |
| 22 namespace extensions { | 23 namespace extensions { |
| 23 | 24 |
| 24 class Extension; | 25 class Extension; |
| 25 | 26 |
| 26 namespace app_file_handler_util { | 27 namespace app_file_handler_util { |
| 27 struct SavedFileEntry; | 28 struct SavedFileEntry; |
| 28 } | 29 } |
| 29 | 30 |
| 30 // Launches the platform app |extension|. Creates appropriate launch data for | 31 // Launches the platform app |extension|. Creates appropriate launch data for |
| 31 // the |command_line| fields present. |extension| and |profile| must not be | 32 // the |command_line| fields present. |extension| and |profile| must not be |
| 32 // NULL. A NULL |command_line| means there is no launch data. If non-empty, | 33 // NULL. A NULL |command_line| means there is no launch data. If non-empty, |
| 33 // |current_directory| is used to expand any relative paths on the command line. | 34 // |current_directory| is used to expand any relative paths on the command line. |
| 34 void LaunchPlatformApp(Profile* profile, | 35 void LaunchPlatformApp(Profile* profile, |
| 35 const Extension* extension, | 36 const Extension* extension, |
| 36 const CommandLine* command_line, | 37 const CommandLine* command_line, |
| 37 const base::FilePath& current_directory); | 38 const base::FilePath& current_directory); |
| 38 | 39 |
| 39 // Launches the platform app |extension| with the contents of |file_path| | 40 // Launches the platform app |extension| by issuing an onLaunched event to it, |
| 40 // available through the launch data. | 41 // with the contents of |file_path| available through the launch data. |
| 41 void LaunchPlatformAppWithPath(Profile* profile, | 42 void LaunchPlatformAppWithPath(Profile* profile, |
| 42 const Extension* extension, | 43 const Extension* extension, |
| 43 const base::FilePath& file_path); | 44 const base::FilePath& file_path); |
| 44 | 45 |
| 45 // Launches the platform app |extension| with the contents of |file_path| | 46 // Launches the platform app |extension| by issuing an onLaunched event to it, |
| 46 // available through the launch data. | 47 // with the contents of |file_path| and the |handler_id| available through the |
| 48 // launch data. | |
| 47 void LaunchPlatformAppWithFileHandler(Profile* profile, | 49 void LaunchPlatformAppWithFileHandler(Profile* profile, |
| 48 const Extension* extension, | 50 const Extension* extension, |
| 49 const std::string& handler_id, | 51 const std::string& handler_id, |
| 50 const base::FilePath& file_path); | 52 const base::FilePath& file_path); |
| 51 | 53 |
| 52 void RestartPlatformAppWithFileEntries( | 54 void RestartPlatformAppWithFileEntries( |
| 53 Profile* profile, | 55 Profile* profile, |
| 54 const Extension* extension, | 56 const Extension* extension, |
| 55 const std::vector<app_file_handler_util::SavedFileEntry>& | 57 const std::vector<app_file_handler_util::SavedFileEntry>& |
| 56 saved_file_entries); | 58 saved_file_entries); |
| 57 | 59 |
| 60 // Launches the patform app |extension| by issuing an onLaunched event to it, | |
| 61 // with |url| and |referrer_url| available through the launch data. | |
| 62 void LaunchPlatformAppWithUrl(Profile* profile, | |
| 63 const Extension* extension, | |
| 64 const std::string& handler_id, | |
| 65 const GURL& url, | |
| 66 const GURL& referrer_url); | |
| 67 | |
| 58 } // namespace extensions | 68 } // namespace extensions |
| 59 | 69 |
| 60 #endif // CHROME_BROWSER_EXTENSIONS_PLATFORM_APP_LAUNCHER_H_ | 70 #endif // CHROME_BROWSER_EXTENSIONS_PLATFORM_APP_LAUNCHER_H_ |
| OLD | NEW |