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 "content/public/browser/content_browser_client.h" | 7 #include "content/public/browser/content_browser_client.h" |
8 | 8 |
9 namespace content { | 9 namespace content { |
10 | 10 |
11 namespace { | 11 namespace { |
12 | 12 |
13 PermissionType PermissionNameToPermissionType(PermissionName name) { | 13 PermissionType PermissionNameToPermissionType(PermissionName name) { |
14 switch(name) { | 14 switch(name) { |
15 case PERMISSION_NAME_GEOLOCATION: | 15 case PERMISSION_NAME_GEOLOCATION: |
16 return PERMISSION_GEOLOCATION; | 16 return PERMISSION_GEOLOCATION; |
17 case PERMISSION_NAME_MIDI_SYSEX: | 17 case PERMISSION_NAME_MIDI_SYSEX: |
18 return PERMISSION_MIDI_SYSEX; | 18 return PERMISSION_MIDI_SYSEX; |
| 19 case PERMISSION_NAME_NOTIFICATIONS: |
| 20 return PERMISSION_NOTIFICATIONS; |
19 } | 21 } |
20 | 22 |
21 NOTREACHED(); | 23 NOTREACHED(); |
22 return PERMISSION_NUM; | 24 return PERMISSION_NUM; |
23 } | 25 } |
24 | 26 |
25 } // anonymous namespace | 27 } // anonymous namespace |
26 | 28 |
27 PermissionServiceImpl::PendingRequest::PendingRequest(PermissionType permission, | 29 PermissionServiceImpl::PendingRequest::PendingRequest(PermissionType permission, |
28 const GURL& origin) | 30 const GURL& origin) |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 } | 106 } |
105 | 107 |
106 void PermissionServiceImpl::HasPermission( | 108 void PermissionServiceImpl::HasPermission( |
107 PermissionName permission, | 109 PermissionName permission, |
108 const mojo::String& origin, | 110 const mojo::String& origin, |
109 const mojo::Callback<void(PermissionStatus)>& callback) { | 111 const mojo::Callback<void(PermissionStatus)>& callback) { |
110 NOTIMPLEMENTED(); | 112 NOTIMPLEMENTED(); |
111 } | 113 } |
112 | 114 |
113 } // namespace content | 115 } // namespace content |
OLD | NEW |