OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CONTENT_SHELL_RENDERER_TEST_RUNNER_WEBAXOBJECTPROXY_H_ | 5 #ifndef CONTENT_SHELL_RENDERER_TEST_RUNNER_WEBAXOBJECTPROXY_H_ |
6 #define CONTENT_SHELL_RENDERER_TEST_RUNNER_WEBAXOBJECTPROXY_H_ | 6 #define CONTENT_SHELL_RENDERER_TEST_RUNNER_WEBAXOBJECTPROXY_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "content/shell/renderer/test_runner/CppBoundClass.h" | 10 #include "content/shell/renderer/test_runner/CppBoundClass.h" |
11 #include "third_party/WebKit/public/web/WebAXObject.h" | 11 #include "third_party/WebKit/public/web/WebAXObject.h" |
12 | 12 |
13 namespace WebTestRunner { | 13 namespace WebTestRunner { |
14 | 14 |
15 class WebAXObjectProxy : public CppBoundClass { | 15 class WebAXObjectProxy : public CppBoundClass { |
16 public: | 16 public: |
17 class Factory { | 17 class Factory { |
18 public: | 18 public: |
19 virtual ~Factory() { } | 19 virtual ~Factory() { } |
20 virtual WebAXObjectProxy* getOrCreate(const blink::WebAXObject&) = 0; | 20 virtual WebAXObjectProxy* getOrCreate(const blink::WebAXObject&) = 0; |
21 }; | 21 }; |
22 | 22 |
23 WebAXObjectProxy(const blink::WebAXObject&, Factory*); | 23 WebAXObjectProxy(const blink::WebAXObject&, Factory*); |
24 virtual ~WebAXObjectProxy(); | 24 virtual ~WebAXObjectProxy(); |
25 | 25 |
26 virtual WebAXObjectProxy* getChildAtIndex(unsigned); | 26 virtual WebAXObjectProxy* getChildAtIndex(unsigned); |
27 virtual bool isRoot() const; | 27 virtual bool isRoot() const; |
28 virtual bool isEqual(const blink::WebAXObject&); | 28 bool isEqual(const blink::WebAXObject&); |
29 | 29 |
30 virtual void notificationReceived(const char *notificationName); | 30 void notificationReceived(const char *notificationName); |
31 | 31 |
32 protected: | 32 protected: |
33 const blink::WebAXObject& accessibilityObject() const { return m_accessibili
tyObject; } | 33 const blink::WebAXObject& accessibilityObject() const { return m_accessibili
tyObject; } |
34 | 34 |
35 Factory* factory() const { return m_factory; } | 35 Factory* factory() const { return m_factory; } |
36 | 36 |
37 private: | 37 private: |
38 // Bound properties. | 38 // Bound properties. |
39 void roleGetterCallback(CppVariant*); | 39 void roleGetterCallback(CppVariant*); |
40 void titleGetterCallback(CppVariant*); | 40 void titleGetterCallback(CppVariant*); |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 WebAXObjectProxy* createRoot(const blink::WebAXObject&); | 137 WebAXObjectProxy* createRoot(const blink::WebAXObject&); |
138 | 138 |
139 private: | 139 private: |
140 typedef std::vector<WebAXObjectProxy*> ElementList; | 140 typedef std::vector<WebAXObjectProxy*> ElementList; |
141 ElementList m_elements; | 141 ElementList m_elements; |
142 }; | 142 }; |
143 | 143 |
144 } | 144 } |
145 | 145 |
146 #endif // CONTENT_SHELL_RENDERER_TEST_RUNNER_WEBAXOBJECTPROXY_H_ | 146 #endif // CONTENT_SHELL_RENDERER_TEST_RUNNER_WEBAXOBJECTPROXY_H_ |
OLD | NEW |