| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #import "chrome/browser/ui/cocoa/autofill/autofill_tooltip_controller.h" | 5 #import "chrome/browser/ui/cocoa/autofill/autofill_tooltip_controller.h" |
| 6 | 6 |
| 7 #include "base/mac/foundation_util.h" | 7 #include "base/mac/foundation_util.h" |
| 8 #import "chrome/browser/ui/cocoa/autofill/autofill_bubble_controller.h" | 8 #import "chrome/browser/ui/cocoa/autofill/autofill_bubble_controller.h" |
| 9 #import "ui/base/cocoa/base_view.h" | 9 #import "ui/base/cocoa/base_view.h" |
| 10 #import "ui/base/cocoa/hover_image_button.h" | 10 #import "ui/base/cocoa/hover_image_button.h" |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 } | 95 } |
| 96 | 96 |
| 97 @end | 97 @end |
| 98 | 98 |
| 99 #pragma mark AutofillTooltipController | 99 #pragma mark AutofillTooltipController |
| 100 | 100 |
| 101 @implementation AutofillTooltipController | 101 @implementation AutofillTooltipController |
| 102 | 102 |
| 103 @synthesize message = message_; | 103 @synthesize message = message_; |
| 104 | 104 |
| 105 - (id)initWithArrowLocation:(info_bubble::BubbleArrowLocation)arrowLocation { | 105 - (id)initWithArrowLocation:(views::BubbleBorder::Arrow)arrowLocation { |
| 106 if ((self = [super init])) { | 106 if ((self = [super init])) { |
| 107 arrowLocation_ = arrowLocation; | 107 arrowLocation_ = arrowLocation; |
| 108 view_.reset([[AutofillTooltip alloc] init]); | 108 view_.reset([[AutofillTooltip alloc] init]); |
| 109 [self setView:view_]; | 109 [self setView:view_]; |
| 110 [view_ setTooltipController:self]; | 110 [view_ setTooltipController:self]; |
| 111 } | 111 } |
| 112 return self; | 112 return self; |
| 113 } | 113 } |
| 114 | 114 |
| 115 - (void)dealloc { | 115 - (void)dealloc { |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 // timer to change visibility. (Uses '!!' to force bool values) | 192 // timer to change visibility. (Uses '!!' to force bool values) |
| 193 if (!!bubbleController_ ^ !!shouldDisplayTooltip_) { | 193 if (!!bubbleController_ ^ !!shouldDisplayTooltip_) { |
| 194 SEL sel = shouldDisplayTooltip_ ? @selector(displayHover) | 194 SEL sel = shouldDisplayTooltip_ ? @selector(displayHover) |
| 195 : @selector(hideHover); | 195 : @selector(hideHover); |
| 196 [self performSelector:sel withObject:nil afterDelay:kTooltipDelay]; | 196 [self performSelector:sel withObject:nil afterDelay:kTooltipDelay]; |
| 197 } | 197 } |
| 198 } | 198 } |
| 199 } | 199 } |
| 200 | 200 |
| 201 @end | 201 @end |
| OLD | NEW |