| 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 #include "config.h" | |
| 6 #include "web/PushPermissionClientImpl.h" | |
| 7 | |
| 8 #include "core/dom/Document.h" | |
| 9 #include "core/dom/ExecutionContext.h" | |
| 10 #include "public/web/WebFrameClient.h" | |
| 11 #include "web/WebLocalFrameImpl.h" | |
| 12 | |
| 13 namespace blink { | |
| 14 | |
| 15 PassOwnPtrWillBeRawPtr<PushPermissionClientImpl> PushPermissionClientImpl::creat
e() | |
| 16 { | |
| 17 return adoptPtrWillBeNoop(new PushPermissionClientImpl()); | |
| 18 } | |
| 19 | |
| 20 PushPermissionClientImpl::PushPermissionClientImpl() | |
| 21 { | |
| 22 } | |
| 23 | |
| 24 PushPermissionClientImpl::~PushPermissionClientImpl() | |
| 25 { | |
| 26 } | |
| 27 | |
| 28 void PushPermissionClientImpl::requestPermission(ExecutionContext* context, WebC
allback* callback) | |
| 29 { | |
| 30 ASSERT(context && context->isDocument()); | |
| 31 | |
| 32 Document* document = toDocument(context); | |
| 33 WebLocalFrameImpl* webFrame = WebLocalFrameImpl::fromFrame(document->frame()
); | |
| 34 | |
| 35 webFrame->client()->requestPushPermission(callback); | |
| 36 } | |
| 37 | |
| 38 } // namespace blink | |
| OLD | NEW |