| 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 11 matching lines...) Expand all Loading... |
| 22 | 22 |
| 23 namespace apps { | 23 namespace apps { |
| 24 | 24 |
| 25 // Monitors apps being reloaded and performs app specific actions (like launch | 25 // Monitors apps being reloaded and performs app specific actions (like launch |
| 26 // or restart) on them. Also provides an interface to schedule these actions. | 26 // or restart) on them. Also provides an interface to schedule these actions. |
| 27 class AppLoadService : public BrowserContextKeyedService, | 27 class AppLoadService : public BrowserContextKeyedService, |
| 28 public content::NotificationObserver { | 28 public content::NotificationObserver { |
| 29 public: | 29 public: |
| 30 enum PostReloadActionType { | 30 enum PostReloadActionType { |
| 31 LAUNCH, | 31 LAUNCH, |
| 32 RESTART, | |
| 33 LAUNCH_WITH_COMMAND_LINE, | 32 LAUNCH_WITH_COMMAND_LINE, |
| 34 }; | 33 }; |
| 35 | 34 |
| 36 struct PostReloadAction { | 35 struct PostReloadAction { |
| 37 PostReloadAction(); | 36 PostReloadAction(); |
| 38 | 37 |
| 39 PostReloadActionType action_type; | 38 PostReloadActionType action_type; |
| 40 CommandLine command_line; | 39 CommandLine command_line; |
| 41 base::FilePath current_dir; | 40 base::FilePath current_dir; |
| 42 }; | 41 }; |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 std::map<std::string, PostReloadAction> post_reload_actions_; | 73 std::map<std::string, PostReloadAction> post_reload_actions_; |
| 75 content::NotificationRegistrar registrar_; | 74 content::NotificationRegistrar registrar_; |
| 76 Profile* profile_; | 75 Profile* profile_; |
| 77 | 76 |
| 78 DISALLOW_COPY_AND_ASSIGN(AppLoadService); | 77 DISALLOW_COPY_AND_ASSIGN(AppLoadService); |
| 79 }; | 78 }; |
| 80 | 79 |
| 81 } // namespace apps | 80 } // namespace apps |
| 82 | 81 |
| 83 #endif // APPS_APP_LOAD_SERVICE_H_ | 82 #endif // APPS_APP_LOAD_SERVICE_H_ |
| OLD | NEW |