| 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_API_H__ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_PUSH_MESSAGING_PUSH_MESSAGING_API_H__ |
| 6 #define CHROME_BROWSER_EXTENSIONS_API_PUSH_MESSAGING_PUSH_MESSAGING_API_H__ | 6 #define CHROME_BROWSER_EXTENSIONS_API_PUSH_MESSAGING_PUSH_MESSAGING_API_H__ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 | 99 |
| 100 class PushMessagingAPI : public ProfileKeyedAPI, | 100 class PushMessagingAPI : public ProfileKeyedAPI, |
| 101 public content::NotificationObserver { | 101 public content::NotificationObserver { |
| 102 public: | 102 public: |
| 103 explicit PushMessagingAPI(Profile* profile); | 103 explicit PushMessagingAPI(Profile* profile); |
| 104 virtual ~PushMessagingAPI(); | 104 virtual ~PushMessagingAPI(); |
| 105 | 105 |
| 106 // Convenience method to get the PushMessagingAPI for a profile. | 106 // Convenience method to get the PushMessagingAPI for a profile. |
| 107 static PushMessagingAPI* Get(Profile* profile); | 107 static PushMessagingAPI* Get(Profile* profile); |
| 108 | 108 |
| 109 // ProfileKeyedService implementation. | 109 // BrowserContextKeyedService implementation. |
| 110 virtual void Shutdown() OVERRIDE; | 110 virtual void Shutdown() OVERRIDE; |
| 111 | 111 |
| 112 // ProfileKeyedAPI implementation. | 112 // ProfileKeyedAPI implementation. |
| 113 static ProfileKeyedAPIFactory<PushMessagingAPI>* GetFactoryInstance(); | 113 static ProfileKeyedAPIFactory<PushMessagingAPI>* GetFactoryInstance(); |
| 114 | 114 |
| 115 // For testing purposes. | 115 // For testing purposes. |
| 116 PushMessagingEventRouter* GetEventRouterForTest() const { | 116 PushMessagingEventRouter* GetEventRouterForTest() const { |
| 117 return event_router_.get(); | 117 return event_router_.get(); |
| 118 } | 118 } |
| 119 PushMessagingInvalidationMapper* GetMapperForTest() const { | 119 PushMessagingInvalidationMapper* GetMapperForTest() const { |
| (...skipping 26 matching lines...) Expand all Loading... |
| 146 | 146 |
| 147 DISALLOW_COPY_AND_ASSIGN(PushMessagingAPI); | 147 DISALLOW_COPY_AND_ASSIGN(PushMessagingAPI); |
| 148 }; | 148 }; |
| 149 | 149 |
| 150 template <> | 150 template <> |
| 151 void ProfileKeyedAPIFactory<PushMessagingAPI>::DeclareFactoryDependencies(); | 151 void ProfileKeyedAPIFactory<PushMessagingAPI>::DeclareFactoryDependencies(); |
| 152 | 152 |
| 153 } // namespace extensions | 153 } // namespace extensions |
| 154 | 154 |
| 155 #endif // CHROME_BROWSER_EXTENSIONS_API_PUSH_MESSAGING_PUSH_MESSAGING_API_H__ | 155 #endif // CHROME_BROWSER_EXTENSIONS_API_PUSH_MESSAGING_PUSH_MESSAGING_API_H__ |
| OLD | NEW |