OLD | NEW |
---|---|
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 "content/child/permissions/permission_dispatcher.h" | 5 #include "content/child/permissions/permission_dispatcher.h" |
6 | 6 |
7 #include "base/callback.h" | 7 #include "base/callback.h" |
8 #include "content/child/worker_task_runner.h" | 8 #include "content/child/worker_task_runner.h" |
9 #include "content/public/common/service_registry.h" | 9 #include "content/public/common/service_registry.h" |
10 #include "third_party/WebKit/public/platform/WebURL.h" | 10 #include "third_party/WebKit/public/platform/WebURL.h" |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
49 } | 49 } |
50 | 50 |
51 blink::WebPermissionStatus GetWebPermissionStatus(PermissionStatus status) { | 51 blink::WebPermissionStatus GetWebPermissionStatus(PermissionStatus status) { |
52 switch (status) { | 52 switch (status) { |
53 case PERMISSION_STATUS_GRANTED: | 53 case PERMISSION_STATUS_GRANTED: |
54 return blink::WebPermissionStatusGranted; | 54 return blink::WebPermissionStatusGranted; |
55 case PERMISSION_STATUS_DENIED: | 55 case PERMISSION_STATUS_DENIED: |
56 return blink::WebPermissionStatusDenied; | 56 return blink::WebPermissionStatusDenied; |
57 case PERMISSION_STATUS_ASK: | 57 case PERMISSION_STATUS_ASK: |
58 return blink::WebPermissionStatusPrompt; | 58 return blink::WebPermissionStatusPrompt; |
59 case PERMISSION_STATUS_NUM: | |
60 break; | |
jww
2015/07/07 18:41:46
Again, shouldn't this be a NOTREACHED (and of cour
keenanb
2015/07/07 21:02:59
Done.
| |
59 } | 61 } |
60 | 62 |
61 NOTREACHED(); | 63 NOTREACHED(); |
62 return blink::WebPermissionStatusDenied; | 64 return blink::WebPermissionStatusDenied; |
63 } | 65 } |
64 | 66 |
65 const int kNoWorkerThread = 0; | 67 const int kNoWorkerThread = 0; |
66 | 68 |
67 } // anonymous namespace | 69 } // anonymous namespace |
68 | 70 |
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
277 origin, | 279 origin, |
278 current_status, | 280 current_status, |
279 base::Bind(&PermissionDispatcher::OnPermissionChanged, | 281 base::Bind(&PermissionDispatcher::OnPermissionChanged, |
280 base::Unretained(this), | 282 base::Unretained(this), |
281 type, | 283 type, |
282 origin, | 284 origin, |
283 base::Unretained(observer))); | 285 base::Unretained(observer))); |
284 } | 286 } |
285 | 287 |
286 } // namespace content | 288 } // namespace content |
OLD | NEW |