summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/views')
-rw-r--r--chrome/browser/views/accessibility_event_router_views.cc5
-rw-r--r--chrome/browser/views/accessible_toolbar_view.cc7
-rw-r--r--chrome/browser/views/accessible_toolbar_view.h2
-rw-r--r--chrome/browser/views/bookmark_bar_instructions_view.cc10
-rw-r--r--chrome/browser/views/bookmark_bar_instructions_view.h2
-rw-r--r--chrome/browser/views/bookmark_bar_view.cc7
-rw-r--r--chrome/browser/views/browser_actions_container.cc13
-rw-r--r--chrome/browser/views/browser_actions_container.h4
-rw-r--r--chrome/browser/views/frame/browser_view.cc7
-rw-r--r--chrome/browser/views/frame/browser_view.h2
-rw-r--r--chrome/browser/views/frame/opaque_browser_frame_view.cc7
-rw-r--r--chrome/browser/views/frame/opaque_browser_frame_view.h2
-rw-r--r--chrome/browser/views/infobars/infobar_container.cc7
-rw-r--r--chrome/browser/views/infobars/infobar_container.h2
-rw-r--r--chrome/browser/views/infobars/infobars.cc7
-rw-r--r--chrome/browser/views/infobars/infobars.h2
-rw-r--r--chrome/browser/views/location_bar/location_bar_view.cc8
-rw-r--r--chrome/browser/views/location_bar/location_bar_view.h2
-rw-r--r--chrome/browser/views/location_bar/page_action_image_view.cc5
-rw-r--r--chrome/browser/views/location_bar/page_action_image_view.h2
-rw-r--r--chrome/browser/views/location_bar/page_action_with_badge_view.cc6
-rw-r--r--chrome/browser/views/location_bar/page_action_with_badge_view.h2
-rw-r--r--chrome/browser/views/location_bar/star_view.cc5
-rw-r--r--chrome/browser/views/location_bar/star_view.h2
-rw-r--r--chrome/browser/views/options/general_page_view.cc17
-rw-r--r--chrome/browser/views/options/options_group_view.cc6
-rw-r--r--chrome/browser/views/options/options_group_view.h2
-rw-r--r--chrome/browser/views/options/options_page_view.cc5
-rw-r--r--chrome/browser/views/options/options_page_view.h3
-rw-r--r--chrome/browser/views/options/options_window_view.cc7
-rw-r--r--chrome/browser/views/tab_contents/native_tab_contents_container_gtk.cc11
-rw-r--r--chrome/browser/views/tab_contents/native_tab_contents_container_gtk.h2
-rw-r--r--chrome/browser/views/tab_contents/native_tab_contents_container_win.cc8
-rw-r--r--chrome/browser/views/tab_contents/native_tab_contents_container_win.h2
-rw-r--r--chrome/browser/views/tab_contents/tab_contents_container.cc7
-rw-r--r--chrome/browser/views/tab_contents/tab_contents_container.h2
-rw-r--r--chrome/browser/views/tabs/base_tab.cc7
-rw-r--r--chrome/browser/views/tabs/base_tab.h2
-rw-r--r--chrome/browser/views/tabs/tab_strip.cc7
-rw-r--r--chrome/browser/views/tabs/tab_strip.h2
40 files changed, 79 insertions, 129 deletions
diff --git a/chrome/browser/views/accessibility_event_router_views.cc b/chrome/browser/views/accessibility_event_router_views.cc
index abdb650..b8bfc25 100644
--- a/chrome/browser/views/accessibility_event_router_views.cc
+++ b/chrome/browser/views/accessibility_event_router_views.cc
@@ -157,8 +157,6 @@ void AccessibilityEventRouterViews::DispatchAccessibilityNotification(
most_recent_profile_ = profile;
- AccessibilityTypes::Role role;
- view->GetAccessibleRole(&role);
std::string class_name = view->GetClassName();
if (class_name == views::MenuButton::kViewClassName ||
@@ -245,8 +243,7 @@ bool AccessibilityEventRouterViews::IsMenuEvent(
return true;
while (view) {
- AccessibilityTypes::Role role;
- view->GetAccessibleRole(&role);
+ AccessibilityTypes::Role role = view->GetAccessibleRole();
if (role == AccessibilityTypes::ROLE_MENUITEM ||
role == AccessibilityTypes::ROLE_MENUPOPUP) {
return true;
diff --git a/chrome/browser/views/accessible_toolbar_view.cc b/chrome/browser/views/accessible_toolbar_view.cc
index 7a73087..1702214 100644
--- a/chrome/browser/views/accessible_toolbar_view.cc
+++ b/chrome/browser/views/accessible_toolbar_view.cc
@@ -185,11 +185,8 @@ void AccessibleToolbarView::SetVisible(bool flag) {
View::SetVisible(flag);
}
-bool AccessibleToolbarView::GetAccessibleRole(AccessibilityTypes::Role* role) {
- DCHECK(role);
-
- *role = AccessibilityTypes::ROLE_TOOLBAR;
- return true;
+AccessibilityTypes::Role AccessibleToolbarView::GetAccessibleRole() {
+ return AccessibilityTypes::ROLE_TOOLBAR;
}
////////////////////////////////////////////////////////////////////////////////
diff --git a/chrome/browser/views/accessible_toolbar_view.h b/chrome/browser/views/accessible_toolbar_view.h
index a5bd925..e6d3d59 100644
--- a/chrome/browser/views/accessible_toolbar_view.h
+++ b/chrome/browser/views/accessible_toolbar_view.h
@@ -44,7 +44,7 @@ class AccessibleToolbarView : public views::View,
virtual FocusTraversable* GetPaneFocusTraversable();
virtual bool AcceleratorPressed(const views::Accelerator& accelerator);
virtual void SetVisible(bool flag);
- virtual bool GetAccessibleRole(AccessibilityTypes::Role* role);
+ virtual AccessibilityTypes::Role GetAccessibleRole();
// Overridden from views::FocusChangeListener:
virtual void FocusWillChange(View* focused_before,
diff --git a/chrome/browser/views/bookmark_bar_instructions_view.cc b/chrome/browser/views/bookmark_bar_instructions_view.cc
index adc708b..a89eb2d 100644
--- a/chrome/browser/views/bookmark_bar_instructions_view.cc
+++ b/chrome/browser/views/bookmark_bar_instructions_view.cc
@@ -85,14 +85,8 @@ void BookmarkBarInstructionsView::ViewHierarchyChanged(bool is_add,
UpdateColors();
}
-bool BookmarkBarInstructionsView::GetAccessibleRole(
- AccessibilityTypes::Role* role) {
- DCHECK(role);
- if (!role)
- return false;
-
- *role = AccessibilityTypes::ROLE_GROUPING;
- return true;
+AccessibilityTypes::Role BookmarkBarInstructionsView::GetAccessibleRole() {
+ return AccessibilityTypes::ROLE_GROUPING;
}
void BookmarkBarInstructionsView::LinkActivated(views::Link* source,
diff --git a/chrome/browser/views/bookmark_bar_instructions_view.h b/chrome/browser/views/bookmark_bar_instructions_view.h
index c16b536..2156bf8 100644
--- a/chrome/browser/views/bookmark_bar_instructions_view.h
+++ b/chrome/browser/views/bookmark_bar_instructions_view.h
@@ -41,7 +41,7 @@ class BookmarkBarInstructionsView : public views::View,
virtual void ViewHierarchyChanged(bool is_add,
views::View* parent,
views::View* child);
- virtual bool GetAccessibleRole(AccessibilityTypes::Role* role);
+ virtual AccessibilityTypes::Role GetAccessibleRole();
// LinkController.
virtual void LinkActivated(views::Link* source, int event_flags);
diff --git a/chrome/browser/views/bookmark_bar_view.cc b/chrome/browser/views/bookmark_bar_view.cc
index f3ab049..0bb9e77 100644
--- a/chrome/browser/views/bookmark_bar_view.cc
+++ b/chrome/browser/views/bookmark_bar_view.cc
@@ -342,11 +342,8 @@ class BookmarkBarView::ButtonSeparatorView : public views::View {
return gfx::Size(kSeparatorWidth, 1);
}
- virtual bool GetAccessibleRole(AccessibilityTypes::Role* role) {
- DCHECK(role);
-
- *role = AccessibilityTypes::ROLE_SEPARATOR;
- return true;
+ virtual AccessibilityTypes::Role GetAccessibleRole() {
+ return AccessibilityTypes::ROLE_SEPARATOR;
}
private:
diff --git a/chrome/browser/views/browser_actions_container.cc b/chrome/browser/views/browser_actions_container.cc
index 1db438f..f93769a 100644
--- a/chrome/browser/views/browser_actions_container.cc
+++ b/chrome/browser/views/browser_actions_container.cc
@@ -309,10 +309,8 @@ gfx::Canvas* BrowserActionView::GetIconWithBadge() {
return canvas;
}
-bool BrowserActionView::GetAccessibleRole(AccessibilityTypes::Role* role) {
- DCHECK(role);
- *role = AccessibilityTypes::ROLE_GROUPING;
- return true;
+AccessibilityTypes::Role BrowserActionView::GetAccessibleRole() {
+ return AccessibilityTypes::ROLE_GROUPING;
}
void BrowserActionView::Layout() {
@@ -733,11 +731,8 @@ void BrowserActionsContainer::OnThemeChanged() {
LoadImages();
}
-bool BrowserActionsContainer::GetAccessibleRole(
- AccessibilityTypes::Role* role) {
- DCHECK(role);
- *role = AccessibilityTypes::ROLE_GROUPING;
- return true;
+AccessibilityTypes::Role BrowserActionsContainer::GetAccessibleRole() {
+ return AccessibilityTypes::ROLE_GROUPING;
}
void BrowserActionsContainer::RunMenu(View* source, const gfx::Point& pt) {
diff --git a/chrome/browser/views/browser_actions_container.h b/chrome/browser/views/browser_actions_container.h
index 02063a6..ddef35d 100644
--- a/chrome/browser/views/browser_actions_container.h
+++ b/chrome/browser/views/browser_actions_container.h
@@ -154,7 +154,7 @@ class BrowserActionView : public views::View {
gfx::Canvas* GetIconWithBadge();
// Accessibility accessors, overridden from View.
- virtual bool GetAccessibleRole(AccessibilityTypes::Role* role);
+ virtual AccessibilityTypes::Role GetAccessibleRole();
private:
virtual void Layout();
@@ -322,7 +322,7 @@ class BrowserActionsContainer
virtual void OnDragExited();
virtual int OnPerformDrop(const views::DropTargetEvent& event);
virtual void OnThemeChanged();
- virtual bool GetAccessibleRole(AccessibilityTypes::Role* role);
+ virtual AccessibilityTypes::Role GetAccessibleRole();
// Overridden from views::ViewMenuDelegate:
virtual void RunMenu(View* source, const gfx::Point& pt);
diff --git a/chrome/browser/views/frame/browser_view.cc b/chrome/browser/views/frame/browser_view.cc
index eda3a34..0b668bf 100644
--- a/chrome/browser/views/frame/browser_view.cc
+++ b/chrome/browser/views/frame/browser_view.cc
@@ -1792,11 +1792,8 @@ void BrowserView::ChildPreferredSizeChanged(View* child) {
Layout();
}
-bool BrowserView::GetAccessibleRole(AccessibilityTypes::Role* role) {
- DCHECK(role);
-
- *role = AccessibilityTypes::ROLE_CLIENT;
- return true;
+AccessibilityTypes::Role BrowserView::GetAccessibleRole() {
+ return AccessibilityTypes::ROLE_CLIENT;
}
void BrowserView::InfoBarSizeChanged(bool is_animating) {
diff --git a/chrome/browser/views/frame/browser_view.h b/chrome/browser/views/frame/browser_view.h
index 3b48553..142c520 100644
--- a/chrome/browser/views/frame/browser_view.h
+++ b/chrome/browser/views/frame/browser_view.h
@@ -408,7 +408,7 @@ class BrowserView : public BrowserBubbleHost,
views::View* parent,
views::View* child);
virtual void ChildPreferredSizeChanged(View* child);
- virtual bool GetAccessibleRole(AccessibilityTypes::Role* role);
+ virtual AccessibilityTypes::Role GetAccessibleRole();
// Factory Methods.
// Returns a new LayoutManager for this browser view. A subclass may
diff --git a/chrome/browser/views/frame/opaque_browser_frame_view.cc b/chrome/browser/views/frame/opaque_browser_frame_view.cc
index ffb131c..c3c1a0a 100644
--- a/chrome/browser/views/frame/opaque_browser_frame_view.cc
+++ b/chrome/browser/views/frame/opaque_browser_frame_view.cc
@@ -377,11 +377,8 @@ bool OpaqueBrowserFrameView::HitTest(const gfx::Point& l) const {
return browser_view_->IsPositionInWindowCaption(browser_view_point);
}
-bool OpaqueBrowserFrameView::GetAccessibleRole(AccessibilityTypes::Role* role) {
- DCHECK(role);
-
- *role = AccessibilityTypes::ROLE_TITLEBAR;
- return true;
+AccessibilityTypes::Role OpaqueBrowserFrameView::GetAccessibleRole() {
+ return AccessibilityTypes::ROLE_TITLEBAR;
}
///////////////////////////////////////////////////////////////////////////////
diff --git a/chrome/browser/views/frame/opaque_browser_frame_view.h b/chrome/browser/views/frame/opaque_browser_frame_view.h
index 452c14e..483693e 100644
--- a/chrome/browser/views/frame/opaque_browser_frame_view.h
+++ b/chrome/browser/views/frame/opaque_browser_frame_view.h
@@ -53,7 +53,7 @@ class OpaqueBrowserFrameView : public BrowserNonClientFrameView,
virtual void Paint(gfx::Canvas* canvas);
virtual void Layout();
virtual bool HitTest(const gfx::Point& l) const;
- virtual bool GetAccessibleRole(AccessibilityTypes::Role* role);
+ virtual AccessibilityTypes::Role GetAccessibleRole();
// Overridden from views::ButtonListener:
virtual void ButtonPressed(views::Button* sender, const views::Event& event);
diff --git a/chrome/browser/views/infobars/infobar_container.cc b/chrome/browser/views/infobars/infobar_container.cc
index 4301132..5779fde 100644
--- a/chrome/browser/views/infobars/infobar_container.cc
+++ b/chrome/browser/views/infobars/infobar_container.cc
@@ -78,11 +78,8 @@ void InfoBarContainer::Layout() {
}
}
-bool InfoBarContainer::GetAccessibleRole(AccessibilityTypes::Role* role) {
- DCHECK(role);
-
- *role = AccessibilityTypes::ROLE_GROUPING;
- return true;
+AccessibilityTypes::Role InfoBarContainer::GetAccessibleRole() {
+ return AccessibilityTypes::ROLE_GROUPING;
}
void InfoBarContainer::ViewHierarchyChanged(bool is_add,
diff --git a/chrome/browser/views/infobars/infobar_container.h b/chrome/browser/views/infobars/infobar_container.h
index 601d111..8efa6b5 100644
--- a/chrome/browser/views/infobars/infobar_container.h
+++ b/chrome/browser/views/infobars/infobar_container.h
@@ -46,7 +46,7 @@ class InfoBarContainer : public views::View,
// Overridden from views::View:
virtual gfx::Size GetPreferredSize();
virtual void Layout();
- virtual bool GetAccessibleRole(AccessibilityTypes::Role* role);
+ virtual AccessibilityTypes::Role GetAccessibleRole();
protected:
virtual void ViewHierarchyChanged(bool is_add,
diff --git a/chrome/browser/views/infobars/infobars.cc b/chrome/browser/views/infobars/infobars.cc
index ad9a2c8..51e74e1b 100644
--- a/chrome/browser/views/infobars/infobars.cc
+++ b/chrome/browser/views/infobars/infobars.cc
@@ -124,11 +124,8 @@ InfoBar::~InfoBar() {
// InfoBar, views::View overrides: ---------------------------------------------
-bool InfoBar::GetAccessibleRole(AccessibilityTypes::Role* role) {
- DCHECK(role);
-
- *role = AccessibilityTypes::ROLE_ALERT;
- return true;
+AccessibilityTypes::Role InfoBar::GetAccessibleRole() {
+ return AccessibilityTypes::ROLE_ALERT;
}
gfx::Size InfoBar::GetPreferredSize() {
diff --git a/chrome/browser/views/infobars/infobars.h b/chrome/browser/views/infobars/infobars.h
index 4419d8f..ec270d5 100644
--- a/chrome/browser/views/infobars/infobars.h
+++ b/chrome/browser/views/infobars/infobars.h
@@ -66,7 +66,7 @@ class InfoBar : public views::View,
static const int kButtonInLabelSpacing;
// Overridden from views::View:
- virtual bool GetAccessibleRole(AccessibilityTypes::Role* role);
+ virtual AccessibilityTypes::Role GetAccessibleRole();
virtual gfx::Size GetPreferredSize();
virtual void Layout();
diff --git a/chrome/browser/views/location_bar/location_bar_view.cc b/chrome/browser/views/location_bar/location_bar_view.cc
index 98327a8..7ffccb7 100644
--- a/chrome/browser/views/location_bar/location_bar_view.cc
+++ b/chrome/browser/views/location_bar/location_bar_view.cc
@@ -1028,14 +1028,10 @@ bool LocationBarView::SkipDefaultKeyEventProcessing(const views::KeyEvent& e) {
#endif
}
-bool LocationBarView::GetAccessibleRole(AccessibilityTypes::Role* role) {
- DCHECK(role);
-
- *role = AccessibilityTypes::ROLE_GROUPING;
- return true;
+AccessibilityTypes::Role LocationBarView::GetAccessibleRole() {
+ return AccessibilityTypes::ROLE_GROUPING;
}
-
void LocationBarView::WriteDragData(views::View* sender,
const gfx::Point& press_pt,
OSExchangeData* data) {
diff --git a/chrome/browser/views/location_bar/location_bar_view.h b/chrome/browser/views/location_bar/location_bar_view.h
index 1daf264..fae5b2f2 100644
--- a/chrome/browser/views/location_bar/location_bar_view.h
+++ b/chrome/browser/views/location_bar/location_bar_view.h
@@ -194,7 +194,7 @@ class LocationBarView : public LocationBar,
// Overridden from views::View:
virtual std::string GetClassName() const;
virtual bool SkipDefaultKeyEventProcessing(const views::KeyEvent& e);
- virtual bool GetAccessibleRole(AccessibilityTypes::Role* role);
+ virtual AccessibilityTypes::Role GetAccessibleRole();
// Overridden from views::DragController:
virtual void WriteDragData(View* sender,
diff --git a/chrome/browser/views/location_bar/page_action_image_view.cc b/chrome/browser/views/location_bar/page_action_image_view.cc
index 058100c..015ee56 100644
--- a/chrome/browser/views/location_bar/page_action_image_view.cc
+++ b/chrome/browser/views/location_bar/page_action_image_view.cc
@@ -101,9 +101,8 @@ void PageActionImageView::ExecuteAction(int button,
}
}
-bool PageActionImageView::GetAccessibleRole(AccessibilityTypes::Role* role) {
- *role = AccessibilityTypes::ROLE_PUSHBUTTON;
- return true;
+AccessibilityTypes::Role PageActionImageView::GetAccessibleRole() {
+ return AccessibilityTypes::ROLE_PUSHBUTTON;
}
bool PageActionImageView::OnMousePressed(const views::MouseEvent& event) {
diff --git a/chrome/browser/views/location_bar/page_action_image_view.h b/chrome/browser/views/location_bar/page_action_image_view.h
index 1177e49..71ee6c3 100644
--- a/chrome/browser/views/location_bar/page_action_image_view.h
+++ b/chrome/browser/views/location_bar/page_action_image_view.h
@@ -41,7 +41,7 @@ class PageActionImageView : public views::ImageView,
}
// Overridden from view.
- virtual bool GetAccessibleRole(AccessibilityTypes::Role* role);
+ virtual AccessibilityTypes::Role GetAccessibleRole();
virtual bool OnMousePressed(const views::MouseEvent& event);
virtual void OnMouseReleased(const views::MouseEvent& event, bool canceled);
virtual bool OnKeyPressed(const views::KeyEvent& e);
diff --git a/chrome/browser/views/location_bar/page_action_with_badge_view.cc b/chrome/browser/views/location_bar/page_action_with_badge_view.cc
index 603b4f9..fd2204e 100644
--- a/chrome/browser/views/location_bar/page_action_with_badge_view.cc
+++ b/chrome/browser/views/location_bar/page_action_with_badge_view.cc
@@ -13,10 +13,8 @@ PageActionWithBadgeView::PageActionWithBadgeView(
AddChildView(image_view_);
}
-bool PageActionWithBadgeView::GetAccessibleRole(
- AccessibilityTypes::Role* role) {
- *role = AccessibilityTypes::ROLE_GROUPING;
- return true;
+AccessibilityTypes::Role PageActionWithBadgeView::GetAccessibleRole() {
+ return AccessibilityTypes::ROLE_GROUPING;
}
gfx::Size PageActionWithBadgeView::GetPreferredSize() {
diff --git a/chrome/browser/views/location_bar/page_action_with_badge_view.h b/chrome/browser/views/location_bar/page_action_with_badge_view.h
index 06c768e..69d0c36 100644
--- a/chrome/browser/views/location_bar/page_action_with_badge_view.h
+++ b/chrome/browser/views/location_bar/page_action_with_badge_view.h
@@ -20,7 +20,7 @@ class PageActionWithBadgeView : public views::View {
PageActionImageView* image_view() { return image_view_; }
- virtual bool GetAccessibleRole(AccessibilityTypes::Role* role);
+ virtual AccessibilityTypes::Role GetAccessibleRole();
virtual gfx::Size GetPreferredSize();
void UpdateVisibility(TabContents* contents, const GURL& url);
diff --git a/chrome/browser/views/location_bar/star_view.cc b/chrome/browser/views/location_bar/star_view.cc
index 9b4f2c5..88360ec 100644
--- a/chrome/browser/views/location_bar/star_view.cc
+++ b/chrome/browser/views/location_bar/star_view.cc
@@ -34,9 +34,8 @@ void StarView::SetToggled(bool on) {
on ? IDR_STAR_LIT : IDR_STAR));
}
-bool StarView::GetAccessibleRole(AccessibilityTypes::Role* role) {
- *role = AccessibilityTypes::ROLE_PUSHBUTTON;
- return true;
+AccessibilityTypes::Role StarView::GetAccessibleRole() {
+ return AccessibilityTypes::ROLE_PUSHBUTTON;
}
bool StarView::GetTooltipText(const gfx::Point& p, std::wstring* tooltip) {
diff --git a/chrome/browser/views/location_bar/star_view.h b/chrome/browser/views/location_bar/star_view.h
index 5fd5e3c..8e8794c 100644
--- a/chrome/browser/views/location_bar/star_view.h
+++ b/chrome/browser/views/location_bar/star_view.h
@@ -27,7 +27,7 @@ class StarView : public views::ImageView, public InfoBubbleDelegate {
private:
// views::ImageView overrides:
- virtual bool GetAccessibleRole(AccessibilityTypes::Role* role);
+ virtual AccessibilityTypes::Role GetAccessibleRole();
virtual bool GetTooltipText(const gfx::Point& p, std::wstring* tooltip);
virtual bool OnMousePressed(const views::MouseEvent& event);
virtual void OnMouseReleased(const views::MouseEvent& event, bool canceled);
diff --git a/chrome/browser/views/options/general_page_view.cc b/chrome/browser/views/options/general_page_view.cc
index 8bf838f..830dac1 100644
--- a/chrome/browser/views/options/general_page_view.cc
+++ b/chrome/browser/views/options/general_page_view.cc
@@ -52,6 +52,21 @@ bool IsNewTabUIURLString(const GURL& url) {
} // namespace
///////////////////////////////////////////////////////////////////////////////
+// OptionsGroupContents
+class OptionsGroupContents : public views::View {
+ public:
+ OptionsGroupContents() { }
+
+ // views::View overrides:
+ virtual AccessibilityTypes::Role GetAccessibleRole() {
+ return AccessibilityTypes::ROLE_GROUPING;
+ }
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(OptionsGroupContents);
+};
+
+///////////////////////////////////////////////////////////////////////////////
// SearchEngineListModel
class SearchEngineListModel : public ComboboxModel,
@@ -488,7 +503,7 @@ void GeneralPageView::InitStartupGroup() {
using views::GridLayout;
using views::ColumnSet;
- views::View* contents = new views::View;
+ views::View* contents = new OptionsGroupContents;
GridLayout* layout = new GridLayout(contents);
contents->SetLayoutManager(layout);
diff --git a/chrome/browser/views/options/options_group_view.cc b/chrome/browser/views/options/options_group_view.cc
index 1e742b4..14131b7 100644
--- a/chrome/browser/views/options/options_group_view.cc
+++ b/chrome/browser/views/options/options_group_view.cc
@@ -51,7 +51,6 @@ OptionsGroupView::OptionsGroupView(views::View* contents,
SetAccessibleName(title);
contents->SetAccessibleName(title);
- contents->SetAccessibleRole(AccessibilityTypes::ROLE_GROUPING);
}
void OptionsGroupView::SetHighlighted(bool highlighted) {
@@ -66,9 +65,8 @@ int OptionsGroupView::GetContentsWidth() const {
///////////////////////////////////////////////////////////////////////////////
// OptionsGroupView, views::View overrides:
-bool OptionsGroupView::GetAccessibleRole(AccessibilityTypes::Role* role) {
- *role = AccessibilityTypes::ROLE_GROUPING;
- return true;
+AccessibilityTypes::Role OptionsGroupView::GetAccessibleRole() {
+ return AccessibilityTypes::ROLE_GROUPING;
}
void OptionsGroupView::Paint(gfx::Canvas* canvas) {
diff --git a/chrome/browser/views/options/options_group_view.h b/chrome/browser/views/options/options_group_view.h
index 41550c2..69b4efa 100644
--- a/chrome/browser/views/options/options_group_view.h
+++ b/chrome/browser/views/options/options_group_view.h
@@ -35,7 +35,7 @@ class OptionsGroupView : public views::View {
protected:
// views::View overrides:
- virtual bool GetAccessibleRole(AccessibilityTypes::Role* role);
+ virtual AccessibilityTypes::Role GetAccessibleRole();
virtual void Paint(gfx::Canvas* canvas);
virtual void ViewHierarchyChanged(bool is_add,
views::View* parent,
diff --git a/chrome/browser/views/options/options_page_view.cc b/chrome/browser/views/options/options_page_view.cc
index 94a68b8..6073442 100644
--- a/chrome/browser/views/options/options_page_view.cc
+++ b/chrome/browser/views/options/options_page_view.cc
@@ -36,8 +36,7 @@ void OptionsPageView::ViewHierarchyChanged(bool is_add,
}
}
-bool OptionsPageView::GetAccessibleRole(AccessibilityTypes::Role* role) {
- *role = AccessibilityTypes::ROLE_PAGETAB;
- return true;
+AccessibilityTypes::Role OptionsPageView::GetAccessibleRole() {
+ return AccessibilityTypes::ROLE_PAGETAB;
}
diff --git a/chrome/browser/views/options/options_page_view.h b/chrome/browser/views/options/options_page_view.h
index 707e39f..698cb99 100644
--- a/chrome/browser/views/options/options_page_view.h
+++ b/chrome/browser/views/options/options_page_view.h
@@ -40,8 +40,7 @@ class OptionsPageView : public views::View,
virtual void ViewHierarchyChanged(bool is_add,
views::View* parent,
views::View* child);
-
- virtual bool GetAccessibleRole(AccessibilityTypes::Role* role);
+ virtual AccessibilityTypes::Role GetAccessibleRole();
private:
// Whether or not the control layout has been initialized for this page.
diff --git a/chrome/browser/views/options/options_window_view.cc b/chrome/browser/views/options/options_window_view.cc
index 1be8878..d2cb8e2 100644
--- a/chrome/browser/views/options/options_window_view.cc
+++ b/chrome/browser/views/options/options_window_view.cc
@@ -54,7 +54,7 @@ class OptionsWindowView : public views::View,
virtual void TabSelectedAt(int index);
// views::View overrides:
- virtual bool GetAccessibleRole(AccessibilityTypes::Role* role);
+ virtual AccessibilityTypes::Role GetAccessibleRole();
virtual void Layout();
virtual gfx::Size GetPreferredSize();
@@ -160,9 +160,8 @@ void OptionsWindowView::TabSelectedAt(int index) {
///////////////////////////////////////////////////////////////////////////////
// OptionsWindowView, views::View overrides:
-bool OptionsWindowView::GetAccessibleRole(AccessibilityTypes::Role* role) {
- *role = AccessibilityTypes::ROLE_CLIENT;
- return true;
+AccessibilityTypes::Role OptionsWindowView::GetAccessibleRole() {
+ return AccessibilityTypes::ROLE_CLIENT;
}
void OptionsWindowView::Layout() {
diff --git a/chrome/browser/views/tab_contents/native_tab_contents_container_gtk.cc b/chrome/browser/views/tab_contents/native_tab_contents_container_gtk.cc
index 241ca35..d9c26c5 100644
--- a/chrome/browser/views/tab_contents/native_tab_contents_container_gtk.cc
+++ b/chrome/browser/views/tab_contents/native_tab_contents_container_gtk.cc
@@ -134,15 +134,8 @@ void NativeTabContentsContainerGtk::AboutToRequestFocusFromTabTraversal(
container_->tab_contents()->FocusThroughTabTraversal(reverse);
}
-bool NativeTabContentsContainerGtk::GetAccessibleRole(
- AccessibilityTypes::Role* role) {
- // TODO(port): figure out a11y
-#if defined(OS_WIN)
- DCHECK(role);
-
- *role = AccessibilityTypes::ROLE_GROUPING;
-#endif
- return true;
+AccessibilityTypes::Role NativeTabContentsContainerGtk::GetAccessibleRole() {
+ return AccessibilityTypes::ROLE_GROUPING;
}
////////////////////////////////////////////////////////////////////////////////
diff --git a/chrome/browser/views/tab_contents/native_tab_contents_container_gtk.h b/chrome/browser/views/tab_contents/native_tab_contents_container_gtk.h
index a00caad..7de9e26 100644
--- a/chrome/browser/views/tab_contents/native_tab_contents_container_gtk.h
+++ b/chrome/browser/views/tab_contents/native_tab_contents_container_gtk.h
@@ -33,7 +33,7 @@ class NativeTabContentsContainerGtk : public NativeTabContentsContainer,
virtual void Focus();
virtual void RequestFocus();
virtual void AboutToRequestFocusFromTabTraversal(bool reverse);
- virtual bool GetAccessibleRole(AccessibilityTypes::Role* role);
+ virtual AccessibilityTypes::Role GetAccessibleRole();
private:
TabContentsContainer* container_;
diff --git a/chrome/browser/views/tab_contents/native_tab_contents_container_win.cc b/chrome/browser/views/tab_contents/native_tab_contents_container_win.cc
index 355d776..eba411f 100644
--- a/chrome/browser/views/tab_contents/native_tab_contents_container_win.cc
+++ b/chrome/browser/views/tab_contents/native_tab_contents_container_win.cc
@@ -129,12 +129,8 @@ void NativeTabContentsContainerWin::AboutToRequestFocusFromTabTraversal(
container_->tab_contents()->FocusThroughTabTraversal(reverse);
}
-bool NativeTabContentsContainerWin::GetAccessibleRole(
- AccessibilityTypes::Role* role) {
- DCHECK(role);
-
- *role = AccessibilityTypes::ROLE_GROUPING;
- return true;
+AccessibilityTypes::Role NativeTabContentsContainerWin::GetAccessibleRole() {
+ return AccessibilityTypes::ROLE_GROUPING;
}
////////////////////////////////////////////////////////////////////////////////
diff --git a/chrome/browser/views/tab_contents/native_tab_contents_container_win.h b/chrome/browser/views/tab_contents/native_tab_contents_container_win.h
index b87ccf2..916ce0f 100644
--- a/chrome/browser/views/tab_contents/native_tab_contents_container_win.h
+++ b/chrome/browser/views/tab_contents/native_tab_contents_container_win.h
@@ -30,7 +30,7 @@ class NativeTabContentsContainerWin : public NativeTabContentsContainer,
virtual void Focus();
virtual void RequestFocus();
virtual void AboutToRequestFocusFromTabTraversal(bool reverse);
- virtual bool GetAccessibleRole(AccessibilityTypes::Role* role);
+ virtual AccessibilityTypes::Role GetAccessibleRole();
private:
TabContentsContainer* container_;
diff --git a/chrome/browser/views/tab_contents/tab_contents_container.cc b/chrome/browser/views/tab_contents/tab_contents_container.cc
index fcffce2..a75743d 100644
--- a/chrome/browser/views/tab_contents/tab_contents_container.cc
+++ b/chrome/browser/views/tab_contents/tab_contents_container.cc
@@ -75,11 +75,8 @@ void TabContentsContainer::Layout() {
}
}
-bool TabContentsContainer::GetAccessibleRole(AccessibilityTypes::Role* role) {
- DCHECK(role);
-
- *role = AccessibilityTypes::ROLE_WINDOW;
- return true;
+AccessibilityTypes::Role TabContentsContainer::GetAccessibleRole() {
+ return AccessibilityTypes::ROLE_WINDOW;
}
void TabContentsContainer::ViewHierarchyChanged(bool is_add,
diff --git a/chrome/browser/views/tab_contents/tab_contents_container.h b/chrome/browser/views/tab_contents/tab_contents_container.h
index 5f273ce..c5c2f1f 100644
--- a/chrome/browser/views/tab_contents/tab_contents_container.h
+++ b/chrome/browser/views/tab_contents/tab_contents_container.h
@@ -43,7 +43,7 @@ class TabContentsContainer : public views::View,
// Overridden from views::View:
virtual void Layout();
- virtual bool GetAccessibleRole(AccessibilityTypes::Role* role);
+ virtual AccessibilityTypes::Role GetAccessibleRole();
protected:
// Overridden from views::View:
diff --git a/chrome/browser/views/tabs/base_tab.cc b/chrome/browser/views/tabs/base_tab.cc
index 3b6968b..7520a33 100644
--- a/chrome/browser/views/tabs/base_tab.cc
+++ b/chrome/browser/views/tabs/base_tab.cc
@@ -304,11 +304,8 @@ bool BaseTab::GetTooltipText(const gfx::Point& p, std::wstring* tooltip) {
return false;
}
-bool BaseTab::GetAccessibleRole(AccessibilityTypes::Role* role) {
- DCHECK(role);
-
- *role = AccessibilityTypes::ROLE_PAGETAB;
- return true;
+AccessibilityTypes::Role BaseTab::GetAccessibleRole() {
+ return AccessibilityTypes::ROLE_PAGETAB;
}
ThemeProvider* BaseTab::GetThemeProvider() {
diff --git a/chrome/browser/views/tabs/base_tab.h b/chrome/browser/views/tabs/base_tab.h
index 83b3da9..9d6567b 100644
--- a/chrome/browser/views/tabs/base_tab.h
+++ b/chrome/browser/views/tabs/base_tab.h
@@ -86,7 +86,7 @@ class BaseTab : public AnimationDelegate,
virtual void OnMouseReleased(const views::MouseEvent& event,
bool canceled);
virtual bool GetTooltipText(const gfx::Point& p, std::wstring* tooltip);
- virtual bool GetAccessibleRole(AccessibilityTypes::Role* role);
+ virtual AccessibilityTypes::Role GetAccessibleRole();
virtual ThemeProvider* GetThemeProvider();
protected:
diff --git a/chrome/browser/views/tabs/tab_strip.cc b/chrome/browser/views/tabs/tab_strip.cc
index 45b88e6..c408585 100644
--- a/chrome/browser/views/tabs/tab_strip.cc
+++ b/chrome/browser/views/tabs/tab_strip.cc
@@ -418,11 +418,8 @@ int TabStrip::OnPerformDrop(const DropTargetEvent& event) {
return GetDropEffect(event);
}
-bool TabStrip::GetAccessibleRole(AccessibilityTypes::Role* role) {
- DCHECK(role);
-
- *role = AccessibilityTypes::ROLE_PAGETABLIST;
- return true;
+AccessibilityTypes::Role TabStrip::GetAccessibleRole() {
+ return AccessibilityTypes::ROLE_PAGETABLIST;
}
views::View* TabStrip::GetViewForPoint(const gfx::Point& point) {
diff --git a/chrome/browser/views/tabs/tab_strip.h b/chrome/browser/views/tabs/tab_strip.h
index ac8b1e0..64c23fe 100644
--- a/chrome/browser/views/tabs/tab_strip.h
+++ b/chrome/browser/views/tabs/tab_strip.h
@@ -81,7 +81,7 @@ class TabStrip : public BaseTabStrip,
virtual int OnDragUpdated(const views::DropTargetEvent& event);
virtual void OnDragExited();
virtual int OnPerformDrop(const views::DropTargetEvent& event);
- virtual bool GetAccessibleRole(AccessibilityTypes::Role* role);
+ virtual AccessibilityTypes::Role GetAccessibleRole();
virtual views::View* GetViewForPoint(const gfx::Point& point);
virtual void OnThemeChanged();