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

Side by Side Diff: content/shell/browser/shell_permission_manager.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, 6 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
« no previous file with comments | « content/shell/browser/shell_permission_manager.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/shell/browser/shell_permission_manager.h" 5 #include "content/shell/browser/shell_permission_manager.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "content/public/browser/permission_type.h" 8 #include "content/public/browser/permission_type.h"
9 9
10 namespace content { 10 namespace content {
11 11
12 ShellPermissionManager::ShellPermissionManager() 12 ShellPermissionManager::ShellPermissionManager()
13 : PermissionManager() { 13 : PermissionManager() {
14 } 14 }
15 15
16 ShellPermissionManager::~ShellPermissionManager() { 16 ShellPermissionManager::~ShellPermissionManager() {
17 } 17 }
18 18
19 void ShellPermissionManager::RequestPermission( 19 void ShellPermissionManager::RequestPermission(
20 PermissionType permission, 20 PermissionType permission,
21 WebContents* web_contents, 21 RenderFrameHost* render_frame_host,
22 int request_id, 22 int request_id,
23 const GURL& requesting_origin, 23 const GURL& requesting_origin,
24 bool user_gesture, 24 bool user_gesture,
25 const base::Callback<void(PermissionStatus)>& callback) { 25 const base::Callback<void(PermissionStatus)>& callback) {
26 callback.Run(permission == PermissionType::GEOLOCATION 26 callback.Run(permission == PermissionType::GEOLOCATION
27 ? PERMISSION_STATUS_GRANTED : PERMISSION_STATUS_DENIED); 27 ? PERMISSION_STATUS_GRANTED : PERMISSION_STATUS_DENIED);
28 } 28 }
29 29
30 void ShellPermissionManager::CancelPermissionRequest( 30 void ShellPermissionManager::CancelPermissionRequest(
31 PermissionType permission, 31 PermissionType permission,
32 WebContents* web_contents, 32 RenderFrameHost* render_frame_host,
33 int request_id, 33 int request_id,
34 const GURL& requesting_origin) { 34 const GURL& requesting_origin) {
35 } 35 }
36 36
37 void ShellPermissionManager::ResetPermission( 37 void ShellPermissionManager::ResetPermission(
38 PermissionType permission, 38 PermissionType permission,
39 const GURL& requesting_origin, 39 const GURL& requesting_origin,
40 const GURL& embedding_origin) { 40 const GURL& embedding_origin) {
41 } 41 }
42 42
(...skipping 16 matching lines...) Expand all
59 const GURL& embedding_origin, 59 const GURL& embedding_origin,
60 const base::Callback<void(PermissionStatus)>& callback) { 60 const base::Callback<void(PermissionStatus)>& callback) {
61 return -1; 61 return -1;
62 } 62 }
63 63
64 void ShellPermissionManager::UnsubscribePermissionStatusChange( 64 void ShellPermissionManager::UnsubscribePermissionStatusChange(
65 int subscription_id) { 65 int subscription_id) {
66 } 66 }
67 67
68 } // namespace content 68 } // namespace content
OLDNEW
« no previous file with comments | « content/shell/browser/shell_permission_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698