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

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

Issue 39022: Convert NavigationEntry title to string16. TabContents::GetTitle no longer ne... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 9 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
« no previous file with comments | « chrome/browser/views/hung_renderer_view.cc ('k') | chrome/browser/views/sad_tab_view.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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_view.h" 5 #include "chrome/browser/views/location_bar_view.h"
6 6
7 #include "base/path_service.h" 7 #include "base/path_service.h"
8 #include "base/string_util.h" 8 #include "base/string_util.h"
9 #include "chrome/app/chrome_dll_resource.h" 9 #include "chrome/app/chrome_dll_resource.h"
10 #include "chrome/browser/alternate_nav_url_fetcher.h" 10 #include "chrome/browser/alternate_nav_url_fetcher.h"
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 315
316 SkBitmap LocationBarView::GetFavIcon() const { 316 SkBitmap LocationBarView::GetFavIcon() const {
317 DCHECK(delegate_); 317 DCHECK(delegate_);
318 DCHECK(delegate_->GetTabContents()); 318 DCHECK(delegate_->GetTabContents());
319 return delegate_->GetTabContents()->GetFavIcon(); 319 return delegate_->GetTabContents()->GetFavIcon();
320 } 320 }
321 321
322 std::wstring LocationBarView::GetTitle() const { 322 std::wstring LocationBarView::GetTitle() const {
323 DCHECK(delegate_); 323 DCHECK(delegate_);
324 DCHECK(delegate_->GetTabContents()); 324 DCHECK(delegate_->GetTabContents());
325 return delegate_->GetTabContents()->GetTitle(); 325 return UTF16ToWideHack(delegate_->GetTabContents()->GetTitle());
326 } 326 }
327 327
328 void LocationBarView::DoLayout(const bool force_layout) { 328 void LocationBarView::DoLayout(const bool force_layout) {
329 if (!location_entry_.get()) 329 if (!location_entry_.get())
330 return; 330 return;
331 331
332 RECT formatting_rect; 332 RECT formatting_rect;
333 location_entry_->GetRect(&formatting_rect); 333 location_entry_->GetRect(&formatting_rect);
334 RECT edit_bounds; 334 RECT edit_bounds;
335 location_entry_->GetClientRect(&edit_bounds); 335 location_entry_->GetClientRect(&edit_bounds);
(...skipping 663 matching lines...) Expand 10 before | Expand all | Expand 10 after
999 } 999 }
1000 1000
1001 void LocationBarView::FocusSearch() { 1001 void LocationBarView::FocusSearch() {
1002 location_entry_->SetUserText(L"?"); 1002 location_entry_->SetUserText(L"?");
1003 location_entry_->SetFocus(); 1003 location_entry_->SetFocus();
1004 } 1004 }
1005 1005
1006 void LocationBarView::SaveStateToContents(TabContents* contents) { 1006 void LocationBarView::SaveStateToContents(TabContents* contents) {
1007 location_entry_->SaveStateToTab(contents); 1007 location_entry_->SaveStateToTab(contents);
1008 } 1008 }
OLDNEW
« no previous file with comments | « chrome/browser/views/hung_renderer_view.cc ('k') | chrome/browser/views/sad_tab_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698