Index: chrome/browser/ui/browser.cc |
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc |
index 09923f08525f78cfc0d5399b3182a25d342e9095..c438f6c41f7b4989e20da7b971d73b40e6646559 100644 |
--- a/chrome/browser/ui/browser.cc |
+++ b/chrome/browser/ui/browser.cc |
@@ -577,7 +577,19 @@ gfx::Image Browser::GetCurrentPageIcon() const { |
base::string16 Browser::GetWindowTitleForCurrentTab( |
bool include_app_name) const { |
- WebContents* contents = tab_strip_model_->GetActiveWebContents(); |
+ return GetWindowTitleFromWebContents( |
+ include_app_name, tab_strip_model_->GetActiveWebContents()); |
+} |
+ |
+base::string16 Browser::GetWindowTitleForTab(bool include_app_name, |
+ int index) const { |
+ return GetWindowTitleFromWebContents( |
+ include_app_name, tab_strip_model_->GetWebContentsAt(index)); |
+} |
+ |
+base::string16 Browser::GetWindowTitleFromWebContents( |
+ bool include_app_name, |
+ content::WebContents* contents) const { |
base::string16 title; |
// |contents| can be NULL because GetWindowTitleForCurrentTab is called by the |