| 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 #include "config.h" | 5 #include "config.h" |
| 6 #include "web/NotificationPermissionClientImpl.h" | 6 #include "web/NotificationPermissionClientImpl.h" |
| 7 | 7 |
| 8 #include "core/dom/Document.h" | 8 #include "core/dom/Document.h" |
| 9 #include "core/dom/ExecutionContext.h" | 9 #include "core/dom/ExecutionContext.h" |
| 10 #include "modules/notifications/Notification.h" | 10 #include "modules/notifications/Notification.h" |
| 11 #include "public/web/WebFrameClient.h" | 11 #include "public/web/WebFrameClient.h" |
| 12 #include "public/web/WebNotificationPermissionCallback.h" | 12 #include "public/web/modules/notifications/WebNotificationPermissionCallback.h" |
| 13 #include "web/WebLocalFrameImpl.h" | 13 #include "web/WebLocalFrameImpl.h" |
| 14 | 14 |
| 15 namespace blink { | 15 namespace blink { |
| 16 | 16 |
| 17 namespace { | 17 namespace { |
| 18 | 18 |
| 19 class WebNotificationPermissionCallbackImpl : public WebNotificationPermissionCa
llback { | 19 class WebNotificationPermissionCallbackImpl : public WebNotificationPermissionCa
llback { |
| 20 public: | 20 public: |
| 21 WebNotificationPermissionCallbackImpl(NotificationPermissionCallback* callba
ck) | 21 WebNotificationPermissionCallbackImpl(NotificationPermissionCallback* callba
ck) |
| 22 : m_callback(callback) | 22 : m_callback(callback) |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 { | 54 { |
| 55 ASSERT(context && context->isDocument()); | 55 ASSERT(context && context->isDocument()); |
| 56 | 56 |
| 57 Document* document = toDocument(context); | 57 Document* document = toDocument(context); |
| 58 WebLocalFrameImpl* webFrame = WebLocalFrameImpl::fromFrame(document->frame()
); | 58 WebLocalFrameImpl* webFrame = WebLocalFrameImpl::fromFrame(document->frame()
); |
| 59 | 59 |
| 60 webFrame->client()->requestNotificationPermission(WebSecurityOrigin(context-
>securityOrigin()), new WebNotificationPermissionCallbackImpl(callback)); | 60 webFrame->client()->requestNotificationPermission(WebSecurityOrigin(context-
>securityOrigin()), new WebNotificationPermissionCallbackImpl(callback)); |
| 61 } | 61 } |
| 62 | 62 |
| 63 } // namespace blink | 63 } // namespace blink |
| OLD | NEW |