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_LIFETIME_MONITOR_H_ | 5 #ifndef APPS_APP_LIFETIME_MONITOR_H_ |
6 #define APPS_APP_LIFETIME_MONITOR_H_ | 6 #define APPS_APP_LIFETIME_MONITOR_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/observer_list.h" | 11 #include "base/observer_list.h" |
12 #include "components/keyed_service/core/keyed_service.h" | 12 #include "components/keyed_service/core/keyed_service.h" |
13 #include "content/public/browser/notification_observer.h" | 13 #include "content/public/browser/notification_observer.h" |
14 #include "content/public/browser/notification_registrar.h" | 14 #include "content/public/browser/notification_registrar.h" |
15 #include "extensions/browser/app_window/app_window_registry.h" | 15 #include "extensions/browser/app_window/app_window_registry.h" |
16 | 16 |
17 namespace extensions { | |
18 class Extension; | |
19 } | |
20 | |
21 class Profile; | 17 class Profile; |
22 | 18 |
23 namespace apps { | 19 namespace apps { |
24 | 20 |
25 // Observes startup of apps and their windows and notifies observers of these | 21 // Observes startup of apps and their windows and notifies observers of these |
26 // events. | 22 // events. |
27 class AppLifetimeMonitor : public KeyedService, | 23 class AppLifetimeMonitor : public KeyedService, |
28 public content::NotificationObserver, | 24 public content::NotificationObserver, |
29 public extensions::AppWindowRegistry::Observer { | 25 public extensions::AppWindowRegistry::Observer { |
30 public: | 26 public: |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 content::NotificationRegistrar registrar_; | 78 content::NotificationRegistrar registrar_; |
83 Profile* profile_; | 79 Profile* profile_; |
84 base::ObserverList<Observer> observers_; | 80 base::ObserverList<Observer> observers_; |
85 | 81 |
86 DISALLOW_COPY_AND_ASSIGN(AppLifetimeMonitor); | 82 DISALLOW_COPY_AND_ASSIGN(AppLifetimeMonitor); |
87 }; | 83 }; |
88 | 84 |
89 } // namespace apps | 85 } // namespace apps |
90 | 86 |
91 #endif // APPS_APP_LIFETIME_MONITOR_H_ | 87 #endif // APPS_APP_LIFETIME_MONITOR_H_ |
OLD | NEW |