Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(60)

Side by Side Diff: content/renderer/notification_permission_dispatcher.cc

Issue 2145993003: blink: Remove uses of blink variant bindings in content (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@my-origin
Patch Set: Remove dependency on blink bindings Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "content/public/renderer/render_frame.h" 10 #include "content/public/renderer/render_frame.h"
11 #include "services/shell/public/cpp/interface_provider.h" 11 #include "services/shell/public/cpp/interface_provider.h"
12 #include "third_party/WebKit/public/platform/WebSecurityOrigin.h" 12 #include "third_party/WebKit/public/platform/WebSecurityOrigin.h"
13 #include "third_party/WebKit/public/platform/WebString.h" 13 #include "third_party/WebKit/public/platform/WebString.h"
14 #include "third_party/WebKit/public/platform/modules/permissions/permission_stat us.mojom-blink.h"
15 #include "third_party/WebKit/public/platform/modules/permissions/permission_stat us.mojom.h" 14 #include "third_party/WebKit/public/platform/modules/permissions/permission_stat us.mojom.h"
16 #include "third_party/WebKit/public/web/WebUserGestureIndicator.h" 15 #include "third_party/WebKit/public/web/WebUserGestureIndicator.h"
17 #include "third_party/WebKit/public/web/modules/notifications/WebNotificationPer missionCallback.h" 16 #include "third_party/WebKit/public/web/modules/notifications/WebNotificationPer missionCallback.h"
18 17
19 using blink::WebNotificationPermissionCallback; 18 using blink::WebNotificationPermissionCallback;
20 19
21 namespace content { 20 namespace content {
22 21
23 NotificationPermissionDispatcher::NotificationPermissionDispatcher( 22 NotificationPermissionDispatcher::NotificationPermissionDispatcher(
24 RenderFrame* render_frame) 23 RenderFrame* render_frame)
(...skipping 18 matching lines...) Expand all
43 base::Bind(&NotificationPermissionDispatcher::OnPermissionRequestComplete, 42 base::Bind(&NotificationPermissionDispatcher::OnPermissionRequestComplete,
44 base::Unretained(this), 43 base::Unretained(this),
45 base::Passed(std::move(owned_callback)))); 44 base::Passed(std::move(owned_callback))));
46 } 45 }
47 46
48 void NotificationPermissionDispatcher::OnPermissionRequestComplete( 47 void NotificationPermissionDispatcher::OnPermissionRequestComplete(
49 std::unique_ptr<WebNotificationPermissionCallback> callback, 48 std::unique_ptr<WebNotificationPermissionCallback> callback,
50 blink::mojom::PermissionStatus status) { 49 blink::mojom::PermissionStatus status) {
51 DCHECK(callback); 50 DCHECK(callback);
52 51
53 blink::mojom::blink::PermissionStatus blink_status = 52 // Blink can't use non-blink bindings so we need to cast to int32.
54 static_cast<blink::mojom::blink::PermissionStatus>(status); 53 int32_t blink_status = static_cast<int32_t>(status);
55 54
56 callback->permissionRequestComplete(blink_status); 55 callback->permissionRequestComplete(blink_status);
57 } 56 }
58 57
59 void NotificationPermissionDispatcher::OnDestruct() { 58 void NotificationPermissionDispatcher::OnDestruct() {
60 delete this; 59 delete this;
61 } 60 }
62 61
63 } // namespace content 62 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/BUILD.gn ('k') | third_party/WebKit/Source/web/NotificationPermissionClientImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698