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

Side by Side Diff: chrome/browser/ui/views/location_bar/location_bar_view.cc

Issue 6192007: Remove wstring from views. Part 3: Switch accessibility strings to string16.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 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 #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 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 #else 166 #else
167 location_entry_.reset( 167 location_entry_.reset(
168 AutocompleteEditViewGtk::Create( 168 AutocompleteEditViewGtk::Create(
169 this, model_, profile_, 169 this, model_, profile_,
170 command_updater_, mode_ == POPUP, this)); 170 command_updater_, mode_ == POPUP, this));
171 #endif 171 #endif
172 172
173 location_entry_view_ = location_entry_->AddToView(this); 173 location_entry_view_ = location_entry_->AddToView(this);
174 location_entry_view_->SetID(VIEW_ID_AUTOCOMPLETE); 174 location_entry_view_->SetID(VIEW_ID_AUTOCOMPLETE);
175 location_entry_view_->SetAccessibleName( 175 location_entry_view_->SetAccessibleName(
176 UTF16ToWide(l10n_util::GetStringUTF16(IDS_ACCNAME_LOCATION))); 176 l10n_util::GetStringUTF16(IDS_ACCNAME_LOCATION));
177 177
178 selected_keyword_view_ = new SelectedKeywordView( 178 selected_keyword_view_ = new SelectedKeywordView(
179 kSelectedKeywordBackgroundImages, IDR_KEYWORD_SEARCH_MAGNIFIER, 179 kSelectedKeywordBackgroundImages, IDR_KEYWORD_SEARCH_MAGNIFIER,
180 GetColor(ToolbarModel::NONE, TEXT), profile_), 180 GetColor(ToolbarModel::NONE, TEXT), profile_),
181 AddChildView(selected_keyword_view_); 181 AddChildView(selected_keyword_view_);
182 selected_keyword_view_->SetFont(font_); 182 selected_keyword_view_->SetFont(font_);
183 selected_keyword_view_->SetVisible(false); 183 selected_keyword_view_->SetVisible(false);
184 184
185 SkColor dimmed_text = GetColor(ToolbarModel::NONE, DEEMPHASIZED_TEXT); 185 SkColor dimmed_text = GetColor(ToolbarModel::NONE, DEEMPHASIZED_TEXT);
186 186
(...skipping 15 matching lines...) Expand all
202 if (browser_defaults::bookmarks_enabled && (mode_ == NORMAL)) { 202 if (browser_defaults::bookmarks_enabled && (mode_ == NORMAL)) {
203 star_view_ = new StarView(command_updater_); 203 star_view_ = new StarView(command_updater_);
204 AddChildView(star_view_); 204 AddChildView(star_view_);
205 star_view_->SetVisible(true); 205 star_view_->SetVisible(true);
206 } 206 }
207 207
208 // Notify us when any ancestor is resized. In this case we want to tell the 208 // Notify us when any ancestor is resized. In this case we want to tell the
209 // AutocompleteEditView to close its popup. 209 // AutocompleteEditView to close its popup.
210 SetNotifyWhenVisibleBoundsInRootChanges(true); 210 SetNotifyWhenVisibleBoundsInRootChanges(true);
211 211
212 SetAccessibleName( 212 SetAccessibleName(l10n_util::GetStringUTF16(IDS_ACCNAME_LOCATION));
213 UTF16ToWide(l10n_util::GetStringUTF16(IDS_ACCNAME_LOCATION)));
214 213
215 // Initialize the location entry. We do this to avoid a black flash which is 214 // Initialize the location entry. We do this to avoid a black flash which is
216 // visible when the location entry has just been initialized. 215 // visible when the location entry has just been initialized.
217 Update(NULL); 216 Update(NULL);
218 217
219 OnChanged(); 218 OnChanged();
220 } 219 }
221 220
222 bool LocationBarView::IsInitialized() const { 221 bool LocationBarView::IsInitialized() const {
223 return location_entry_view_ != NULL; 222 return location_entry_view_ != NULL;
(...skipping 1036 matching lines...) Expand 10 before | Expand all | Expand 10 after
1260 template_url_model_ = NULL; 1259 template_url_model_ = NULL;
1261 ShowFirstRunBubble(bubble_type_); 1260 ShowFirstRunBubble(bubble_type_);
1262 } 1261 }
1263 1262
1264 #if defined(OS_WIN) 1263 #if defined(OS_WIN)
1265 bool LocationBarView::HasValidSuggestText() { 1264 bool LocationBarView::HasValidSuggestText() {
1266 return suggested_text_view_ && !suggested_text_view_->size().IsEmpty() && 1265 return suggested_text_view_ && !suggested_text_view_->size().IsEmpty() &&
1267 !suggested_text_view_->GetText().empty(); 1266 !suggested_text_view_->GetText().empty();
1268 } 1267 }
1269 #endif 1268 #endif
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/infobars/infobars.cc ('k') | chrome/browser/ui/views/location_bar/star_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698