| 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 #include "chrome/browser/views/location_bar/location_bar_view.h" | 5 #include "chrome/browser/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 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 #else | 147 #else |
| 148 location_entry_.reset(new AutocompleteEditViewGtk(this, model_, profile_, | 148 location_entry_.reset(new AutocompleteEditViewGtk(this, model_, profile_, |
| 149 command_updater_, mode_ == POPUP, this)); | 149 command_updater_, mode_ == POPUP, this)); |
| 150 location_entry_->Init(); | 150 location_entry_->Init(); |
| 151 // Make all the children of the widget visible. NOTE: this won't display | 151 // Make all the children of the widget visible. NOTE: this won't display |
| 152 // anything, it just toggles the visible flag. | 152 // anything, it just toggles the visible flag. |
| 153 gtk_widget_show_all(location_entry_->GetNativeView()); | 153 gtk_widget_show_all(location_entry_->GetNativeView()); |
| 154 // Hide the widget. NativeViewHostGtk will make it visible again as | 154 // Hide the widget. NativeViewHostGtk will make it visible again as |
| 155 // necessary. | 155 // necessary. |
| 156 gtk_widget_hide(location_entry_->GetNativeView()); | 156 gtk_widget_hide(location_entry_->GetNativeView()); |
| 157 |
| 158 // Associate an accessible name with the location entry. |
| 159 accessible_widget_helper_.reset(new AccessibleWidgetHelper( |
| 160 location_entry_->text_view(), profile_)); |
| 161 accessible_widget_helper_->SetWidgetName( |
| 162 location_entry_->text_view(), |
| 163 l10n_util::GetStringUTF8(IDS_ACCNAME_LOCATION)); |
| 157 #endif | 164 #endif |
| 158 location_entry_view_ = new views::NativeViewHost; | 165 location_entry_view_ = new views::NativeViewHost; |
| 159 location_entry_view_->SetID(VIEW_ID_AUTOCOMPLETE); | 166 location_entry_view_->SetID(VIEW_ID_AUTOCOMPLETE); |
| 160 AddChildView(location_entry_view_); | 167 AddChildView(location_entry_view_); |
| 161 location_entry_view_->set_focus_view(this); | 168 location_entry_view_->set_focus_view(this); |
| 162 location_entry_view_->Attach(location_entry_->GetNativeView()); | 169 location_entry_view_->Attach(location_entry_->GetNativeView()); |
| 163 location_entry_view_->SetAccessibleName( | 170 location_entry_view_->SetAccessibleName( |
| 164 l10n_util::GetString(IDS_ACCNAME_LOCATION)); | 171 l10n_util::GetString(IDS_ACCNAME_LOCATION)); |
| 165 | 172 |
| 166 selected_keyword_view_ = | 173 selected_keyword_view_ = |
| (...skipping 863 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1030 page_action_views_[i]->image_view()->ExecuteAction(kLeftMouseButton, | 1037 page_action_views_[i]->image_view()->ExecuteAction(kLeftMouseButton, |
| 1031 false); // inspect_with_devtools | 1038 false); // inspect_with_devtools |
| 1032 return; | 1039 return; |
| 1033 } | 1040 } |
| 1034 ++current; | 1041 ++current; |
| 1035 } | 1042 } |
| 1036 } | 1043 } |
| 1037 | 1044 |
| 1038 NOTREACHED(); | 1045 NOTREACHED(); |
| 1039 } | 1046 } |
| OLD | NEW |