| 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 "content/renderer/notification_permission_dispatcher.h" | 5 #include "content/renderer/notification_permission_dispatcher.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "content/public/common/service_registry.h" | 8 #include "content/public/common/service_registry.h" |
| 9 #include "content/public/renderer/render_frame.h" | 9 #include "content/public/renderer/render_frame.h" |
| 10 #include "third_party/WebKit/public/platform/WebString.h" | 10 #include "third_party/WebKit/public/platform/WebString.h" |
| 11 #include "third_party/WebKit/public/web/WebNotificationPermissionCallback.h" | |
| 12 #include "third_party/WebKit/public/web/WebSecurityOrigin.h" | 11 #include "third_party/WebKit/public/web/WebSecurityOrigin.h" |
| 13 #include "third_party/WebKit/public/web/WebUserGestureIndicator.h" | 12 #include "third_party/WebKit/public/web/WebUserGestureIndicator.h" |
| 13 #include "third_party/WebKit/public/web/modules/notifications/WebNotificationPer
missionCallback.h" |
| 14 | 14 |
| 15 namespace content { | 15 namespace content { |
| 16 | 16 |
| 17 NotificationPermissionDispatcher::NotificationPermissionDispatcher( | 17 NotificationPermissionDispatcher::NotificationPermissionDispatcher( |
| 18 RenderFrame* render_frame) : RenderFrameObserver(render_frame) { | 18 RenderFrame* render_frame) : RenderFrameObserver(render_frame) { |
| 19 } | 19 } |
| 20 | 20 |
| 21 NotificationPermissionDispatcher::~NotificationPermissionDispatcher() { | 21 NotificationPermissionDispatcher::~NotificationPermissionDispatcher() { |
| 22 } | 22 } |
| 23 | 23 |
| (...skipping 28 matching lines...) Expand all Loading... |
| 52 blink::WebNotificationPermission permission = | 52 blink::WebNotificationPermission permission = |
| 53 status == PERMISSION_STATUS_GRANTED | 53 status == PERMISSION_STATUS_GRANTED |
| 54 ? blink::WebNotificationPermissionAllowed | 54 ? blink::WebNotificationPermissionAllowed |
| 55 : blink::WebNotificationPermissionDenied; | 55 : blink::WebNotificationPermissionDenied; |
| 56 | 56 |
| 57 callback->permissionRequestComplete(permission); | 57 callback->permissionRequestComplete(permission); |
| 58 pending_requests_.Remove(request_id); | 58 pending_requests_.Remove(request_id); |
| 59 } | 59 } |
| 60 | 60 |
| 61 } // namespace content | 61 } // namespace content |
| OLD | NEW |