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

Side by Side Diff: content/shell/browser/layout_test/layout_test_push_messaging_service.h

Issue 1134733006: Push API: use (un)subscription instead of (un)registration (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed pre-submit warning Created 5 years, 7 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
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_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_PUSH_MESSAGING_SERVICE_H_ 5 #ifndef CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_PUSH_MESSAGING_SERVICE_H_
6 #define CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_PUSH_MESSAGING_SERVICE_H_ 6 #define CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_PUSH_MESSAGING_SERVICE_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 10
11 #include "content/public/browser/push_messaging_service.h" 11 #include "content/public/browser/push_messaging_service.h"
12 #include "content/public/common/push_messaging_status.h" 12 #include "content/public/common/push_messaging_status.h"
13 #include "third_party/WebKit/public/platform/modules/push_messaging/WebPushPermi ssionStatus.h" 13 #include "third_party/WebKit/public/platform/modules/push_messaging/WebPushPermi ssionStatus.h"
14 14
15 namespace content { 15 namespace content {
16 16
17 class LayoutTestPushMessagingService : public PushMessagingService { 17 class LayoutTestPushMessagingService : public PushMessagingService {
18 public: 18 public:
19 LayoutTestPushMessagingService(); 19 LayoutTestPushMessagingService();
20 ~LayoutTestPushMessagingService() override; 20 ~LayoutTestPushMessagingService() override;
21 21
22 // PushMessagingService implementation: 22 // PushMessagingService implementation:
23 GURL GetPushEndpoint() override; 23 GURL GetPushEndpoint() override;
24 void RegisterFromDocument( 24 void SubscribeFromDocument(
25 const GURL& requesting_origin, 25 const GURL& requesting_origin,
26 int64 service_worker_registration_id, 26 int64 service_worker_registration_id,
27 const std::string& sender_id, 27 const std::string& sender_id,
28 int renderer_id, 28 int renderer_id,
29 int render_frame_id, 29 int render_frame_id,
30 bool user_visible, 30 bool user_visible,
31 const PushMessagingService::RegisterCallback& callback) override; 31 const PushMessagingService::RegisterCallback& callback) override;
32 void RegisterFromWorker( 32 void SubscribeFromWorker(
33 const GURL& requesting_origin, 33 const GURL& requesting_origin,
34 int64 service_worker_registration_id, 34 int64 service_worker_registration_id,
35 const std::string& sender_id, 35 const std::string& sender_id,
36 bool user_visible, 36 bool user_visible,
37 const PushMessagingService::RegisterCallback& callback) override; 37 const PushMessagingService::RegisterCallback& callback) override;
38 blink::WebPushPermissionStatus GetPermissionStatus( 38 blink::WebPushPermissionStatus GetPermissionStatus(
39 const GURL& requesting_origin, 39 const GURL& requesting_origin,
40 const GURL& embedding_origin, 40 const GURL& embedding_origin,
41 bool user_visible) override; 41 bool user_visible) override;
42 bool SupportNonVisibleMessages() override; 42 bool SupportNonVisibleMessages() override;
43 void Unregister(const GURL& requesting_origin, 43 void Unsubscribe(const GURL& requesting_origin,
44 int64 service_worker_registration_id, 44 int64 service_worker_registration_id,
45 const std::string& sender_id, 45 const std::string& sender_id,
46 const UnregisterCallback& callback) override; 46 const UnregisterCallback& callback) override;
47 47
48 private: 48 private:
49 DISALLOW_COPY_AND_ASSIGN(LayoutTestPushMessagingService); 49 DISALLOW_COPY_AND_ASSIGN(LayoutTestPushMessagingService);
50 }; 50 };
51 51
52 } // namespace content 52 } // namespace content
53 53
54 #endif // CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_PUSH_MESSAGING_SERVICE_ H_ 54 #endif // CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_PUSH_MESSAGING_SERVICE_ H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698