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

Side by Side Diff: content/browser/permissions/permission_service_impl.cc

Issue 2791623004: [sensors][permission] Add new permission types in permission module. (Closed)
Patch Set: Fix mounir's comment Created 3 years, 8 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/browser/permissions/permission_service_impl.h" 5 #include "content/browser/permissions/permission_service_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <memory> 9 #include <memory>
10 #include <utility> 10 #include <utility>
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 case PermissionName::PROTECTED_MEDIA_IDENTIFIER: 43 case PermissionName::PROTECTED_MEDIA_IDENTIFIER:
44 return PermissionType::PROTECTED_MEDIA_IDENTIFIER; 44 return PermissionType::PROTECTED_MEDIA_IDENTIFIER;
45 case PermissionName::DURABLE_STORAGE: 45 case PermissionName::DURABLE_STORAGE:
46 return PermissionType::DURABLE_STORAGE; 46 return PermissionType::DURABLE_STORAGE;
47 case PermissionName::AUDIO_CAPTURE: 47 case PermissionName::AUDIO_CAPTURE:
48 return PermissionType::AUDIO_CAPTURE; 48 return PermissionType::AUDIO_CAPTURE;
49 case PermissionName::VIDEO_CAPTURE: 49 case PermissionName::VIDEO_CAPTURE:
50 return PermissionType::VIDEO_CAPTURE; 50 return PermissionType::VIDEO_CAPTURE;
51 case PermissionName::BACKGROUND_SYNC: 51 case PermissionName::BACKGROUND_SYNC:
52 return PermissionType::BACKGROUND_SYNC; 52 return PermissionType::BACKGROUND_SYNC;
53 case PermissionName::AMBIENT_LIGHT_SENSOR:
54 return PermissionType::AMBIENT_LIGHT_SENSOR;
55 case PermissionName::ACCELEROMETER:
56 return PermissionType::ACCELEROMETER;
57 case PermissionName::GYROSCOPE:
58 return PermissionType::GYROSCOPE;
59 case PermissionName::MAGNETOMETER:
60 return PermissionType::MAGNETOMETER;
53 } 61 }
54 62
55 NOTREACHED(); 63 NOTREACHED();
56 return PermissionType::NUM; 64 return PermissionType::NUM;
57 } 65 }
58 66
59 // This function allows the usage of the the multiple request map 67 // This function allows the usage of the the multiple request map
60 // with single requests. 68 // with single requests.
61 void PermissionRequestResponseCallbackWrapper( 69 void PermissionRequestResponseCallbackWrapper(
62 const base::Callback<void(PermissionStatus)>& callback, 70 const base::Callback<void(PermissionStatus)>& callback,
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 301
294 GURL requesting_origin(origin.Serialize()); 302 GURL requesting_origin(origin.Serialize());
295 // If the embedding_origin is empty we'll use |origin| instead. 303 // If the embedding_origin is empty we'll use |origin| instead.
296 GURL embedding_origin = context_->GetEmbeddingOrigin(); 304 GURL embedding_origin = context_->GetEmbeddingOrigin();
297 browser_context->GetPermissionManager()->ResetPermission( 305 browser_context->GetPermissionManager()->ResetPermission(
298 type, requesting_origin, 306 type, requesting_origin,
299 embedding_origin.is_empty() ? requesting_origin : embedding_origin); 307 embedding_origin.is_empty() ? requesting_origin : embedding_origin);
300 } 308 }
301 309
302 } // namespace content 310 } // namespace content
OLDNEW
« no previous file with comments | « chrome/browser/permissions/permission_manager.cc ('k') | content/public/browser/permission_type.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698