| 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/nsimage_cache_mac.h" | 9 #include "base/nsimage_cache_mac.h" |
| 10 #include "base/stl_util-inl.h" | 10 #include "base/stl_util-inl.h" |
| (...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 307 NSImage* image = AutocompleteEditViewMac::ImageForResource(resource_id); | 307 NSImage* image = AutocompleteEditViewMac::ImageForResource(resource_id); |
| 308 location_icon_decoration_->SetImage(image); | 308 location_icon_decoration_->SetImage(image); |
| 309 ev_bubble_decoration_->SetImage(image); | 309 ev_bubble_decoration_->SetImage(image); |
| 310 Layout(); | 310 Layout(); |
| 311 | 311 |
| 312 InstantController* instant = browser_->instant(); | 312 InstantController* instant = browser_->instant(); |
| 313 string16 suggested_text; | 313 string16 suggested_text; |
| 314 if (update_instant_ && instant && GetTabContents()) { | 314 if (update_instant_ && instant && GetTabContents()) { |
| 315 if (edit_view_->model()->user_input_in_progress() && | 315 if (edit_view_->model()->user_input_in_progress() && |
| 316 edit_view_->model()->popup_model()->IsOpen()) { | 316 edit_view_->model()->popup_model()->IsOpen()) { |
| 317 instant->Update(GetTabContents(), | 317 instant->Update(browser_->GetSelectedTabContentsWrapper(), |
| 318 edit_view_->model()->CurrentMatch(), | 318 edit_view_->model()->CurrentMatch(), |
| 319 WideToUTF16(edit_view_->GetText()), | 319 WideToUTF16(edit_view_->GetText()), |
| 320 &suggested_text); | 320 &suggested_text); |
| 321 } else { | 321 } else { |
| 322 if (instant->is_active()) | 322 if (instant->is_active()) |
| 323 instant->DestroyPreviewContents(); | 323 instant->DestroyPreviewContents(); |
| 324 } | 324 } |
| 325 } | 325 } |
| 326 } | 326 } |
| 327 | 327 |
| (...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 671 | 671 |
| 672 // These need to change anytime the layout changes. | 672 // These need to change anytime the layout changes. |
| 673 // TODO(shess): Anytime the field editor might have changed, the | 673 // TODO(shess): Anytime the field editor might have changed, the |
| 674 // cursor rects almost certainly should have changed. The tooltips | 674 // cursor rects almost certainly should have changed. The tooltips |
| 675 // might change even when the rects don't change. | 675 // might change even when the rects don't change. |
| 676 [field_ resetFieldEditorFrameIfNeeded]; | 676 [field_ resetFieldEditorFrameIfNeeded]; |
| 677 [field_ updateCursorAndToolTipRects]; | 677 [field_ updateCursorAndToolTipRects]; |
| 678 | 678 |
| 679 [field_ setNeedsDisplay:YES]; | 679 [field_ setNeedsDisplay:YES]; |
| 680 } | 680 } |
| OLD | NEW |