Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(286)

Side by Side Diff: chrome/browser/extensions/api/push_messaging/push_messaging_api.h

Issue 11366074: Coalesce event router Init calls into their constructors. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: aa Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 16 matching lines...) Expand all
27 class ObfuscatedGaiaIdFetcher; 27 class ObfuscatedGaiaIdFetcher;
28 28
29 // Observes a single InvalidationHandler and generates onMessage events. 29 // Observes a single InvalidationHandler and generates onMessage events.
30 class PushMessagingEventRouter 30 class PushMessagingEventRouter
31 : public PushMessagingInvalidationHandlerDelegate, 31 : public PushMessagingInvalidationHandlerDelegate,
32 public content::NotificationObserver { 32 public content::NotificationObserver {
33 public: 33 public:
34 explicit PushMessagingEventRouter(Profile* profile); 34 explicit PushMessagingEventRouter(Profile* profile);
35 virtual ~PushMessagingEventRouter(); 35 virtual ~PushMessagingEventRouter();
36 36
37 void Init();
38 void Shutdown(); 37 void Shutdown();
39 38
40 PushMessagingInvalidationMapper* GetMapperForTest() const { 39 PushMessagingInvalidationMapper* GetMapperForTest() const {
41 return handler_.get(); 40 return handler_.get();
42 } 41 }
43 void SetMapperForTest(scoped_ptr<PushMessagingInvalidationMapper> mapper); 42 void SetMapperForTest(scoped_ptr<PushMessagingInvalidationMapper> mapper);
44 void TriggerMessageForTest(const std::string& extension_id, 43 void TriggerMessageForTest(const std::string& extension_id,
45 int subchannel, 44 int subchannel,
46 const std::string& payload); 45 const std::string& payload);
47 46
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 const GoogleServiceAuthError& error) OVERRIDE; 100 const GoogleServiceAuthError& error) OVERRIDE;
102 scoped_ptr<ObfuscatedGaiaIdFetcher> fetcher_; 101 scoped_ptr<ObfuscatedGaiaIdFetcher> fetcher_;
103 bool interactive_; 102 bool interactive_;
104 103
105 DISALLOW_COPY_AND_ASSIGN(PushMessagingGetChannelIdFunction); 104 DISALLOW_COPY_AND_ASSIGN(PushMessagingGetChannelIdFunction);
106 }; 105 };
107 106
108 } // namespace extension 107 } // namespace extension
109 108
110 #endif // CHROME_BROWSER_EXTENSIONS_API_PUSH_MESSAGING_PUSH_MESSAGING_API_H__ 109 #endif // CHROME_BROWSER_EXTENSIONS_API_PUSH_MESSAGING_PUSH_MESSAGING_API_H__
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698