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

Side by Side Diff: content/renderer/push_messaging_dispatcher.h

Issue 830853005: Push: move push_messaging_dispatcher files into push_messaging directory. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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
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_RENDERER_PUSH_MESSAGING_DISPATCHER_H_
6 #define CONTENT_RENDERER_PUSH_MESSAGING_DISPATCHER_H_
7
8 #include <string>
9
10 #include "base/id_map.h"
11 #include "content/public/common/push_messaging_status.h"
12 #include "content/public/renderer/render_frame_observer.h"
13 #include "third_party/WebKit/public/platform/WebPushClient.h"
14 #include "third_party/WebKit/public/platform/WebPushPermissionStatus.h"
15
16 class GURL;
17
18 namespace IPC {
19 class Message;
20 } // namespace IPC
21
22 namespace content {
23
24 struct Manifest;
25
26 class PushMessagingDispatcher : public RenderFrameObserver,
27 public blink::WebPushClient {
28 public:
29 explicit PushMessagingDispatcher(RenderFrame* render_frame);
30 virtual ~PushMessagingDispatcher();
31
32 private:
33 // RenderFrame::Observer implementation.
34 bool OnMessageReceived(const IPC::Message& message) override;
35
36 // WebPushClient implementation.
37 virtual void registerPushMessaging(
38 blink::WebServiceWorkerRegistration* service_worker_registration,
39 blink::WebPushRegistrationCallbacks* callbacks); // override
40
41 void DoRegister(
42 blink::WebServiceWorkerRegistration* service_worker_registration,
43 blink::WebPushRegistrationCallbacks* callbacks,
44 const Manifest& manifest);
45
46 void OnRegisterFromDocumentSuccess(int32 request_id,
47 const GURL& endpoint,
48 const std::string& registration_id);
49
50 void OnRegisterFromDocumentError(int32 request_id,
51 PushRegistrationStatus status);
52
53 IDMap<blink::WebPushRegistrationCallbacks, IDMapOwnPointer>
54 registration_callbacks_;
55
56 DISALLOW_COPY_AND_ASSIGN(PushMessagingDispatcher);
57 };
58
59 } // namespace content
60
61 #endif // CONTENT_RENDERER_PUSH_MESSAGING_DISPATCHER_H_
OLDNEW
« no previous file with comments | « content/renderer/push_messaging/push_messaging_dispatcher.cc ('k') | content/renderer/push_messaging_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698