| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/location_bar_view_mac.h" | 5 #import "chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h" |
| 6 | 6 |
| 7 #include "base/stl_util-inl.h" | 7 #include "base/stl_util-inl.h" |
| 8 #include "base/string_util.h" | 8 #include "base/string_util.h" |
| 9 #include "base/sys_string_conversions.h" | 9 #include "base/sys_string_conversions.h" |
| 10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 const NSPoint kOffset = NSMakePoint( | 130 const NSPoint kOffset = NSMakePoint( |
| 131 info_bubble::kBubbleArrowXOffset + info_bubble::kBubbleArrowWidth/2.0, | 131 info_bubble::kBubbleArrowXOffset + info_bubble::kBubbleArrowWidth/2.0, |
| 132 kFirstRunBubbleYOffset); | 132 kFirstRunBubbleYOffset); |
| 133 [FirstRunBubbleController showForView:field_ offset:kOffset profile:profile_]; | 133 [FirstRunBubbleController showForView:field_ offset:kOffset profile:profile_]; |
| 134 } | 134 } |
| 135 | 135 |
| 136 std::wstring LocationBarViewMac::GetInputString() const { | 136 std::wstring LocationBarViewMac::GetInputString() const { |
| 137 return location_input_; | 137 return location_input_; |
| 138 } | 138 } |
| 139 | 139 |
| 140 void LocationBarViewMac::SetSuggestedText(const string16& text) { | 140 void LocationBarViewMac::SetSuggestedText(const string16& text, |
| 141 edit_view_->model()->SetSuggestedText(text); | 141 InstantCompleteBehavior behavior) { |
| 142 edit_view_->model()->SetSuggestedText(text, behavior); |
| 142 } | 143 } |
| 143 | 144 |
| 144 WindowOpenDisposition LocationBarViewMac::GetWindowOpenDisposition() const { | 145 WindowOpenDisposition LocationBarViewMac::GetWindowOpenDisposition() const { |
| 145 return disposition_; | 146 return disposition_; |
| 146 } | 147 } |
| 147 | 148 |
| 148 PageTransition::Type LocationBarViewMac::GetPageTransition() const { | 149 PageTransition::Type LocationBarViewMac::GetPageTransition() const { |
| 149 return transition_; | 150 return transition_; |
| 150 } | 151 } |
| 151 | 152 |
| (...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 622 | 623 |
| 623 // These need to change anytime the layout changes. | 624 // These need to change anytime the layout changes. |
| 624 // TODO(shess): Anytime the field editor might have changed, the | 625 // TODO(shess): Anytime the field editor might have changed, the |
| 625 // cursor rects almost certainly should have changed. The tooltips | 626 // cursor rects almost certainly should have changed. The tooltips |
| 626 // might change even when the rects don't change. | 627 // might change even when the rects don't change. |
| 627 [field_ resetFieldEditorFrameIfNeeded]; | 628 [field_ resetFieldEditorFrameIfNeeded]; |
| 628 [field_ updateCursorAndToolTipRects]; | 629 [field_ updateCursorAndToolTipRects]; |
| 629 | 630 |
| 630 [field_ setNeedsDisplay:YES]; | 631 [field_ setNeedsDisplay:YES]; |
| 631 } | 632 } |
| OLD | NEW |