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

Side by Side Diff: content/browser/accessibility/accessibility_event_recorder.h

Issue 790943002: Add DumpAccessibilityEvents test framework. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@dump_acc_events_1
Patch Set: Fix compile errors Created 6 years 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 unified diff | Download patch
« no previous file with comments | « no previous file | content/browser/accessibility/accessibility_event_recorder.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_BROWSER_ACCESSIBILITY_ACCESSIBILITY_EVENT_RECORDER_H_
6 #define CONTENT_BROWSER_ACCESSIBILITY_ACCESSIBILITY_EVENT_RECORDER_H_
7
8 #include <string>
9 #include <vector>
10
11 #include "base/macros.h"
12 #include "content/common/content_export.h"
13
14 namespace content {
15
16 class BrowserAccessibilityManager;
17
18 // Listens for native accessibility events fired by a given
19 // BrowserAccessibilityManager and saves human-readable log strings for
20 // each event fired to a vector. Construct an instance of this class to
21 // begin listening, call GetEventLogs() to get all of the logs so far, and
22 // destroy it to stop listening.
23 //
24 // A log string should be of the form "<event> on <node>" where <event> is
25 // the name of the event fired (platform-specific) and <node> is information
26 // about the accessibility node on which the event was fired, for example its
27 // role and name.
28 //
29 // The implementation is highly platform-specific; a subclass is needed for
30 // each platform does most of the work.
31 class AccessibilityEventRecorder {
32 public:
33 // Construct the right platform-specific subclass.
34 static AccessibilityEventRecorder* Create(
35 BrowserAccessibilityManager* manager);
36 virtual ~AccessibilityEventRecorder();
37
38 // Access the vector of human-readable event logs, one string per event.
39 const std::vector<std::string>& event_logs() { return event_logs_; }
40
41 protected:
42 explicit AccessibilityEventRecorder(BrowserAccessibilityManager* manager);
43
44 BrowserAccessibilityManager* manager_;
45 std::vector<std::string> event_logs_;
46
47 DISALLOW_COPY_AND_ASSIGN(AccessibilityEventRecorder);
48 };
49
50 } // namespace content
51
52 #endif // CONTENT_BROWSER_ACCESSIBILITY_ACCESSIBILITY_EVENT_RECORDER_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/accessibility/accessibility_event_recorder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698