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

Unified Diff: chrome/browser/views/extensions/extension_shelf.cc

Issue 155446: Adds MSAA information to various (previously uncovered) bits of the UI, inclu... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 5 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/extensions/extension_shelf.cc
===================================================================
--- chrome/browser/views/extensions/extension_shelf.cc (revision 20591)
+++ chrome/browser/views/extensions/extension_shelf.cc (working copy)
@@ -565,8 +565,26 @@
void ExtensionShelf::OnMouseExited(const views::MouseEvent& event) {
}
-void ExtensionShelf::ToolstripInsertedAt(ExtensionHost* host,
- int index) {
+bool ExtensionShelf::GetAccessibleRole(AccessibilityTypes::Role* role) {
+ DCHECK(role);
+
+ *role = AccessibilityTypes::ROLE_TOOLBAR;
+ return true;
+}
+
+bool ExtensionShelf::GetAccessibleName(std::wstring* name) {
+ if (!accessible_name_.empty()) {
jcampan 2009/07/14 16:44:24 Same nit as previously: DCHECK(name), name->assign
+ (*name).assign(accessible_name_);
+ return true;
+ }
+ return false;
+}
+
+void ExtensionShelf::SetAccessibleName(const std::wstring& name) {
+ accessible_name_.assign(name);
+}
+
+void ExtensionShelf::ToolstripInsertedAt(ExtensionHost* host, int index) {
model_->SetToolstripDataAt(index, new Toolstrip(this, host));
bool had_views = GetChildViewCount() > 0;
@@ -580,8 +598,7 @@
Layout();
}
-void ExtensionShelf::ToolstripRemovingAt(ExtensionHost* host,
- int index) {
+void ExtensionShelf::ToolstripRemovingAt(ExtensionHost* host, int index) {
// Delete the Toolstrip view and remove it from the model.
Toolstrip* toolstrip = ToolstripAtIndex(index);
View* view = toolstrip->GetShelfView();
@@ -594,18 +611,15 @@
Layout();
}
-void ExtensionShelf::ToolstripDraggingFrom(ExtensionHost* host,
- int index) {
+void ExtensionShelf::ToolstripDraggingFrom(ExtensionHost* host, int index) {
}
-void ExtensionShelf::ToolstripMoved(ExtensionHost* host,
- int from_index,
+void ExtensionShelf::ToolstripMoved(ExtensionHost* host, int from_index,
int to_index) {
Layout();
}
-void ExtensionShelf::ToolstripChangedAt(ExtensionHost* toolstrip,
- int index) {
+void ExtensionShelf::ToolstripChangedAt(ExtensionHost* toolstrip, int index) {
}
void ExtensionShelf::ExtensionShelfEmpty() {
@@ -630,8 +644,8 @@
toolstrip->HideShelfHandle(kHideDelayMs);
}
-void ExtensionShelf::DropExtension(Toolstrip* toolstrip,
- const gfx::Point& pt, bool cancel) {
+void ExtensionShelf::DropExtension(Toolstrip* toolstrip, const gfx::Point& pt,
+ bool cancel) {
Toolstrip* dest_toolstrip = ToolstripAtX(pt.x());
if (!dest_toolstrip) {
if (pt.x() > 0)
@@ -647,8 +661,7 @@
model_->MoveToolstripAt(from, to);
}
-void ExtensionShelf::InitBackground(gfx::Canvas* canvas,
- const SkRect& subset) {
+void ExtensionShelf::InitBackground(gfx::Canvas* canvas, const SkRect& subset) {
if (!background_.empty())
return;

Powered by Google App Engine
This is Rietveld 408576698