| 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 #import "chrome/browser/ui/cocoa/location_bar/autocomplete_text_field.h" | 10 #import "chrome/browser/ui/cocoa/location_bar/autocomplete_text_field.h" |
| 11 #import "chrome/browser/ui/cocoa/location_bar/button_decoration.h" | 11 #import "chrome/browser/ui/cocoa/location_bar/button_decoration.h" |
| 12 #import "chrome/browser/ui/cocoa/location_bar/location_bar_decoration.h" | 12 #import "chrome/browser/ui/cocoa/location_bar/location_bar_decoration.h" |
| 13 #import "chrome/browser/ui/cocoa/nsview_additions.h" | 13 #import "chrome/browser/ui/cocoa/nsview_additions.h" |
| 14 #import "chrome/browser/ui/cocoa/tracking_area.h" | |
| 15 #import "chrome/common/extensions/feature_switch.h" | 14 #import "chrome/common/extensions/feature_switch.h" |
| 16 #import "third_party/mozilla/NSPasteboard+Utils.h" | 15 #import "third_party/mozilla/NSPasteboard+Utils.h" |
| 16 #import "ui/base/cocoa/tracking_area.h" |
| 17 | 17 |
| 18 using extensions::FeatureSwitch; | 18 using extensions::FeatureSwitch; |
| 19 | 19 |
| 20 namespace { | 20 namespace { |
| 21 | 21 |
| 22 const CGFloat kBaselineAdjust = 3.0; | 22 const CGFloat kBaselineAdjust = 3.0; |
| 23 | 23 |
| 24 // Matches the clipping radius of |GradientButtonCell|. | 24 // Matches the clipping radius of |GradientButtonCell|. |
| 25 const CGFloat kCornerRadius = 3.0; | 25 const CGFloat kCornerRadius = 3.0; |
| 26 | 26 |
| (...skipping 753 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 780 | 780 |
| 781 - (BOOL)showsFirstResponder { | 781 - (BOOL)showsFirstResponder { |
| 782 return [super showsFirstResponder] && !hideFocusState_; | 782 return [super showsFirstResponder] && !hideFocusState_; |
| 783 } | 783 } |
| 784 | 784 |
| 785 - (CGFloat)textWidth { | 785 - (CGFloat)textWidth { |
| 786 return [[self attributedStringValue] size].width; | 786 return [[self attributedStringValue] size].width; |
| 787 } | 787 } |
| 788 | 788 |
| 789 @end | 789 @end |
| OLD | NEW |