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/navigation_controller.h" | 5 #include "chrome/browser/navigation_controller.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
(...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
535 pending_entry_ = entry; | 535 pending_entry_ = entry; |
536 load_pending_entry_when_active_ = true; | 536 load_pending_entry_when_active_ = true; |
537 } | 537 } |
538 | 538 |
539 bool NavigationController::LoadingURLLazily() { | 539 bool NavigationController::LoadingURLLazily() { |
540 return load_pending_entry_when_active_; | 540 return load_pending_entry_when_active_; |
541 } | 541 } |
542 | 542 |
543 const std::wstring& NavigationController::GetLazyTitle() const { | 543 const std::wstring& NavigationController::GetLazyTitle() const { |
544 if (pending_entry_) | 544 if (pending_entry_) |
545 return pending_entry_->title(); | 545 return pending_entry_->GetTitleForDisplay(); |
546 else | 546 else |
547 return EmptyWString(); | 547 return EmptyWString(); |
548 } | 548 } |
549 | 549 |
550 const SkBitmap& NavigationController::GetLazyFavIcon() const { | 550 const SkBitmap& NavigationController::GetLazyFavIcon() const { |
551 if (pending_entry_) { | 551 if (pending_entry_) { |
552 return pending_entry_->favicon().bitmap(); | 552 return pending_entry_->favicon().bitmap(); |
553 } else { | 553 } else { |
554 ResourceBundle &rb = ResourceBundle::GetSharedInstance(); | 554 ResourceBundle &rb = ResourceBundle::GetSharedInstance(); |
555 return *rb.GetBitmapNamed(IDR_DEFAULT_FAVICON); | 555 return *rb.GetBitmapNamed(IDR_DEFAULT_FAVICON); |
(...skipping 685 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1241 return i; | 1241 return i; |
1242 } | 1242 } |
1243 return -1; | 1243 return -1; |
1244 } | 1244 } |
1245 | 1245 |
1246 NavigationEntry* NavigationController::GetTransientEntry() const { | 1246 NavigationEntry* NavigationController::GetTransientEntry() const { |
1247 if (transient_entry_index_ == -1) | 1247 if (transient_entry_index_ == -1) |
1248 return NULL; | 1248 return NULL; |
1249 return entries_[transient_entry_index_].get(); | 1249 return entries_[transient_entry_index_].get(); |
1250 } | 1250 } |
OLD | NEW |