| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |