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

Side by Side Diff: content/public/browser/push_messaging_router.h

Issue 340773006: Dispatch push event to worker from PushServiceImpl#OnMessage. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address John's comments. Created 6 years, 5 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 2014 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 CONTENT_PUBLIC_BROWSER_PUSH_MESSAGING_ROUTER_H_
6 #define CONTENT_PUBLIC_BROWSER_PUSH_MESSAGING_ROUTER_H_
7
8 #include <string>
9
10 #include "base/callback.h"
11 #include "base/memory/scoped_ptr.h"
12 #include "content/common/content_export.h"
13 #include "content/public/common/push_messaging_status.h"
14
15 namespace content {
16
17 class BrowserContext;
18 struct PushMessagingApplicationId;
michaeln 2014/07/24 02:08:16 where is this defined?
Michael van Ouwerkerk 2014/07/24 14:18:55 (In another pending patch)
19
20 // Routes messages from a PushMessagingService to the correct Service Worker.
21 class CONTENT_EXPORT PushMessagingRouter {
22 public:
23 static scoped_ptr<PushMessagingRouter> Create(
24 BrowserContext* browser_context);
25
26 typedef base::Callback<void(PushMessagingStatus /* push_messaging_status */)>
27 DeliverMessageCallback;
28
29 // Delivers a push message with |data| to the Service Worker identified by
30 // |application_id|. Must be called on the UI thread.
31 virtual void DeliverMessage(
32 const PushMessagingApplicationId& application_id,
33 const std::string& data,
34 const DeliverMessageCallback& deliver_message_callback) = 0;
35
36 virtual ~PushMessagingRouter() {}
37 };
38
39 } // namespace content
40
41 #endif // CONTENT_PUBLIC_BROWSER_PUSH_MESSAGING_ROUTER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698