| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/location_bar/autocomplete_text_field_cell.h" | 5 #import "chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_cell.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/mac/foundation_util.h" | 8 #include "base/mac/foundation_util.h" |
| 9 #include "base/mac/mac_logging.h" | 9 #include "base/mac/mac_logging.h" |
| 10 #include "chrome/browser/search/search.h" | 10 #include "chrome/browser/search/search.h" |
| (...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 540 [view convertPoint:mouseLocationWindow fromView:nil]; | 540 [view convertPoint:mouseLocationWindow fromView:nil]; |
| 541 const BOOL mouseInRect = NSMouseInRect( | 541 const BOOL mouseInRect = NSMouseInRect( |
| 542 mouseLocation, decorationFrames[i], [view isFlipped]); | 542 mouseLocation, decorationFrames[i], [view isFlipped]); |
| 543 button->SetButtonState(mouseInRect ? | 543 button->SetButtonState(mouseInRect ? |
| 544 ButtonDecoration::kButtonStateHover : | 544 ButtonDecoration::kButtonStateHover : |
| 545 ButtonDecoration::kButtonStateNormal); | 545 ButtonDecoration::kButtonStateNormal); |
| 546 [view setNeedsDisplay:YES]; | 546 [view setNeedsDisplay:YES]; |
| 547 } | 547 } |
| 548 | 548 |
| 549 NSDictionary* info = [self getDictionaryForButtonDecoration:button]; | 549 NSDictionary* info = [self getDictionaryForButtonDecoration:button]; |
| 550 scoped_nsobject<CrTrackingArea> area( | 550 base::scoped_nsobject<CrTrackingArea> area( |
| 551 [[CrTrackingArea alloc] initWithRect:decorationFrames[i] | 551 [[CrTrackingArea alloc] initWithRect:decorationFrames[i] |
| 552 options:NSTrackingMouseEnteredAndExited | | 552 options:NSTrackingMouseEnteredAndExited | |
| 553 NSTrackingActiveAlways | 553 NSTrackingActiveAlways |
| 554 owner:view | 554 owner:view |
| 555 userInfo:info]); | 555 userInfo:info]); |
| 556 [view addTrackingArea:area]; | 556 [view addTrackingArea:area]; |
| 557 } | 557 } |
| 558 } | 558 } |
| 559 } | 559 } |
| 560 | 560 |
| (...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 756 NSTextView* fieldEditor = | 756 NSTextView* fieldEditor = |
| 757 base::mac::ObjCCastStrict<NSTextView>([controlView currentEditor]); | 757 base::mac::ObjCCastStrict<NSTextView>([controlView currentEditor]); |
| 758 [fieldEditor updateInsertionPointStateAndRestartTimer:YES]; | 758 [fieldEditor updateInsertionPointStateAndRestartTimer:YES]; |
| 759 } | 759 } |
| 760 | 760 |
| 761 - (BOOL)showsFirstResponder { | 761 - (BOOL)showsFirstResponder { |
| 762 return [super showsFirstResponder] && !hideFocusState_; | 762 return [super showsFirstResponder] && !hideFocusState_; |
| 763 } | 763 } |
| 764 | 764 |
| 765 @end | 765 @end |
| OLD | NEW |