OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CHROME_BROWSER_EXTENSIONS_PLATFORM_APP_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_PLATFORM_APPS_PLATFORM_APP_SERVICE_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_PLATFORM_APP_SERVICE_H_ | 6 #define CHROME_BROWSER_PLATFORM_APPS_PLATFORM_APP_SERVICE_H_ |
7 | 7 |
8 #include "chrome/browser/profiles/profile.h" | 8 #include "chrome/browser/profiles/profile.h" |
9 #include "chrome/browser/profiles/profile_keyed_service.h" | 9 #include "chrome/browser/profiles/profile_keyed_service.h" |
10 #include "content/public/browser/notification_observer.h" | 10 #include "content/public/browser/notification_observer.h" |
11 #include "content/public/browser/notification_registrar.h" | 11 #include "content/public/browser/notification_registrar.h" |
12 | 12 |
13 namespace extensions { | 13 namespace platform_apps { |
14 | 14 |
15 // The PlatformAppService provides services for platform apps, such as | 15 // The PlatformAppService provides services for platform apps, such as |
16 // keeping the browser process alive while they are running. | 16 // keeping the browser process alive while they are running. |
17 // TODO(benwells): Merge functionality of ShellWindowRegistry into this class. | 17 // TODO(benwells): Merge functionality of ShellWindowRegistry into this class. |
18 class PlatformAppService : public ProfileKeyedService, | 18 class PlatformAppService : public ProfileKeyedService, |
19 public content::NotificationObserver { | 19 public content::NotificationObserver { |
20 public: | 20 public: |
21 explicit PlatformAppService(Profile* profile); | 21 explicit PlatformAppService(Profile* profile); |
22 virtual ~PlatformAppService(); | 22 virtual ~PlatformAppService(); |
23 | 23 |
24 private: | 24 private: |
25 // content::NotificationObserver: | 25 // content::NotificationObserver: |
26 virtual void Observe(int type, | 26 virtual void Observe(int type, |
27 const content::NotificationSource& source, | 27 const content::NotificationSource& source, |
28 const content::NotificationDetails& details) OVERRIDE; | 28 const content::NotificationDetails& details) OVERRIDE; |
29 | 29 |
30 content::NotificationRegistrar registrar_; | 30 content::NotificationRegistrar registrar_; |
31 }; | 31 }; |
32 | 32 |
33 } // namespace extensions | 33 } // namespace platform_apps |
34 | 34 |
35 #endif // CHROME_BROWSER_EXTENSIONS_PLATFORM_APP_SERVICE_H_ | 35 #endif // CHROME_BROWSER_PLATFORM_APPS_PLATFORM_APP_SERVICE_H_ |
OLD | NEW |