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

Unified Diff: content/browser/permissions/permission_service_impl.cc

Issue 1158813002: Use RenderFrameHost for ::RequestPermission() and ::CancelPermission(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: build fixes Created 5 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/permissions/permission_service_impl.cc
diff --git a/content/browser/permissions/permission_service_impl.cc b/content/browser/permissions/permission_service_impl.cc
index 89e9cdda3f17bb3758bf9db5f6746a6287534feb..83cb63798235cd02a6bd92c0d2757cba2cb75509 100644
--- a/content/browser/permissions/permission_service_impl.cc
+++ b/content/browser/permissions/permission_service_impl.cc
@@ -91,7 +91,7 @@ void PermissionServiceImpl::RequestPermission(
// can. Even if the call comes from a context where it is not possible to show
// any UI, we want to still return something relevant so the current
// permission status is returned.
- if (!context_->web_contents()) {
+ if (!context_->render_frame_host()) {
// There is no way to show a UI so the call will simply return the current
// permission.
HasPermission(permission, origin, callback);
@@ -111,7 +111,7 @@ void PermissionServiceImpl::RequestPermission(
browser_context->GetPermissionManager()->RequestPermission(
permission_type,
- context_->web_contents(),
+ context_->render_frame_host(),
request_id,
GURL(origin),
user_gesture, // TODO(mlamouri): should be removed (crbug.com/423770)
@@ -131,7 +131,7 @@ void PermissionServiceImpl::OnRequestPermissionResponse(
}
void PermissionServiceImpl::CancelPendingOperations() {
- DCHECK(context_->web_contents());
+ DCHECK(context_->render_frame_host());
DCHECK(context_->GetBrowserContext());
PermissionManager* permission_manager =
@@ -144,7 +144,7 @@ void PermissionServiceImpl::CancelPendingOperations() {
!it.IsAtEnd(); it.Advance()) {
permission_manager->CancelPermissionRequest(
it.GetCurrentValue()->permission,
- context_->web_contents(),
+ context_->render_frame_host(),
it.GetCurrentKey(),
it.GetCurrentValue()->origin);
}
« no previous file with comments | « content/browser/permissions/permission_service_context.cc ('k') | content/public/browser/permission_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698