| 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/cocoa/permission_bubble/permission_bubble_cocoa.h" | 5 #include "chrome/browser/ui/cocoa/permission_bubble/permission_bubble_cocoa.h" |
| 6 | 6 |
| 7 #include "base/memory/ptr_util.h" | 7 #include "base/memory/ptr_util.h" |
| 8 #import "chrome/browser/ui/cocoa/base_bubble_controller.h" | 8 #import "chrome/browser/ui/cocoa/base_bubble_controller.h" |
| 9 #import "chrome/browser/ui/cocoa/permission_bubble/permission_bubble_controller.
h" | 9 #import "chrome/browser/ui/cocoa/permission_bubble/permission_bubble_controller.
h" |
| 10 #import "chrome/browser/ui/permission_bubble/permission_prompt.h" | 10 #import "chrome/browser/ui/permission_bubble/permission_prompt.h" |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 void PermissionBubbleCocoa::SetDelegate(Delegate* delegate) { | 44 void PermissionBubbleCocoa::SetDelegate(Delegate* delegate) { |
| 45 if (delegate_ == delegate) | 45 if (delegate_ == delegate) |
| 46 return; | 46 return; |
| 47 delegate_ = delegate; | 47 delegate_ = delegate; |
| 48 } | 48 } |
| 49 | 49 |
| 50 bool PermissionBubbleCocoa::CanAcceptRequestUpdate() { | 50 bool PermissionBubbleCocoa::CanAcceptRequestUpdate() { |
| 51 return ![[[bubbleController_ window] contentView] cr_isMouseInView]; | 51 return ![[[bubbleController_ window] contentView] cr_isMouseInView]; |
| 52 } | 52 } |
| 53 | 53 |
| 54 bool PermissionBubbleCocoa::HidesAutomatically() { |
| 55 return false; |
| 56 } |
| 57 |
| 54 void PermissionBubbleCocoa::UpdateAnchorPosition() { | 58 void PermissionBubbleCocoa::UpdateAnchorPosition() { |
| 55 [bubbleController_ updateAnchorPosition]; | 59 [bubbleController_ updateAnchorPosition]; |
| 56 } | 60 } |
| 57 | 61 |
| 58 gfx::NativeWindow PermissionBubbleCocoa::GetNativeWindow() { | 62 gfx::NativeWindow PermissionBubbleCocoa::GetNativeWindow() { |
| 59 return [bubbleController_ window]; | 63 return [bubbleController_ window]; |
| 60 } | 64 } |
| 61 | 65 |
| 62 void PermissionBubbleCocoa::OnBubbleClosing() { | 66 void PermissionBubbleCocoa::OnBubbleClosing() { |
| 63 bubbleController_ = nil; | 67 bubbleController_ = nil; |
| 64 } | 68 } |
| OLD | NEW |