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

Side by Side Diff: chromecast/browser/cast_permission_manager.cc

Issue 1419083002: Permissions: browser/ side implementation of multiple permissions request. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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 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 "chromecast/browser/cast_permission_manager.h" 5 #include "chromecast/browser/cast_permission_manager.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "content/public/browser/permission_type.h" 9 #include "content/public/browser/permission_type.h"
10 10
(...skipping 11 matching lines...) Expand all
22 content::PermissionType permission, 22 content::PermissionType permission,
23 content::RenderFrameHost* render_frame_host, 23 content::RenderFrameHost* render_frame_host,
24 const GURL& origin, 24 const GURL& origin,
25 bool user_gesture, 25 bool user_gesture,
26 const base::Callback<void(content::PermissionStatus)>& callback) { 26 const base::Callback<void(content::PermissionStatus)>& callback) {
27 LOG(INFO) << __FUNCTION__ << ": " << static_cast<int>(permission); 27 LOG(INFO) << __FUNCTION__ << ": " << static_cast<int>(permission);
28 callback.Run(content::PermissionStatus::PERMISSION_STATUS_GRANTED); 28 callback.Run(content::PermissionStatus::PERMISSION_STATUS_GRANTED);
29 return kNoPendingOperation; 29 return kNoPendingOperation;
30 } 30 }
31 31
32 int CastPermissionManager::RequestPermissions(
33 const std::vector<content::PermissionType>& permissions,
34 content::RenderFrameHost* render_frame_host,
35 const GURL& requesting_origin,
36 bool user_gesture,
37 const base::Callback<void(
38 const std::vector<content::PermissionStatus>&)>& callback) {
39 callback.Run(std::vector<content::PermissionStatus>(permissions.size(),
40 content::PermissionStatus::PERMISSION_STATUS_GRANTED));
41 return kNoPendingOperation;
42 }
43
32 void CastPermissionManager::CancelPermissionRequest(int request_id) { 44 void CastPermissionManager::CancelPermissionRequest(int request_id) {
33 } 45 }
34 46
35 void CastPermissionManager::ResetPermission( 47 void CastPermissionManager::ResetPermission(
36 content::PermissionType permission, 48 content::PermissionType permission,
37 const GURL& requesting_origin, 49 const GURL& requesting_origin,
38 const GURL& embedding_origin) { 50 const GURL& embedding_origin) {
39 } 51 }
40 52
41 content::PermissionStatus CastPermissionManager::GetPermissionStatus( 53 content::PermissionStatus CastPermissionManager::GetPermissionStatus(
(...skipping 17 matching lines...) Expand all
59 const base::Callback<void(content::PermissionStatus)>& callback) { 71 const base::Callback<void(content::PermissionStatus)>& callback) {
60 return kNoPendingOperation; 72 return kNoPendingOperation;
61 } 73 }
62 74
63 void CastPermissionManager::UnsubscribePermissionStatusChange( 75 void CastPermissionManager::UnsubscribePermissionStatusChange(
64 int subscription_id) { 76 int subscription_id) {
65 } 77 }
66 78
67 } // namespace shell 79 } // namespace shell
68 } // namespace chromecast 80 } // namespace chromecast
OLDNEW
« no previous file with comments | « chromecast/browser/cast_permission_manager.h ('k') | content/browser/permissions/permission_service_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698