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

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

Issue 10828087: Add skeleton implementation of ExtensionPushMessagingEventRouter. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Missing #include 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 <string>
9 #include "base/basictypes.h"
10 #include "base/compiler_specific.h"
11 #include "base/gtest_prod_util.h"
12 #include "chrome/browser/extensions/api/push_messaging/invalidation_handler_obse rver.h"
13
14 class Profile;
15
16 namespace extensions {
17
18 // Observes a single InvalidationHandler and generates onMessage events.
19 class PushMessagingEventRouter : public InvalidationHandlerObserver {
20 public:
21 explicit PushMessagingEventRouter(Profile* profile);
22 virtual ~PushMessagingEventRouter();
23
24 void Init();
25
26 private:
27 FRIEND_TEST_ALL_PREFIXES(PushMessagingApiTest, EventDispatch);
28
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
36 DISALLOW_COPY_AND_ASSIGN(PushMessagingEventRouter);
37 };
38
39 } // namespace extension
40
41 #endif // CHROME_BROWSER_EXTENSIONS_API_PUSH_MESSAGING_PUSH_MESSAGING_API_H__
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698