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

Side by Side Diff: chrome/browser/ui/browser.cc

Issue 2497373003: Add tab status to accessibility labels (Closed)
Patch Set: Created 4 years, 1 month 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 unified diff | Download patch
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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/ui/browser.h" 5 #include "chrome/browser/ui/browser.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <string> 10 #include <string>
(...skipping 579 matching lines...) Expand 10 before | Expand all | Expand 10 after
590 title = contents->GetTitle(); 590 title = contents->GetTitle();
591 FormatTitleForDisplay(&title); 591 FormatTitleForDisplay(&title);
592 } 592 }
593 if (title.empty()) 593 if (title.empty())
594 title = CoreTabHelper::GetDefaultTitle(); 594 title = CoreTabHelper::GetDefaultTitle();
595 595
596 #if defined(OS_MACOSX) 596 #if defined(OS_MACOSX)
597 // On Mac, we don't want to suffix the page title with the application name. 597 // On Mac, we don't want to suffix the page title with the application name.
598 return title; 598 return title;
599 #endif 599 #endif
600
601 // Append window state
602
603
600 // Include the app name in window titles for tabbed browser windows when 604 // Include the app name in window titles for tabbed browser windows when
601 // requested with |include_app_name|. 605 // requested with |include_app_name|.
602 return (!is_app() && include_app_name) ? 606 return (!is_app() && include_app_name) ?
603 l10n_util::GetStringFUTF16(IDS_BROWSER_WINDOW_TITLE_FORMAT, title): 607 l10n_util::GetStringFUTF16(IDS_BROWSER_WINDOW_TITLE_FORMAT, title):
604 title; 608 title;
605 } 609 }
606 610
607 // static 611 // static
608 void Browser::FormatTitleForDisplay(base::string16* title) { 612 void Browser::FormatTitleForDisplay(base::string16* title) {
609 size_t current_index = 0; 613 size_t current_index = 0;
(...skipping 1985 matching lines...) Expand 10 before | Expand all | Expand 10 after
2595 if (contents && !allow_js_access) { 2599 if (contents && !allow_js_access) {
2596 contents->web_contents()->GetController().LoadURL( 2600 contents->web_contents()->GetController().LoadURL(
2597 target_url, 2601 target_url,
2598 content::Referrer(), 2602 content::Referrer(),
2599 ui::PAGE_TRANSITION_LINK, 2603 ui::PAGE_TRANSITION_LINK,
2600 std::string()); // No extra headers. 2604 std::string()); // No extra headers.
2601 } 2605 }
2602 2606
2603 return contents != NULL; 2607 return contents != NULL;
2604 } 2608 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698