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_APP_NOTIFICATION_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_APP_NOTIFICATION_MANAGER_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_APP_NOTIFICATION_MANAGER_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_APP_NOTIFICATION_MANAGER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 #include "sync/api/sync_change.h" | 22 #include "sync/api/sync_change.h" |
23 #include "sync/api/syncable_service.h" | 23 #include "sync/api/syncable_service.h" |
24 | 24 |
25 class PerfTimer; | 25 class PerfTimer; |
26 class Profile; | 26 class Profile; |
27 | 27 |
28 namespace syncer { | 28 namespace syncer { |
29 class SyncErrorFactory; | 29 class SyncErrorFactory; |
30 } | 30 } |
31 | 31 |
| 32 namespace extensions { |
| 33 |
32 // This class keeps track of notifications for installed apps. | 34 // This class keeps track of notifications for installed apps. |
33 class AppNotificationManager | 35 class AppNotificationManager |
34 : public base::RefCountedThreadSafe< | 36 : public base::RefCountedThreadSafe< |
35 AppNotificationManager, | 37 AppNotificationManager, |
36 content::BrowserThread::DeleteOnUIThread>, | 38 content::BrowserThread::DeleteOnUIThread>, |
37 public content::NotificationObserver, | 39 public content::NotificationObserver, |
38 public syncer::SyncableService { | 40 public syncer::SyncableService { |
39 public: | 41 public: |
40 static const unsigned int kMaxNotificationPerApp; | 42 static const unsigned int kMaxNotificationPerApp; |
41 explicit AppNotificationManager(Profile* profile); | 43 explicit AppNotificationManager(Profile* profile); |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 bool models_associated_; | 175 bool models_associated_; |
174 // Whether syncer changes are being processed right now. | 176 // Whether syncer changes are being processed right now. |
175 bool processing_syncer_changes_; | 177 bool processing_syncer_changes_; |
176 | 178 |
177 // Used for a histogram of load time. | 179 // Used for a histogram of load time. |
178 scoped_ptr<PerfTimer> load_timer_; | 180 scoped_ptr<PerfTimer> load_timer_; |
179 | 181 |
180 DISALLOW_COPY_AND_ASSIGN(AppNotificationManager); | 182 DISALLOW_COPY_AND_ASSIGN(AppNotificationManager); |
181 }; | 183 }; |
182 | 184 |
| 185 } // namespace extensions |
| 186 |
183 #endif // CHROME_BROWSER_EXTENSIONS_APP_NOTIFICATION_MANAGER_H_ | 187 #endif // CHROME_BROWSER_EXTENSIONS_APP_NOTIFICATION_MANAGER_H_ |
OLD | NEW |