Initial work to fix the IAccessible tree in circumstances where there is a widget not at the root of the UI heirarchy.  Also contains misc fixes for setting correct name/role for controls found in the Options dialog.
BUG=9621
TEST=none
Review URL: http://codereview.chromium.org/2174002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48444 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/views/view.h b/views/view.h
index 83247e6..c0f6f07 100644
--- a/views/view.h
+++ b/views/view.h
@@ -265,6 +265,8 @@
   // Returns whether the view is hot-tracked.
   virtual bool IsHotTracked() const { return false; }
 
+  virtual Widget* child_widget() { return NULL; }
+
   // Returns whether the view is pushed.
   virtual bool IsPushed() const { return false; }
 
@@ -562,9 +564,7 @@
   // assistive technologies (ATs) use to determine what behavior to expect from
   // a given control. Sets the input Role appropriately, and returns true if
   // successful.
-  virtual bool GetAccessibleRole(AccessibilityTypes::Role* role) {
-    return false;
-  }
+  virtual bool GetAccessibleRole(AccessibilityTypes::Role* role);
 
   // Returns the accessibility state of the current view. Sets the input State
   // appropriately, and returns true if successful.
@@ -581,6 +581,8 @@
   // certain type.
   void SetAccessibleName(const std::wstring& name);
 
+  void SetAccessibleRole(const AccessibilityTypes::Role role);
+
   // Returns an instance of a wrapper class implementing the (platform-specific)
   // accessibility interface for a given View. If one exists, it will be
   // re-used, otherwise a new instance will be created.
@@ -1245,6 +1247,9 @@
   // Name for this view, which can be retrieved by accessibility APIs.
   std::wstring accessible_name_;
 
+  // Role for this view, which can be retrieved by accessibility APIs.
+  AccessibilityTypes::Role accessible_role_;
+
   // Next view to be focused when the Tab key is pressed.
   View* next_focusable_view_;