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

Unified Diff: chrome/browser/views/browser_actions_container.cc

Issue 1616004: Fix Regression for Accessible Names (Closed)
Patch Set: Created 10 years, 9 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
Index: chrome/browser/views/browser_actions_container.cc
diff --git a/chrome/browser/views/browser_actions_container.cc b/chrome/browser/views/browser_actions_container.cc
index 9a7c7296b2b822db5d3d40036eaf4c0f12500a0e..d4f6a4293fd3e85037a534451d04669ba64760d0 100644
--- a/chrome/browser/views/browser_actions_container.cc
+++ b/chrome/browser/views/browser_actions_container.cc
@@ -299,6 +299,8 @@ BrowserActionView::BrowserActionView(Extension* extension,
button_->SetDragController(panel_);
AddChildView(button_);
button_->UpdateState();
+ SetAccessibleName(
+ l10n_util::GetString(IDS_ACCNAME_EXTENSIONS_BROWSER_ACTION));
}
BrowserActionView::~BrowserActionView() {
@@ -331,12 +333,6 @@ bool BrowserActionView::GetAccessibleRole(AccessibilityTypes::Role* role) {
return true;
}
-bool BrowserActionView::GetAccessibleName(std::wstring* name) {
- DCHECK(name);
- *name = l10n_util::GetString(IDS_ACCNAME_EXTENSIONS_BROWSER_ACTION);
- return true;
-}
-
void BrowserActionView::Layout() {
button_->SetBounds(0, kControlVertOffset, width(), kButtonSize);
}
@@ -416,6 +412,8 @@ BrowserActionsContainer::BrowserActionsContainer(
else
chevron_->SetVisible(true);
container_size_ = gfx::Size(IconCountToWidth(visible_actions), kButtonSize);
+
+ SetAccessibleName(l10n_util::GetString(IDS_ACCNAME_EXTENSIONS));
}
BrowserActionsContainer::~BrowserActionsContainer() {
@@ -825,12 +823,6 @@ bool BrowserActionsContainer::GetAccessibleRole(
return true;
}
-bool BrowserActionsContainer::GetAccessibleName(std::wstring* name) {
- DCHECK(name);
- *name = l10n_util::GetString(IDS_ACCNAME_EXTENSIONS);
- return !name->empty();
-}
-
void BrowserActionsContainer::MoveBrowserAction(
const std::string& extension_id, size_t new_index) {
ExtensionsService* service = profile_->GetExtensionsService();

Powered by Google App Engine
This is Rietveld 408576698