| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "chrome/browser/permissions/permission_prompt_android.h" | 5 #include "chrome/browser/permissions/permission_prompt_android.h" |
| 6 | 6 |
| 7 #include "base/memory/ptr_util.h" | 7 #include "base/memory/ptr_util.h" |
| 8 #include "chrome/browser/infobars/infobar_service.h" | 8 #include "chrome/browser/infobars/infobar_service.h" |
| 9 #include "chrome/browser/media/webrtc/media_stream_devices_controller.h" | 9 #include "chrome/browser/media/webrtc/media_stream_devices_controller.h" |
| 10 #include "chrome/browser/permissions/grouped_permission_infobar_delegate_android
.h" | 10 #include "chrome/browser/permissions/grouped_permission_infobar_delegate_android
.h" |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 NOTREACHED() << "GetNativeWindow is not implemented"; | 66 NOTREACHED() << "GetNativeWindow is not implemented"; |
| 67 return nullptr; | 67 return nullptr; |
| 68 } | 68 } |
| 69 | 69 |
| 70 void PermissionPromptAndroid::Closing() { | 70 void PermissionPromptAndroid::Closing() { |
| 71 infobar_ = nullptr; | 71 infobar_ = nullptr; |
| 72 if (delegate_) | 72 if (delegate_) |
| 73 delegate_->Closing(); | 73 delegate_->Closing(); |
| 74 } | 74 } |
| 75 | 75 |
| 76 void PermissionPromptAndroid::ToggleAccept(int index, bool value) { |
| 77 if (delegate_) |
| 78 delegate_->ToggleAccept(index, value); |
| 79 } |
| 80 |
| 76 void PermissionPromptAndroid::Accept() { | 81 void PermissionPromptAndroid::Accept() { |
| 77 if (delegate_) | 82 if (delegate_) |
| 78 delegate_->Accept(); | 83 delegate_->Accept(); |
| 79 } | 84 } |
| 80 | 85 |
| 81 void PermissionPromptAndroid::Deny() { | 86 void PermissionPromptAndroid::Deny() { |
| 82 if (delegate_) | 87 if (delegate_) |
| 83 delegate_->Deny(); | 88 delegate_->Deny(); |
| 84 } | 89 } |
| 85 | 90 |
| 86 // static | 91 // static |
| 87 std::unique_ptr<PermissionPrompt> PermissionPrompt::Create( | 92 std::unique_ptr<PermissionPrompt> PermissionPrompt::Create( |
| 88 content::WebContents* web_contents) { | 93 content::WebContents* web_contents) { |
| 89 return base::MakeUnique<PermissionPromptAndroid>(web_contents); | 94 return base::MakeUnique<PermissionPromptAndroid>(web_contents); |
| 90 } | 95 } |
| OLD | NEW |