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

Unified Diff: chrome/browser/ui/browser.cc

Issue 2581023002: Add tab status to accessibility labels (Closed)
Patch Set: Add tab index check. Fixes ChromeVox crash. Created 4 years 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 side-by-side diff with in-line comments
Download patch
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

Powered by Google App Engine
This is Rietveld 408576698