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_API_PUSH_MESSAGING_PUSH_MESSAGING_INVALIDATION
_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_PUSH_MESSAGING_PUSH_MESSAGING_INVALIDATION
_HANDLER_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_API_PUSH_MESSAGING_PUSH_MESSAGING_INVALIDATION
_HANDLER_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_PUSH_MESSAGING_PUSH_MESSAGING_INVALIDATION
_HANDLER_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 24 matching lines...) Expand all Loading... |
35 virtual ~PushMessagingInvalidationHandler(); | 35 virtual ~PushMessagingInvalidationHandler(); |
36 | 36 |
37 // PushMessagingInvalidationMapper implementation. | 37 // PushMessagingInvalidationMapper implementation. |
38 virtual void RegisterExtension(const std::string& extension_id) OVERRIDE; | 38 virtual void RegisterExtension(const std::string& extension_id) OVERRIDE; |
39 virtual void UnregisterExtension(const std::string& extension_id) OVERRIDE; | 39 virtual void UnregisterExtension(const std::string& extension_id) OVERRIDE; |
40 | 40 |
41 // InvalidationHandler implementation. | 41 // InvalidationHandler implementation. |
42 virtual void OnInvalidatorStateChange( | 42 virtual void OnInvalidatorStateChange( |
43 syncer::InvalidatorState state) OVERRIDE; | 43 syncer::InvalidatorState state) OVERRIDE; |
44 virtual void OnIncomingInvalidation( | 44 virtual void OnIncomingInvalidation( |
45 const syncer::ObjectIdInvalidationMap& invalidation_map, | 45 const syncer::ObjectIdInvalidationMap& invalidation_map) OVERRIDE; |
46 syncer::IncomingInvalidationSource source) OVERRIDE; | |
47 | 46 |
48 const std::set<std::string>& GetRegisteredExtensionsForTest() const { | 47 const std::set<std::string>& GetRegisteredExtensionsForTest() const { |
49 return registered_extensions_; | 48 return registered_extensions_; |
50 } | 49 } |
51 | 50 |
52 private: | 51 private: |
53 void UpdateRegistrations(); | 52 void UpdateRegistrations(); |
54 | 53 |
55 base::ThreadChecker thread_checker_; | 54 base::ThreadChecker thread_checker_; |
56 InvalidationFrontend* const service_; | 55 InvalidationFrontend* const service_; |
57 std::set<std::string> registered_extensions_; | 56 std::set<std::string> registered_extensions_; |
58 PushMessagingInvalidationHandlerDelegate* const delegate_; | 57 PushMessagingInvalidationHandlerDelegate* const delegate_; |
59 | 58 |
60 DISALLOW_COPY_AND_ASSIGN(PushMessagingInvalidationHandler); | 59 DISALLOW_COPY_AND_ASSIGN(PushMessagingInvalidationHandler); |
61 }; | 60 }; |
62 | 61 |
63 } // namespace extensions | 62 } // namespace extensions |
64 | 63 |
65 #endif // CHROME_BROWSER_EXTENSIONS_API_PUSH_MESSAGING_PUSH_MESSAGING_INVALIDAT
ION_HANDLER_H_ | 64 #endif // CHROME_BROWSER_EXTENSIONS_API_PUSH_MESSAGING_PUSH_MESSAGING_INVALIDAT
ION_HANDLER_H_ |
OLD | NEW |