OLD | NEW |
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/WebPushPermissionStatus.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 void SetPermission(const GURL& origin, bool allowed); | 22 void SetPermission(const GURL& origin, bool allowed); |
23 void ClearPermissions(); | 23 void ClearPermissions(); |
(...skipping 23 matching lines...) Expand all Loading... |
47 private: | 47 private: |
48 // Map from origin to permission status. | 48 // Map from origin to permission status. |
49 std::map<GURL, blink::WebPushPermissionStatus> permission_map_; | 49 std::map<GURL, blink::WebPushPermissionStatus> permission_map_; |
50 | 50 |
51 DISALLOW_COPY_AND_ASSIGN(LayoutTestPushMessagingService); | 51 DISALLOW_COPY_AND_ASSIGN(LayoutTestPushMessagingService); |
52 }; | 52 }; |
53 | 53 |
54 } // namespace content | 54 } // namespace content |
55 | 55 |
56 #endif // CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_PUSH_MESSAGING_SERVICE_
H_ | 56 #endif // CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_PUSH_MESSAGING_SERVICE_
H_ |
OLD | NEW |