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 420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
431 | 431 |
432 bubble_delegate_->UpdateAnchor(GetAnchorView(), | 432 bubble_delegate_->UpdateAnchor(GetAnchorView(), |
433 GetAnchorPoint(), | 433 GetAnchorPoint(), |
434 GetAnchorArrow()); | 434 GetAnchorArrow()); |
435 } | 435 } |
436 | 436 |
437 bool PermissionPromptImpl::CanAcceptRequestUpdate() { | 437 bool PermissionPromptImpl::CanAcceptRequestUpdate() { |
438 return !(bubble_delegate_ && bubble_delegate_->IsMouseHovered()); | 438 return !(bubble_delegate_ && bubble_delegate_->IsMouseHovered()); |
439 } | 439 } |
440 | 440 |
| 441 bool PermissionPromptImpl::HidesAutomatically() { |
| 442 return false; |
| 443 } |
| 444 |
441 void PermissionPromptImpl::Hide() { | 445 void PermissionPromptImpl::Hide() { |
442 if (bubble_delegate_) { | 446 if (bubble_delegate_) { |
443 bubble_delegate_->CloseBubble(); | 447 bubble_delegate_->CloseBubble(); |
444 bubble_delegate_ = nullptr; | 448 bubble_delegate_ = nullptr; |
445 } | 449 } |
446 } | 450 } |
447 | 451 |
448 bool PermissionPromptImpl::IsVisible() { | 452 bool PermissionPromptImpl::IsVisible() { |
449 return bubble_delegate_ != nullptr; | 453 return bubble_delegate_ != nullptr; |
450 } | 454 } |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
491 } | 495 } |
492 | 496 |
493 void PermissionPromptImpl::Deny() { | 497 void PermissionPromptImpl::Deny() { |
494 if (delegate_) | 498 if (delegate_) |
495 delegate_->Deny(); | 499 delegate_->Deny(); |
496 } | 500 } |
497 | 501 |
498 Profile* PermissionPromptImpl::GetProfile() { | 502 Profile* PermissionPromptImpl::GetProfile() { |
499 return browser_->profile(); | 503 return browser_->profile(); |
500 } | 504 } |
OLD | NEW |