| 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/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 "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/stl_util-inl.h" | 9 #include "base/stl_util-inl.h" |
| 10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
| (...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 294 // that it shouldn't to stick in a NOTREACHED(). In any case, this is | 294 // that it shouldn't to stick in a NOTREACHED(). In any case, this is |
| 295 // harmless. | 295 // harmless. |
| 296 delete fetcher; | 296 delete fetcher; |
| 297 } else { | 297 } else { |
| 298 // The navigation controller will delete the fetcher. | 298 // The navigation controller will delete the fetcher. |
| 299 } | 299 } |
| 300 } | 300 } |
| 301 } | 301 } |
| 302 } | 302 } |
| 303 | 303 |
| 304 if (browser_->instant()) | 304 if (browser_->instant() && !edit_view_->model()->popup_model()->IsOpen()) |
| 305 browser_->instant()->DestroyPreviewContents(); | 305 browser_->instant()->DestroyPreviewContents(); |
| 306 | 306 |
| 307 update_instant_ = true; | 307 update_instant_ = true; |
| 308 } | 308 } |
| 309 | 309 |
| 310 void LocationBarViewMac::OnChanged() { | 310 void LocationBarViewMac::OnChanged() { |
| 311 // Update the location-bar icon. | 311 // Update the location-bar icon. |
| 312 const int resource_id = edit_view_->GetIcon(); | 312 const int resource_id = edit_view_->GetIcon(); |
| 313 NSImage* image = AutocompleteEditViewMac::ImageForResource(resource_id); | 313 NSImage* image = AutocompleteEditViewMac::ImageForResource(resource_id); |
| 314 location_icon_decoration_->SetImage(image); | 314 location_icon_decoration_->SetImage(image); |
| (...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 687 | 687 |
| 688 // These need to change anytime the layout changes. | 688 // These need to change anytime the layout changes. |
| 689 // TODO(shess): Anytime the field editor might have changed, the | 689 // TODO(shess): Anytime the field editor might have changed, the |
| 690 // cursor rects almost certainly should have changed. The tooltips | 690 // cursor rects almost certainly should have changed. The tooltips |
| 691 // might change even when the rects don't change. | 691 // might change even when the rects don't change. |
| 692 [field_ resetFieldEditorFrameIfNeeded]; | 692 [field_ resetFieldEditorFrameIfNeeded]; |
| 693 [field_ updateCursorAndToolTipRects]; | 693 [field_ updateCursorAndToolTipRects]; |
| 694 | 694 |
| 695 [field_ setNeedsDisplay:YES]; | 695 [field_ setNeedsDisplay:YES]; |
| 696 } | 696 } |
| OLD | NEW |