| 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/renderer/notification_permission_dispatcher.h" | 5 #include "content/renderer/notification_permission_dispatcher.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "content/public/common/service_registry.h" | 8 #include "content/public/common/service_registry.h" |
| 9 #include "content/public/renderer/render_frame.h" | 9 #include "content/public/renderer/render_frame.h" |
| 10 #include "third_party/WebKit/public/platform/WebString.h" | 10 #include "third_party/WebKit/public/platform/WebString.h" |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 switch (status) { | 51 switch (status) { |
| 52 case PERMISSION_STATUS_GRANTED: | 52 case PERMISSION_STATUS_GRANTED: |
| 53 permission = blink::WebNotificationPermissionAllowed; | 53 permission = blink::WebNotificationPermissionAllowed; |
| 54 break; | 54 break; |
| 55 case PERMISSION_STATUS_DENIED: | 55 case PERMISSION_STATUS_DENIED: |
| 56 permission = blink::WebNotificationPermissionDenied; | 56 permission = blink::WebNotificationPermissionDenied; |
| 57 break; | 57 break; |
| 58 case PERMISSION_STATUS_ASK: | 58 case PERMISSION_STATUS_ASK: |
| 59 permission = blink::WebNotificationPermissionDefault; | 59 permission = blink::WebNotificationPermissionDefault; |
| 60 break; | 60 break; |
| 61 case PERMISSION_STATUS_NUM: |
| 62 return; |
| 61 } | 63 } |
| 62 | 64 |
| 63 callback->permissionRequestComplete(permission); | 65 callback->permissionRequestComplete(permission); |
| 64 pending_requests_.Remove(request_id); | 66 pending_requests_.Remove(request_id); |
| 65 } | 67 } |
| 66 | 68 |
| 67 } // namespace content | 69 } // namespace content |
| OLD | NEW |