| 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 "chrome/browser/ui/views/permission_bubble/permission_prompt_impl.h" | 5 #include "chrome/browser/ui/views/permission_bubble/permission_prompt_impl.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
| (...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 320 return nullptr; | 320 return nullptr; |
| 321 } | 321 } |
| 322 | 322 |
| 323 void PermissionPromptImpl::Closing() { | 323 void PermissionPromptImpl::Closing() { |
| 324 if (bubble_delegate_) | 324 if (bubble_delegate_) |
| 325 bubble_delegate_ = nullptr; | 325 bubble_delegate_ = nullptr; |
| 326 if (delegate_) | 326 if (delegate_) |
| 327 delegate_->Closing(); | 327 delegate_->Closing(); |
| 328 } | 328 } |
| 329 | 329 |
| 330 void PermissionPromptImpl::ToggleAccept(int index, bool value) { | |
| 331 if (delegate_) | |
| 332 delegate_->ToggleAccept(index, value); | |
| 333 } | |
| 334 | |
| 335 void PermissionPromptImpl::TogglePersist(bool value) { | 330 void PermissionPromptImpl::TogglePersist(bool value) { |
| 336 if (delegate_) | 331 if (delegate_) |
| 337 delegate_->TogglePersist(value); | 332 delegate_->TogglePersist(value); |
| 338 } | 333 } |
| 339 | 334 |
| 340 void PermissionPromptImpl::Accept() { | 335 void PermissionPromptImpl::Accept() { |
| 341 if (delegate_) | 336 if (delegate_) |
| 342 delegate_->Accept(); | 337 delegate_->Accept(); |
| 343 } | 338 } |
| 344 | 339 |
| 345 void PermissionPromptImpl::Deny() { | 340 void PermissionPromptImpl::Deny() { |
| 346 if (delegate_) | 341 if (delegate_) |
| 347 delegate_->Deny(); | 342 delegate_->Deny(); |
| 348 } | 343 } |
| OLD | NEW |