| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/cocoa/location_bar/location_bar_view_mac.h" | 5 #import "chrome/browser/cocoa/location_bar/location_bar_view_mac.h" |
| 6 | 6 |
| 7 #include "app/l10n_util_mac.h" | 7 #include "app/l10n_util_mac.h" |
| 8 #include "app/resource_bundle.h" | 8 #include "app/resource_bundle.h" |
| 9 #include "base/i18n/rtl.h" | 9 #include "base/i18n/rtl.h" |
| 10 #include "base/nsimage_cache_mac.h" | 10 #include "base/nsimage_cache_mac.h" |
| (...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 307 break; | 307 break; |
| 308 } | 308 } |
| 309 DCHECK_LT(index, page_action_views_.Count()); | 309 DCHECK_LT(index, page_action_views_.Count()); |
| 310 if (index == page_action_views_.Count()) | 310 if (index == page_action_views_.Count()) |
| 311 return NSZeroPoint; | 311 return NSZeroPoint; |
| 312 | 312 |
| 313 AutocompleteTextFieldCell* cell = [field_ autocompleteTextFieldCell]; | 313 AutocompleteTextFieldCell* cell = [field_ autocompleteTextFieldCell]; |
| 314 NSRect frame = [cell pageActionFrameForIndex:index inFrame:[field_ bounds]]; | 314 NSRect frame = [cell pageActionFrameForIndex:index inFrame:[field_ bounds]]; |
| 315 if (!NSIsEmptyRect(frame)) { | 315 if (!NSIsEmptyRect(frame)) { |
| 316 frame = [field_ convertRect:frame toView:nil]; | 316 frame = [field_ convertRect:frame toView:nil]; |
| 317 return NSMakePoint(NSMidX(frame), NSMinY(frame)); | 317 return NSMakePoint(NSMidX(frame), NSMaxY(frame)); |
| 318 } | 318 } |
| 319 | 319 |
| 320 NOTREACHED(); | 320 NOTREACHED(); |
| 321 return NSZeroPoint; | 321 return NSZeroPoint; |
| 322 } | 322 } |
| 323 | 323 |
| 324 ExtensionAction* LocationBarViewMac::GetPageAction(size_t index) { | 324 ExtensionAction* LocationBarViewMac::GetPageAction(size_t index) { |
| 325 if (index < page_action_views_.Count()) | 325 if (index < page_action_views_.Count()) |
| 326 return page_action_views_.ViewAt(index)->page_action(); | 326 return page_action_views_.ViewAt(index)->page_action(); |
| 327 NOTREACHED(); | 327 NOTREACHED(); |
| (...skipping 600 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 928 | 928 |
| 929 // These need to change anytime the layout changes. | 929 // These need to change anytime the layout changes. |
| 930 // TODO(shess): Anytime the field editor might have changed, the | 930 // TODO(shess): Anytime the field editor might have changed, the |
| 931 // cursor rects almost certainly should have changed. The tooltips | 931 // cursor rects almost certainly should have changed. The tooltips |
| 932 // might change even when the rects don't change. | 932 // might change even when the rects don't change. |
| 933 [field_ resetFieldEditorFrameIfNeeded]; | 933 [field_ resetFieldEditorFrameIfNeeded]; |
| 934 [field_ updateCursorAndToolTipRects]; | 934 [field_ updateCursorAndToolTipRects]; |
| 935 | 935 |
| 936 [field_ setNeedsDisplay:YES]; | 936 [field_ setNeedsDisplay:YES]; |
| 937 } | 937 } |
| OLD | NEW |