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

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

Issue 1316863010: browser: implement multiple permission requesting (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@request-multiple-content
Patch Set: Rebase on master 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 void CastPermissionManager::CancelPermissionRequest( 32 int CastPermissionManager::RequestPermissions(
33 content::PermissionType permission, 33 const std::vector<content::PermissionType>& permissions,
34 content::RenderFrameHost* render_frame_host, 34 content::RenderFrameHost* render_frame_host,
35 int request_id, 35 const GURL& requesting_origin,
36 const GURL& origin) { 36 bool user_gesture,
37 const base::Callback<void(
38 const std::vector<content::PermissionStatus>&)>& callback) {
39 std::vector<content::PermissionStatus> result;
40 for (size_t i = 0; i < permissions.size(); ++i)
41 result.push_back(content::PermissionStatus::PERMISSION_STATUS_GRANTED);
42 callback.Run(result);
43 return kNoPendingOperation;
44 }
45
46 void CastPermissionManager::CancelPermissionRequest(int request_id) {
37 } 47 }
38 48
39 void CastPermissionManager::ResetPermission( 49 void CastPermissionManager::ResetPermission(
40 content::PermissionType permission, 50 content::PermissionType permission,
41 const GURL& requesting_origin, 51 const GURL& requesting_origin,
42 const GURL& embedding_origin) { 52 const GURL& embedding_origin) {
43 } 53 }
44 54
45 content::PermissionStatus CastPermissionManager::GetPermissionStatus( 55 content::PermissionStatus CastPermissionManager::GetPermissionStatus(
46 content::PermissionType permission, 56 content::PermissionType permission,
(...skipping 16 matching lines...) Expand all
63 const base::Callback<void(content::PermissionStatus)>& callback) { 73 const base::Callback<void(content::PermissionStatus)>& callback) {
64 return kNoPendingOperation; 74 return kNoPendingOperation;
65 } 75 }
66 76
67 void CastPermissionManager::UnsubscribePermissionStatusChange( 77 void CastPermissionManager::UnsubscribePermissionStatusChange(
68 int subscription_id) { 78 int subscription_id) {
69 } 79 }
70 80
71 } // namespace shell 81 } // namespace shell
72 } // namespace chromecast 82 } // namespace chromecast
OLDNEW
« no previous file with comments | « chromecast/browser/cast_permission_manager.h ('k') | content/browser/permissions/permission_service_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698