| 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 <stdint.h> | 8 #include <stdint.h> | 
| 9 | 9 | 
| 10 #include <map> | 10 #include <map> | 
| 11 #include <set> | 11 #include <set> | 
| 12 | 12 | 
| 13 #include "base/macros.h" | 13 #include "base/macros.h" | 
| 14 #include "content/public/browser/push_messaging_service.h" | 14 #include "content/public/browser/push_messaging_service.h" | 
| 15 #include "content/public/common/push_messaging_status.h" | 15 #include "content/public/common/push_messaging_status.h" | 
| 16 #include "third_party/WebKit/public/platform/modules/push_messaging/WebPushPermi
    ssionStatus.h" | 16 #include "third_party/WebKit/public/platform/modules/push_messaging/WebPushPermi
    ssionStatus.h" | 
| 17 | 17 | 
| 18 namespace content { | 18 namespace content { | 
| 19 | 19 | 
|  | 20 struct PushSubscriptionOptions; | 
|  | 21 | 
| 20 class LayoutTestPushMessagingService : public PushMessagingService { | 22 class LayoutTestPushMessagingService : public PushMessagingService { | 
| 21  public: | 23  public: | 
| 22   LayoutTestPushMessagingService(); | 24   LayoutTestPushMessagingService(); | 
| 23   ~LayoutTestPushMessagingService() override; | 25   ~LayoutTestPushMessagingService() override; | 
| 24 | 26 | 
| 25   // PushMessagingService implementation: | 27   // PushMessagingService implementation: | 
| 26   GURL GetPushEndpoint() override; | 28   GURL GetPushEndpoint() override; | 
| 27   void SubscribeFromDocument( | 29   void SubscribeFromDocument( | 
| 28       const GURL& requesting_origin, | 30       const GURL& requesting_origin, | 
| 29       int64_t service_worker_registration_id, | 31       int64_t service_worker_registration_id, | 
| 30       const std::string& sender_id, |  | 
| 31       int renderer_id, | 32       int renderer_id, | 
| 32       int render_frame_id, | 33       int render_frame_id, | 
| 33       bool user_visible, | 34       const PushSubscriptionOptions& options, | 
| 34       const PushMessagingService::RegisterCallback& callback) override; | 35       const PushMessagingService::RegisterCallback& callback) override; | 
| 35   void SubscribeFromWorker( | 36   void SubscribeFromWorker( | 
| 36       const GURL& requesting_origin, | 37       const GURL& requesting_origin, | 
| 37       int64_t service_worker_registration_id, | 38       int64_t service_worker_registration_id, | 
| 38       const std::string& sender_id, | 39       const PushSubscriptionOptions& options, | 
| 39       bool user_visible, |  | 
| 40       const PushMessagingService::RegisterCallback& callback) override; | 40       const PushMessagingService::RegisterCallback& callback) override; | 
| 41   void GetEncryptionInfo( | 41   void GetEncryptionInfo( | 
| 42       const GURL& origin, | 42       const GURL& origin, | 
| 43       int64_t service_worker_registration_id, | 43       int64_t service_worker_registration_id, | 
| 44       const PushMessagingService::EncryptionInfoCallback& callback) override; | 44       const PushMessagingService::EncryptionInfoCallback& callback) override; | 
| 45   blink::WebPushPermissionStatus GetPermissionStatus( | 45   blink::WebPushPermissionStatus GetPermissionStatus( | 
| 46       const GURL& requesting_origin, | 46       const GURL& requesting_origin, | 
| 47       const GURL& embedding_origin, | 47       const GURL& embedding_origin, | 
| 48       bool user_visible) override; | 48       bool user_visible) override; | 
| 49   bool SupportNonVisibleMessages() override; | 49   bool SupportNonVisibleMessages() override; | 
| 50   void Unsubscribe(const GURL& requesting_origin, | 50   void Unsubscribe(const GURL& requesting_origin, | 
| 51                    int64_t service_worker_registration_id, | 51                    int64_t service_worker_registration_id, | 
| 52                    const std::string& sender_id, | 52                    const std::string& sender_id, | 
| 53                    const UnregisterCallback& callback) override; | 53                    const UnregisterCallback& callback) override; | 
| 54 | 54 | 
| 55  private: | 55  private: | 
| 56   DISALLOW_COPY_AND_ASSIGN(LayoutTestPushMessagingService); | 56   DISALLOW_COPY_AND_ASSIGN(LayoutTestPushMessagingService); | 
| 57 }; | 57 }; | 
| 58 | 58 | 
| 59 }  // namespace content | 59 }  // namespace content | 
| 60 | 60 | 
| 61 #endif  // CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_PUSH_MESSAGING_SERVICE_
    H_ | 61 #endif  // CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_PUSH_MESSAGING_SERVICE_
    H_ | 
| OLD | NEW | 
|---|