summaryrefslogtreecommitdiffstats
path: root/views
diff options
context:
space:
mode:
authorrohitrao@chromium.org <rohitrao@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-29 03:24:45 +0000
committerrohitrao@chromium.org <rohitrao@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-29 03:24:45 +0000
commitd53049c6c12fa149fe048f23da143029f2f18ac5 (patch)
treec1a0138714b8ae0899a4a411cb40c7160629da24 /views
parent3f6eaabdb0c4460e62297465ccc9ba33aa3e6fc3 (diff)
downloadchromium_src-d53049c6c12fa149fe048f23da143029f2f18ac5.zip
chromium_src-d53049c6c12fa149fe048f23da143029f2f18ac5.tar.gz
chromium_src-d53049c6c12fa149fe048f23da143029f2f18ac5.tar.bz2
Revert 54074 - Add initial tests for keyboard access (tabbing in some dialogs).
BUG=none TEST=none Review URL: http://codereview.chromium.org/3015026 TBR=dtseng@chromium.org Review URL: http://codereview.chromium.org/3046031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54093 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views')
-rw-r--r--views/controls/native_control.cc2
-rw-r--r--views/view.h7
-rw-r--r--views/view_gtk.cc13
-rw-r--r--views/view_unittest.cc2
-rw-r--r--views/view_win.cc28
-rw-r--r--views/views_delegate.h9
6 files changed, 11 insertions, 50 deletions
diff --git a/views/controls/native_control.cc b/views/controls/native_control.cc
index 942a093..39d62b7 100644
--- a/views/controls/native_control.cc
+++ b/views/controls/native_control.cc
@@ -270,7 +270,7 @@ void NativeControl::Focus() {
if (container_) {
DCHECK(container_->GetControl());
::SetFocus(container_->GetControl());
- NotifyAccessibilityEvent(AccessibilityTypes::EVENT_FOCUS, false);
+ NotifyAccessibilityEvent(AccessibilityTypes::EVENT_FOCUS);
}
}
diff --git a/views/view.h b/views/view.h
index c5268c2..22c38d0 100644
--- a/views/view.h
+++ b/views/view.h
@@ -558,14 +558,9 @@ class View : public AcceleratorTarget {
// TODO(klink): Move all this out to a AccessibleInfo wrapper class.
// Notify the platform specific accessibility client of changes in the user
- // interface. This will always raise native notifications.
+ // interface.
virtual void NotifyAccessibilityEvent(AccessibilityTypes::Event event_type);
- // Raise an accessibility notification with an option to also raise a native
- // notification.
- virtual void NotifyAccessibilityEvent(AccessibilityTypes::Event event_type,
- bool send_native_event);
-
// Returns the MSAA default action of the current view. The string returned
// describes the default action that will occur when executing
// IAccessible::DoDefaultAction. For instance, default action of a button is
diff --git a/views/view_gtk.cc b/views/view_gtk.cc
index d74598d..049dfe8 100644
--- a/views/view_gtk.cc
+++ b/views/view_gtk.cc
@@ -7,7 +7,6 @@
#include <gtk/gtk.h>
#include "base/logging.h"
-#include "views/views_delegate.h"
namespace views {
@@ -22,17 +21,7 @@ int View::GetMenuShowDelay() {
}
void View::NotifyAccessibilityEvent(AccessibilityTypes::Event event_type) {
- NotifyAccessibilityEvent(event_type, true);
-}
-
-void View::NotifyAccessibilityEvent(AccessibilityTypes::Event event_type,
- bool send_native_event) {
- // Send the notification to the delegate.
- if (ViewsDelegate::views_delegate)
- ViewsDelegate::views_delegate->NotifyAccessibilityEvent(this, event_type);
-
- // In the future if we add native GTK accessibility support, the
- // notification should be sent here.
+ // Not implemented on GTK.
}
ViewAccessibilityWrapper* View::GetViewAccessibilityWrapper() {
diff --git a/views/view_unittest.cc b/views/view_unittest.cc
index baca2c3..008a2a5 100644
--- a/views/view_unittest.cc
+++ b/views/view_unittest.cc
@@ -686,8 +686,6 @@ class TestViewsDelegate : public views::ViewsDelegate {
bool* maximized) const {
return false;
}
- virtual void NotifyAccessibilityEvent(
- views::View* view, AccessibilityTypes::Event event_type) {}
virtual HICON GetDefaultWindowIcon() const {
return NULL;
}
diff --git a/views/view_win.cc b/views/view_win.cc
index bbbe90e..3079b5c 100644
--- a/views/view_win.cc
+++ b/views/view_win.cc
@@ -11,7 +11,6 @@
#include "views/accessibility/view_accessibility.h"
#include "views/accessibility/view_accessibility_wrapper.h"
#include "views/border.h"
-#include "views/views_delegate.h"
#include "views/widget/root_view.h"
#include "views/widget/widget.h"
#include "views/widget/widget_win.h"
@@ -31,26 +30,15 @@ int View::GetMenuShowDelay() {
return delay;
}
+// Notifies accessibility clients of the event_type on this view.
+// Clients will call get_accChild found in ViewAccessibility with the supplied
+// child id we generate here to retrieve the IAccessible associated with this
+// view.
void View::NotifyAccessibilityEvent(AccessibilityTypes::Event event_type) {
- NotifyAccessibilityEvent(event_type, true);
-}
-
-void View::NotifyAccessibilityEvent(AccessibilityTypes::Event event_type,
- bool send_native_event) {
- // Send the notification to the delegate.
- if (ViewsDelegate::views_delegate)
- ViewsDelegate::views_delegate->NotifyAccessibilityEvent(this, event_type);
-
- // Now call the Windows-specific method to notify MSAA clients of this
- // event. The widget gives us a temporary unique child ID to associate
- // with this view so that clients can call get_accChild in ViewAccessibility
- // to retrieve the IAccessible associated with this view.
- if (send_native_event) {
- WidgetWin* view_widget = static_cast<WidgetWin*>(GetWidget());
- int child_id = view_widget->AddAccessibilityViewEvent(this);
- ::NotifyWinEvent(ViewAccessibility::MSAAEvent(event_type),
- view_widget->GetNativeView(), OBJID_CLIENT, child_id);
- }
+ WidgetWin* view_widget = static_cast<WidgetWin*>(GetWidget());
+ int child_id = view_widget->AddAccessibilityViewEvent(this);
+ ::NotifyWinEvent(ViewAccessibility::MSAAEvent(event_type),
+ view_widget->GetNativeView(), OBJID_CLIENT, child_id);
}
ViewAccessibilityWrapper* View::GetViewAccessibilityWrapper() {
diff --git a/views/views_delegate.h b/views/views_delegate.h
index 27e4498..bc05b45 100644
--- a/views/views_delegate.h
+++ b/views/views_delegate.h
@@ -11,8 +11,6 @@
#include <windows.h>
#endif
-#include "views/accessibility/accessibility_types.h"
-
class Clipboard;
namespace gfx {
@@ -21,8 +19,6 @@ class Rect;
namespace views {
-class View;
-
// ViewsDelegate is an interface implemented by an object using the views
// framework. It is used to obtain various high level application utilities
// and perform some actions such as window placement saving.
@@ -52,11 +48,6 @@ class ViewsDelegate {
virtual bool GetSavedMaximizedState(const std::wstring& window_name,
bool* maximized) const = 0;
- // Notify the delegate that an accessibility event has happened in
- // a particular view.
- virtual void NotifyAccessibilityEvent(
- views::View* view, AccessibilityTypes::Event event_type) = 0;
-
#if defined(OS_WIN)
// Retrieves the default window icon to use for windows if none is specified.
virtual HICON GetDefaultWindowIcon() const = 0;