Refactor WebsiteSettings to operate on a SecurityInfo
[chromium-blink-merge.git] / content / shell / browser / layout_test / layout_test_push_messaging_service.h
blob2efea8ba73cf0841f9c4bd09da408a8883d72b70
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.
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_
8 #include <map>
9 #include <set>
11 #include "content/public/browser/push_messaging_service.h"
12 #include "content/public/common/push_messaging_status.h"
13 #include "third_party/WebKit/public/platform/modules/push_messaging/WebPushPermissionStatus.h"
15 namespace content {
17 class LayoutTestPushMessagingService : public PushMessagingService {
18 public:
19 LayoutTestPushMessagingService();
20 ~LayoutTestPushMessagingService() override;
22 // PushMessagingService implementation:
23 GURL GetPushEndpoint() override;
24 void SubscribeFromDocument(
25 const GURL& requesting_origin,
26 int64_t service_worker_registration_id,
27 const std::string& sender_id,
28 int renderer_id,
29 int render_frame_id,
30 bool user_visible,
31 const PushMessagingService::RegisterCallback& callback) override;
32 void SubscribeFromWorker(
33 const GURL& requesting_origin,
34 int64_t service_worker_registration_id,
35 const std::string& sender_id,
36 bool user_visible,
37 const PushMessagingService::RegisterCallback& callback) override;
38 void GetPublicEncryptionKey(
39 const GURL& origin,
40 int64_t service_worker_registration_id,
41 const PushMessagingService::PublicKeyCallback& callback) override;
42 blink::WebPushPermissionStatus GetPermissionStatus(
43 const GURL& requesting_origin,
44 const GURL& embedding_origin,
45 bool user_visible) override;
46 bool SupportNonVisibleMessages() override;
47 void Unsubscribe(const GURL& requesting_origin,
48 int64_t service_worker_registration_id,
49 const std::string& sender_id,
50 const UnregisterCallback& callback) override;
52 private:
53 DISALLOW_COPY_AND_ASSIGN(LayoutTestPushMessagingService);
56 } // namespace content
58 #endif // CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_PUSH_MESSAGING_SERVICE_H_