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

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

Issue 640593003: Remove the sender_id from the Push API code path. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git/+/master
Patch Set: add TODOs Created 6 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 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 CONTENT_RENDERER_PUSH_MESSAGING_DISPATCHER_H_ 5 #ifndef CONTENT_RENDERER_PUSH_MESSAGING_DISPATCHER_H_
6 #define CONTENT_RENDERER_PUSH_MESSAGING_DISPATCHER_H_ 6 #define CONTENT_RENDERER_PUSH_MESSAGING_DISPATCHER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/id_map.h" 10 #include "base/id_map.h"
(...skipping 20 matching lines...) Expand all
31 public blink::WebPushClient { 31 public blink::WebPushClient {
32 public: 32 public:
33 explicit PushMessagingDispatcher(RenderFrame* render_frame); 33 explicit PushMessagingDispatcher(RenderFrame* render_frame);
34 virtual ~PushMessagingDispatcher(); 34 virtual ~PushMessagingDispatcher();
35 35
36 private: 36 private:
37 // RenderFrame::Observer implementation. 37 // RenderFrame::Observer implementation.
38 bool OnMessageReceived(const IPC::Message& message) override; 38 bool OnMessageReceived(const IPC::Message& message) override;
39 39
40 // WebPushClient implementation. 40 // WebPushClient implementation.
41 // TODO(peter): Remove this signature of registerPushMessaging.
41 virtual void registerPushMessaging( 42 virtual void registerPushMessaging(
42 const blink::WebString& sender_id, 43 const blink::WebString& sender_id,
43 blink::WebPushRegistrationCallbacks* callbacks, 44 blink::WebPushRegistrationCallbacks* callbacks,
44 blink::WebServiceWorkerProvider* service_worker_provider); 45 blink::WebServiceWorkerProvider* service_worker_provider);
46 virtual void registerPushMessaging(
47 blink::WebPushRegistrationCallbacks* callbacks,
48 blink::WebServiceWorkerProvider* service_worker_provider);
45 49
46 void DoRegister(const std::string& sender_id, 50 void DoRegister(blink::WebPushRegistrationCallbacks* callbacks,
47 blink::WebPushRegistrationCallbacks* callbacks,
48 blink::WebServiceWorkerProvider* service_worker_provider, 51 blink::WebServiceWorkerProvider* service_worker_provider,
49 const Manifest& manifest); 52 const Manifest& manifest);
50 53
51 void OnRegisterSuccess(int32 callbacks_id, 54 void OnRegisterSuccess(int32 callbacks_id,
52 const GURL& endpoint, 55 const GURL& endpoint,
53 const std::string& registration_id); 56 const std::string& registration_id);
54 57
55 void OnRegisterError(int32 callbacks_id, PushRegistrationStatus status); 58 void OnRegisterError(int32 callbacks_id, PushRegistrationStatus status);
56 59
57 IDMap<blink::WebPushRegistrationCallbacks, IDMapOwnPointer> 60 IDMap<blink::WebPushRegistrationCallbacks, IDMapOwnPointer>
58 registration_callbacks_; 61 registration_callbacks_;
59 62
60 DISALLOW_COPY_AND_ASSIGN(PushMessagingDispatcher); 63 DISALLOW_COPY_AND_ASSIGN(PushMessagingDispatcher);
61 }; 64 };
62 65
63 } // namespace content 66 } // namespace content
64 67
65 #endif // CONTENT_RENDERER_PUSH_MESSAGING_DISPATCHER_H_ 68 #endif // CONTENT_RENDERER_PUSH_MESSAGING_DISPATCHER_H_
OLDNEW
« no previous file with comments | « chrome/test/data/push_messaging/test.html ('k') | content/renderer/push_messaging_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698