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

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

Issue 10837013: Chrome Cloud Messaging (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: InvalidationHandler + event Created 8 years, 4 months 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_EXTENSIONS_API_PUSH_MESSAGING_PUSH_MESSAGING_API_H__
6 #define CHROME_BROWSER_EXTENSIONS_API_PUSH_MESSAGING_PUSH_MESSAGING_API_H__
7
8 #include "base/memory/scoped_ptr.h"
9 #include "chrome/browser/extensions/api/push_messaging/invalidation_handler_obse rver.h"
10
11 class Profile;
12
13 namespace extensions {
14
15 class InvalidationHandler;
16
17 class ExtensionPushMessagingEventRouter : public InvalidationHandlerObserver {
18 public:
19 explicit ExtensionPushMessagingEventRouter(Profile* profile);
20 virtual ~ExtensionPushMessagingEventRouter();
21
22 void Init();
23
24 void TriggerMessageForTest(const std::string& extension_id,
25 int subchannel,
26 const std::string& payload);
27
28 private:
29 // InvalidationHandlerObserver implementation.
30 virtual void OnMessage(const std::string& extension_id,
31 int subchannel,
32 const std::string& payload) OVERRIDE;
33
34 Profile* profile_;
35 scoped_ptr<InvalidationHandler> handler_;
36
37 DISALLOW_COPY_AND_ASSIGN(ExtensionPushMessagingEventRouter);
38 };
39
40 } // namespace extension
41
42 #endif // CHROME_BROWSER_EXTENSIONS_API_PUSH_MESSAGING_PUSH_MESSAGING_API_H__
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698