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

Unified Diff: ash/test/ash_test_views_delegate.h

Issue 2493923002: Select-to-speak event handler (Closed)
Patch Set: Fix presubmit warning Created 4 years, 1 month 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
« no previous file with comments | « ash/test/ash_test_helper.h ('k') | ash/test/ash_test_views_delegate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/test/ash_test_views_delegate.h
diff --git a/ash/test/ash_test_views_delegate.h b/ash/test/ash_test_views_delegate.h
index d5e8fa53bc61a8c54204c7c2841981967ddb4fe1..f15394655084cf95b1b653f48645bfc821beedeb 100644
--- a/ash/test/ash_test_views_delegate.h
+++ b/ash/test/ash_test_views_delegate.h
@@ -11,6 +11,14 @@
namespace ash {
namespace test {
+class TestAccessibilityEventDelegate {
+ public:
+ TestAccessibilityEventDelegate() {}
+ virtual ~TestAccessibilityEventDelegate() {}
+ virtual void NotifyAccessibilityEvent(views::View* view,
+ ui::AXEvent event_type) = 0;
+};
+
// Ash specific ViewsDelegate. In addition to creating a TestWebContents this
// parents widget with no parent/context to the shell. This is created by
// default AshTestHelper.
@@ -19,12 +27,23 @@ class AshTestViewsDelegate : public views::TestViewsDelegate {
AshTestViewsDelegate();
~AshTestViewsDelegate() override;
+ // Not owned.
+ void set_test_accessibility_event_delegate(
+ TestAccessibilityEventDelegate* test_accessibility_event_delegate) {
+ test_accessibility_event_delegate_ = test_accessibility_event_delegate;
+ }
+
// Overriden from TestViewsDelegate.
void OnBeforeWidgetInit(
views::Widget::InitParams* params,
views::internal::NativeWidgetDelegate* delegate) override;
+ void NotifyAccessibilityEvent(views::View* view,
+ ui::AXEvent event_type) override;
private:
+ // Not owned.
+ TestAccessibilityEventDelegate* test_accessibility_event_delegate_ = nullptr;
+
DISALLOW_COPY_AND_ASSIGN(AshTestViewsDelegate);
};
« no previous file with comments | « ash/test/ash_test_helper.h ('k') | ash/test/ash_test_views_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698