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 CHROME_BROWSER_DRIVE_DRIVE_NOTIFICATION_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_DRIVE_DRIVE_NOTIFICATION_MANAGER_H_ |
6 #define CHROME_BROWSER_DRIVE_DRIVE_NOTIFICATION_MANAGER_H_ | 6 #define CHROME_BROWSER_DRIVE_DRIVE_NOTIFICATION_MANAGER_H_ |
7 | 7 |
8 #include "base/memory/weak_ptr.h" | 8 #include "base/memory/weak_ptr.h" |
9 #include "base/observer_list.h" | 9 #include "base/observer_list.h" |
10 #include "base/timer/timer.h" | 10 #include "base/timer/timer.h" |
(...skipping 22 matching lines...) Expand all Loading... |
33 virtual ~DriveNotificationManager(); | 33 virtual ~DriveNotificationManager(); |
34 | 34 |
35 // BrowserContextKeyedService override. | 35 // BrowserContextKeyedService override. |
36 virtual void Shutdown() OVERRIDE; | 36 virtual void Shutdown() OVERRIDE; |
37 | 37 |
38 // syncer::InvalidationHandler implementation. | 38 // syncer::InvalidationHandler implementation. |
39 virtual void OnInvalidatorStateChange( | 39 virtual void OnInvalidatorStateChange( |
40 syncer::InvalidatorState state) OVERRIDE; | 40 syncer::InvalidatorState state) OVERRIDE; |
41 virtual void OnIncomingInvalidation( | 41 virtual void OnIncomingInvalidation( |
42 const syncer::ObjectIdInvalidationMap& invalidation_map) OVERRIDE; | 42 const syncer::ObjectIdInvalidationMap& invalidation_map) OVERRIDE; |
| 43 virtual std::string GetOwnerName() const OVERRIDE; |
43 | 44 |
44 void AddObserver(DriveNotificationObserver* observer); | 45 void AddObserver(DriveNotificationObserver* observer); |
45 void RemoveObserver(DriveNotificationObserver* observer); | 46 void RemoveObserver(DriveNotificationObserver* observer); |
46 | 47 |
47 // True when XMPP notification is currently enabled. | 48 // True when XMPP notification is currently enabled. |
48 bool push_notification_enabled() const { | 49 bool push_notification_enabled() const { |
49 return push_notification_enabled_; | 50 return push_notification_enabled_; |
50 } | 51 } |
51 | 52 |
52 // True when XMPP notification has been registered. | 53 // True when XMPP notification has been registered. |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 // Note: This should remain the last member so it'll be destroyed and | 91 // Note: This should remain the last member so it'll be destroyed and |
91 // invalidate its weak pointers before any other members are destroyed. | 92 // invalidate its weak pointers before any other members are destroyed. |
92 base::WeakPtrFactory<DriveNotificationManager> weak_ptr_factory_; | 93 base::WeakPtrFactory<DriveNotificationManager> weak_ptr_factory_; |
93 | 94 |
94 DISALLOW_COPY_AND_ASSIGN(DriveNotificationManager); | 95 DISALLOW_COPY_AND_ASSIGN(DriveNotificationManager); |
95 }; | 96 }; |
96 | 97 |
97 } // namespace drive | 98 } // namespace drive |
98 | 99 |
99 #endif // CHROME_BROWSER_DRIVE_DRIVE_NOTIFICATION_MANAGER_H_ | 100 #endif // CHROME_BROWSER_DRIVE_DRIVE_NOTIFICATION_MANAGER_H_ |
OLD | NEW |