diff options
-rw-r--r-- | ui/base/accessibility/accessible_view_state.cc | 19 | ||||
-rw-r--r-- | ui/base/accessibility/accessible_view_state.h | 10 | ||||
-rw-r--r-- | ui/base/ui_base.gypi | 1 | ||||
-rw-r--r-- | views/window/dialog_delegate.cc | 2 | ||||
-rw-r--r-- | views/window/dialog_delegate.h | 2 | ||||
-rw-r--r-- | views/window/window.cc | 6 | ||||
-rw-r--r-- | views/window/window_delegate.cc | 4 | ||||
-rw-r--r-- | views/window/window_delegate.h | 4 |
8 files changed, 15 insertions, 33 deletions
diff --git a/ui/base/accessibility/accessible_view_state.cc b/ui/base/accessibility/accessible_view_state.cc deleted file mode 100644 index ff1d3e6..0000000 --- a/ui/base/accessibility/accessible_view_state.cc +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "ui/base/accessibility/accessible_view_state.h" - -namespace ui { - -AccessibleViewState::AccessibleViewState() - : role(AccessibilityTypes::ROLE_CLIENT), - state(0), - selection_start(-1), - selection_end(-1), - index(-1), - count(-1) { } - -AccessibleViewState::~AccessibleViewState() { } - -} // namespace ui diff --git a/ui/base/accessibility/accessible_view_state.h b/ui/base/accessibility/accessible_view_state.h index 90848ea..2f36a4b 100644 --- a/ui/base/accessibility/accessible_view_state.h +++ b/ui/base/accessibility/accessible_view_state.h @@ -22,9 +22,13 @@ namespace ui { //////////////////////////////////////////////////////////////////////////////// struct AccessibleViewState { public: - AccessibleViewState(); - - ~AccessibleViewState(); + AccessibleViewState() + : role(AccessibilityTypes::ROLE_CLIENT), + state(0), + selection_start(-1), + selection_end(-1), + index(-1), + count(-1) { } // The view's role, like button or list box. AccessibilityTypes::Role role; diff --git a/ui/base/ui_base.gypi b/ui/base/ui_base.gypi index 8bb0135..cd66942 100644 --- a/ui/base/ui_base.gypi +++ b/ui/base/ui_base.gypi @@ -59,7 +59,6 @@ 'sources': [ 'accessibility/accessibility_types.h', 'accessibility/accessible_view_state.h', - 'accessibility/accessible_view_state.cc', 'animation/animation.cc', 'animation/animation.h', 'animation/animation_container.cc', diff --git a/views/window/dialog_delegate.cc b/views/window/dialog_delegate.cc index aa94e87..d815a67 100644 --- a/views/window/dialog_delegate.cc +++ b/views/window/dialog_delegate.cc @@ -98,7 +98,7 @@ DialogClientView* DialogDelegate::GetDialogClientView() const { return window()->client_view()->AsDialogClientView(); } -ui::AccessibilityTypes::Role DialogDelegate::GetAccessibleWindowRole() const { +ui::AccessibilityTypes::Role DialogDelegate::GetAccessibleRole() const { return ui::AccessibilityTypes::ROLE_DIALOG; } diff --git a/views/window/dialog_delegate.h b/views/window/dialog_delegate.h index 8e5c3e6..f28ea03 100644 --- a/views/window/dialog_delegate.h +++ b/views/window/dialog_delegate.h @@ -110,7 +110,7 @@ class DialogDelegate : public WindowDelegate { protected: // Overridden from WindowDelegate: - virtual ui::AccessibilityTypes::Role GetAccessibleWindowRole() const OVERRIDE; + virtual ui::AccessibilityTypes::Role GetAccessibleRole() const OVERRIDE; }; } // namespace views diff --git a/views/window/window.cc b/views/window/window.cc index 71f8cd8..f2313ed 100644 --- a/views/window/window.cc +++ b/views/window/window.cc @@ -287,10 +287,8 @@ void Window::OnNativeWindowCreated(const gfx::Rect& bounds) { non_client_view_); UpdateWindowTitle(); - native_window_->SetAccessibleRole( - window_delegate_->GetAccessibleWindowRole()); - native_window_->SetAccessibleState( - window_delegate_->GetAccessibleWindowState()); + native_window_->SetAccessibleRole(window_delegate_->GetAccessibleRole()); + native_window_->SetAccessibleState(window_delegate_->GetAccessibleState()); SetInitialBounds(bounds); } diff --git a/views/window/window_delegate.cc b/views/window/window_delegate.cc index b39d5fb..b29b052 100644 --- a/views/window/window_delegate.cc +++ b/views/window/window_delegate.cc @@ -36,11 +36,11 @@ bool WindowDelegate::IsModal() const { return false; } -ui::AccessibilityTypes::Role WindowDelegate::GetAccessibleWindowRole() const { +ui::AccessibilityTypes::Role WindowDelegate::GetAccessibleRole() const { return ui::AccessibilityTypes::ROLE_WINDOW; } -ui::AccessibilityTypes::State WindowDelegate::GetAccessibleWindowState() const { +ui::AccessibilityTypes::State WindowDelegate::GetAccessibleState() const { return 0; } diff --git a/views/window/window_delegate.h b/views/window/window_delegate.h index 379276c..9888317a 100644 --- a/views/window/window_delegate.h +++ b/views/window/window_delegate.h @@ -53,9 +53,9 @@ class WindowDelegate { // opened it. Only windows with WindowType == DIALOG can be modal. virtual bool IsModal() const; - virtual ui::AccessibilityTypes::Role GetAccessibleWindowRole() const; + virtual ui::AccessibilityTypes::Role GetAccessibleRole() const; - virtual ui::AccessibilityTypes::State GetAccessibleWindowState() const; + virtual ui::AccessibilityTypes::State GetAccessibleState() const; // Returns the title to be read with screen readers. virtual std::wstring GetAccessibleWindowTitle() const; |