OLD | NEW |
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 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 28 matching lines...) Expand all Loading... |
39 case PermissionName::PROTECTED_MEDIA_IDENTIFIER: | 39 case PermissionName::PROTECTED_MEDIA_IDENTIFIER: |
40 return PermissionType::PROTECTED_MEDIA_IDENTIFIER; | 40 return PermissionType::PROTECTED_MEDIA_IDENTIFIER; |
41 case PermissionName::DURABLE_STORAGE: | 41 case PermissionName::DURABLE_STORAGE: |
42 return PermissionType::DURABLE_STORAGE; | 42 return PermissionType::DURABLE_STORAGE; |
43 case PermissionName::AUDIO_CAPTURE: | 43 case PermissionName::AUDIO_CAPTURE: |
44 return PermissionType::AUDIO_CAPTURE; | 44 return PermissionType::AUDIO_CAPTURE; |
45 case PermissionName::VIDEO_CAPTURE: | 45 case PermissionName::VIDEO_CAPTURE: |
46 return PermissionType::VIDEO_CAPTURE; | 46 return PermissionType::VIDEO_CAPTURE; |
47 case PermissionName::BACKGROUND_SYNC: | 47 case PermissionName::BACKGROUND_SYNC: |
48 return PermissionType::BACKGROUND_SYNC; | 48 return PermissionType::BACKGROUND_SYNC; |
| 49 case PermissionName::SENSORS: |
| 50 return PermissionType::SENSORS; |
49 } | 51 } |
50 | 52 |
51 NOTREACHED(); | 53 NOTREACHED(); |
52 return PermissionType::NUM; | 54 return PermissionType::NUM; |
53 } | 55 } |
54 | 56 |
55 // This function allows the usage of the the multiple request map | 57 // This function allows the usage of the the multiple request map |
56 // with single requests. | 58 // with single requests. |
57 void PermissionRequestResponseCallbackWrapper( | 59 void PermissionRequestResponseCallbackWrapper( |
58 const base::Callback<void(PermissionStatus)>& callback, | 60 const base::Callback<void(PermissionStatus)>& callback, |
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
355 | 357 |
356 PermissionStatusCallback callback = subscription->callback; | 358 PermissionStatusCallback callback = subscription->callback; |
357 | 359 |
358 subscription->callback.Reset(); | 360 subscription->callback.Reset(); |
359 pending_subscriptions_.Remove(pending_subscription_id); | 361 pending_subscriptions_.Remove(pending_subscription_id); |
360 | 362 |
361 callback.Run(status); | 363 callback.Run(status); |
362 } | 364 } |
363 | 365 |
364 } // namespace content | 366 } // namespace content |
OLD | NEW |