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

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

Issue 2581023002: Add tab status to accessibility labels (Closed)
Patch Set: Return early if invalid tab index Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/browser.h ('k') | chrome/browser/ui/views/frame/browser_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « chrome/browser/ui/browser.h ('k') | chrome/browser/ui/views/frame/browser_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698