| 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 #include "chrome/browser/ui/views/location_bar/location_bar_view.h" | 5 #include "chrome/browser/ui/views/location_bar/location_bar_view.h" |
| 6 | 6 |
| 7 #if defined(OS_LINUX) | 7 #if defined(OS_LINUX) |
| 8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
| 9 #endif | 9 #endif |
| 10 | 10 |
| (...skipping 810 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 821 !location_entry_->model()->popup_model()->IsOpen()) | 821 !location_entry_->model()->popup_model()->IsOpen()) |
| 822 delegate_->GetInstant()->DestroyPreviewContents(); | 822 delegate_->GetInstant()->DestroyPreviewContents(); |
| 823 | 823 |
| 824 update_instant_ = true; | 824 update_instant_ = true; |
| 825 } | 825 } |
| 826 | 826 |
| 827 void LocationBarView::OnChanged() { | 827 void LocationBarView::OnChanged() { |
| 828 location_icon_view_->SetImage( | 828 location_icon_view_->SetImage( |
| 829 ResourceBundle::GetSharedInstance().GetBitmapNamed( | 829 ResourceBundle::GetSharedInstance().GetBitmapNamed( |
| 830 location_entry_->GetIcon())); | 830 location_entry_->GetIcon())); |
| 831 location_icon_view_->ShowTooltip(!location_entry()->IsEditingOrEmpty()); |
| 832 |
| 831 Layout(); | 833 Layout(); |
| 832 SchedulePaint(); | 834 SchedulePaint(); |
| 833 | 835 |
| 834 // TODO(sky): code for updating instant is nearly identical on all platforms. | 836 // TODO(sky): code for updating instant is nearly identical on all platforms. |
| 835 // It sould be pushed to a common place. | 837 // It sould be pushed to a common place. |
| 836 InstantController* instant = delegate_->GetInstant(); | 838 InstantController* instant = delegate_->GetInstant(); |
| 837 string16 suggested_text; | 839 string16 suggested_text; |
| 838 if (update_instant_ && instant && GetTabContentsWrapper()) { | 840 if (update_instant_ && instant && GetTabContentsWrapper()) { |
| 839 if (location_entry_->model()->user_input_in_progress() && | 841 if (location_entry_->model()->user_input_in_progress() && |
| 840 location_entry_->model()->popup_model()->IsOpen()) { | 842 location_entry_->model()->popup_model()->IsOpen()) { |
| (...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1216 template_url_model_ = NULL; | 1218 template_url_model_ = NULL; |
| 1217 ShowFirstRunBubble(bubble_type_); | 1219 ShowFirstRunBubble(bubble_type_); |
| 1218 } | 1220 } |
| 1219 | 1221 |
| 1220 #if defined(OS_WIN) | 1222 #if defined(OS_WIN) |
| 1221 bool LocationBarView::HasValidSuggestText() { | 1223 bool LocationBarView::HasValidSuggestText() { |
| 1222 return suggested_text_view_ && !suggested_text_view_->size().IsEmpty() && | 1224 return suggested_text_view_ && !suggested_text_view_->size().IsEmpty() && |
| 1223 !suggested_text_view_->GetText().empty(); | 1225 !suggested_text_view_->GetText().empty(); |
| 1224 } | 1226 } |
| 1225 #endif | 1227 #endif |
| OLD | NEW |