| OLD | NEW |
| (Empty) |
| 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. | |
| 4 | |
| 5 #ifndef PushPermissionClient_h | |
| 6 #define PushPermissionClient_h | |
| 7 | |
| 8 #include "platform/Supplementable.h" | |
| 9 #include "public/platform/WebCallback.h" | |
| 10 #include "wtf/PassOwnPtr.h" | |
| 11 | |
| 12 namespace blink { | |
| 13 | |
| 14 class ExecutionContext; | |
| 15 class LocalFrame; | |
| 16 | |
| 17 class PushPermissionClient : public WillBeHeapSupplement<LocalFrame> { | |
| 18 public: | |
| 19 virtual ~PushPermissionClient() { } | |
| 20 | |
| 21 // Requests user permission to use the Push API from the origin of the | |
| 22 // current frame. The provided callback will be run when a decision has been | |
| 23 // made. | |
| 24 virtual void requestPermission(ExecutionContext*, WebCallback*) = 0; | |
| 25 | |
| 26 // WillBeHeapSupplement requirements. | |
| 27 static const char* supplementName(); | |
| 28 static PushPermissionClient* from(ExecutionContext*); | |
| 29 }; | |
| 30 | |
| 31 void providePushPermissionClientTo(LocalFrame&, PassOwnPtrWillBeRawPtr<PushPermi
ssionClient>); | |
| 32 | |
| 33 } // namespace blink | |
| 34 | |
| 35 #endif // PushPermissionClient_h | |
| OLD | NEW |