| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 APPS_APP_LOAD_SERVICE_H_ | 5 #ifndef APPS_APP_LOAD_SERVICE_H_ |
| 6 #define APPS_APP_LOAD_SERVICE_H_ | 6 #define APPS_APP_LOAD_SERVICE_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 PostReloadAction(); | 39 PostReloadAction(); |
| 40 | 40 |
| 41 PostReloadActionType action_type; | 41 PostReloadActionType action_type; |
| 42 base::CommandLine command_line; | 42 base::CommandLine command_line; |
| 43 base::FilePath current_dir; | 43 base::FilePath current_dir; |
| 44 }; | 44 }; |
| 45 | 45 |
| 46 explicit AppLoadService(Profile* profile); | 46 explicit AppLoadService(Profile* profile); |
| 47 ~AppLoadService() override; | 47 ~AppLoadService() override; |
| 48 | 48 |
| 49 // KeyedService support: |
| 50 void Shutdown() override; |
| 51 |
| 49 // Reload the application with the given id and then send it the OnRestarted | 52 // Reload the application with the given id and then send it the OnRestarted |
| 50 // event. | 53 // event. |
| 51 void RestartApplication(const std::string& extension_id); | 54 void RestartApplication(const std::string& extension_id); |
| 52 | 55 |
| 53 // Reload the application with the given id if it is currently running. | 56 // Reload the application with the given id if it is currently running. |
| 54 void RestartApplicationIfRunning(const std::string& extension_id); | 57 void RestartApplicationIfRunning(const std::string& extension_id); |
| 55 | 58 |
| 56 // Loads (or reloads) the app with |extension_path|, then launches it. Any | 59 // Loads (or reloads) the app with |extension_path|, then launches it. Any |
| 57 // command line parameters from |command_line| will be passed along via | 60 // command line parameters from |command_line| will be passed along via |
| 58 // launch parameters. Returns true if loading the extension has begun | 61 // launch parameters. Returns true if loading the extension has begun |
| (...skipping 30 matching lines...) Expand all Loading... |
| 89 std::map<std::string, PostReloadAction> post_reload_actions_; | 92 std::map<std::string, PostReloadAction> post_reload_actions_; |
| 90 content::NotificationRegistrar registrar_; | 93 content::NotificationRegistrar registrar_; |
| 91 Profile* profile_; | 94 Profile* profile_; |
| 92 | 95 |
| 93 DISALLOW_COPY_AND_ASSIGN(AppLoadService); | 96 DISALLOW_COPY_AND_ASSIGN(AppLoadService); |
| 94 }; | 97 }; |
| 95 | 98 |
| 96 } // namespace apps | 99 } // namespace apps |
| 97 | 100 |
| 98 #endif // APPS_APP_LOAD_SERVICE_H_ | 101 #endif // APPS_APP_LOAD_SERVICE_H_ |
| OLD | NEW |