Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(576)

Side by Side Diff: chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm

Issue 6685002: Wires up ability for page to specify instant auto complete (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix unit test and stray char Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698