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 12 matching lines...) Expand all Loading... |
23 | 23 |
24 namespace apps { | 24 namespace apps { |
25 | 25 |
26 // Monitors apps being reloaded and performs app specific actions (like launch | 26 // Monitors apps being reloaded and performs app specific actions (like launch |
27 // or restart) on them. Also provides an interface to schedule these actions. | 27 // or restart) on them. Also provides an interface to schedule these actions. |
28 class AppLoadService : public KeyedService, | 28 class AppLoadService : public KeyedService, |
29 public content::NotificationObserver, | 29 public content::NotificationObserver, |
30 public extensions::ExtensionRegistryObserver { | 30 public extensions::ExtensionRegistryObserver { |
31 public: | 31 public: |
32 enum PostReloadActionType { | 32 enum PostReloadActionType { |
33 LAUNCH, | 33 LAUNCH_FOR_RELOAD, |
34 RESTART, | 34 RESTART, |
35 LAUNCH_WITH_COMMAND_LINE, | 35 LAUNCH_FOR_LOAD_AND_LAUNCH, |
36 }; | 36 }; |
37 | 37 |
38 struct PostReloadAction { | 38 struct PostReloadAction { |
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 |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 std::map<std::string, PostReloadAction> post_reload_actions_; | 85 std::map<std::string, PostReloadAction> post_reload_actions_; |
86 content::NotificationRegistrar registrar_; | 86 content::NotificationRegistrar registrar_; |
87 Profile* profile_; | 87 Profile* profile_; |
88 | 88 |
89 DISALLOW_COPY_AND_ASSIGN(AppLoadService); | 89 DISALLOW_COPY_AND_ASSIGN(AppLoadService); |
90 }; | 90 }; |
91 | 91 |
92 } // namespace apps | 92 } // namespace apps |
93 | 93 |
94 #endif // APPS_APP_LOAD_SERVICE_H_ | 94 #endif // APPS_APP_LOAD_SERVICE_H_ |
OLD | NEW |