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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
54 void RestartApplicationIfRunning(const std::string& extension_id); | 54 void RestartApplicationIfRunning(const std::string& extension_id); |
55 | 55 |
56 // Loads (or reloads) the app with |extension_path|, then launches it. Any | 56 // Loads (or reloads) the app with |extension_path|, then launches it. Any |
57 // command line parameters from |command_line| will be passed along via | 57 // command line parameters from |command_line| will be passed along via |
58 // launch parameters. Returns true if loading the extension has begun | 58 // launch parameters. Returns true if loading the extension has begun |
59 // successfully. | 59 // successfully. |
60 bool LoadAndLaunch(const base::FilePath& extension_path, | 60 bool LoadAndLaunch(const base::FilePath& extension_path, |
61 const base::CommandLine& command_line, | 61 const base::CommandLine& command_line, |
62 const base::FilePath& current_dir); | 62 const base::FilePath& current_dir); |
63 | 63 |
64 // Loads (or reloads) the app with |extension_path|. Returns true if loading | |
65 // the extension has begun successfully. | |
Yoyo Zhou
2014/11/14 23:50:47
the app
Zachary Kuznia
2014/11/14 23:54:12
Done.
| |
66 bool Load(const base::FilePath& extension_path); | |
67 | |
64 static AppLoadService* Get(Profile* profile); | 68 static AppLoadService* Get(Profile* profile); |
65 | 69 |
66 private: | 70 private: |
67 // content::NotificationObserver. | 71 // content::NotificationObserver. |
68 void Observe(int type, | 72 void Observe(int type, |
69 const content::NotificationSource& source, | 73 const content::NotificationSource& source, |
70 const content::NotificationDetails& details) override; | 74 const content::NotificationDetails& details) override; |
71 | 75 |
72 // extensions::ExtensionRegistryObserver. | 76 // extensions::ExtensionRegistryObserver. |
73 void OnExtensionUnloaded( | 77 void OnExtensionUnloaded( |
(...skipping 11 matching lines...) Expand all Loading... | |
85 std::map<std::string, PostReloadAction> post_reload_actions_; | 89 std::map<std::string, PostReloadAction> post_reload_actions_; |
86 content::NotificationRegistrar registrar_; | 90 content::NotificationRegistrar registrar_; |
87 Profile* profile_; | 91 Profile* profile_; |
88 | 92 |
89 DISALLOW_COPY_AND_ASSIGN(AppLoadService); | 93 DISALLOW_COPY_AND_ASSIGN(AppLoadService); |
90 }; | 94 }; |
91 | 95 |
92 } // namespace apps | 96 } // namespace apps |
93 | 97 |
94 #endif // APPS_APP_LOAD_SERVICE_H_ | 98 #endif // APPS_APP_LOAD_SERVICE_H_ |
OLD | NEW |