OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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_WEB_AX_OBJECT_PROXY_H_ | 5 #ifndef CONTENT_SHELL_RENDERER_TEST_RUNNER_WEB_AX_OBJECT_PROXY_H_ |
6 #define CONTENT_SHELL_RENDERER_TEST_RUNNER_WEB_AX_OBJECT_PROXY_H_ | 6 #define CONTENT_SHELL_RENDERER_TEST_RUNNER_WEB_AX_OBJECT_PROXY_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 18 matching lines...) Expand all Loading... |
29 const blink::WebAXObject& object) = 0; | 29 const blink::WebAXObject& object) = 0; |
30 }; | 30 }; |
31 | 31 |
32 static gin::WrapperInfo kWrapperInfo; | 32 static gin::WrapperInfo kWrapperInfo; |
33 | 33 |
34 WebAXObjectProxy(const blink::WebAXObject& object, Factory* factory); | 34 WebAXObjectProxy(const blink::WebAXObject& object, Factory* factory); |
35 virtual ~WebAXObjectProxy(); | 35 virtual ~WebAXObjectProxy(); |
36 | 36 |
37 // gin::Wrappable: | 37 // gin::Wrappable: |
38 virtual gin::ObjectTemplateBuilder GetObjectTemplateBuilder( | 38 virtual gin::ObjectTemplateBuilder GetObjectTemplateBuilder( |
39 v8::Isolate* isolate) OVERRIDE; | 39 v8::Isolate* isolate) override; |
40 | 40 |
41 virtual v8::Handle<v8::Object> GetChildAtIndex(unsigned index); | 41 virtual v8::Handle<v8::Object> GetChildAtIndex(unsigned index); |
42 virtual bool IsRoot() const; | 42 virtual bool IsRoot() const; |
43 bool IsEqualToObject(const blink::WebAXObject& object); | 43 bool IsEqualToObject(const blink::WebAXObject& object); |
44 | 44 |
45 void NotificationReceived(blink::WebFrame* frame, | 45 void NotificationReceived(blink::WebFrame* frame, |
46 const std::string& notification_name); | 46 const std::string& notification_name); |
47 void Reset(); | 47 void Reset(); |
48 | 48 |
49 protected: | 49 protected: |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 | 133 |
134 v8::Persistent<v8::Function> notification_callback_; | 134 v8::Persistent<v8::Function> notification_callback_; |
135 | 135 |
136 DISALLOW_COPY_AND_ASSIGN(WebAXObjectProxy); | 136 DISALLOW_COPY_AND_ASSIGN(WebAXObjectProxy); |
137 }; | 137 }; |
138 | 138 |
139 class RootWebAXObjectProxy : public WebAXObjectProxy { | 139 class RootWebAXObjectProxy : public WebAXObjectProxy { |
140 public: | 140 public: |
141 RootWebAXObjectProxy(const blink::WebAXObject&, Factory*); | 141 RootWebAXObjectProxy(const blink::WebAXObject&, Factory*); |
142 | 142 |
143 virtual v8::Handle<v8::Object> GetChildAtIndex(unsigned index) OVERRIDE; | 143 virtual v8::Handle<v8::Object> GetChildAtIndex(unsigned index) override; |
144 virtual bool IsRoot() const OVERRIDE; | 144 virtual bool IsRoot() const override; |
145 }; | 145 }; |
146 | 146 |
147 | 147 |
148 // Provides simple lifetime management of the WebAXObjectProxy instances: all | 148 // Provides simple lifetime management of the WebAXObjectProxy instances: all |
149 // WebAXObjectProxys ever created from the controller are stored in a list and | 149 // WebAXObjectProxys ever created from the controller are stored in a list and |
150 // cleared explicitly. | 150 // cleared explicitly. |
151 class WebAXObjectProxyList : public WebAXObjectProxy::Factory { | 151 class WebAXObjectProxyList : public WebAXObjectProxy::Factory { |
152 public: | 152 public: |
153 WebAXObjectProxyList(); | 153 WebAXObjectProxyList(); |
154 virtual ~WebAXObjectProxyList(); | 154 virtual ~WebAXObjectProxyList(); |
155 | 155 |
156 void Clear(); | 156 void Clear(); |
157 virtual v8::Handle<v8::Object> GetOrCreate( | 157 virtual v8::Handle<v8::Object> GetOrCreate( |
158 const blink::WebAXObject&) OVERRIDE; | 158 const blink::WebAXObject&) override; |
159 v8::Handle<v8::Object> CreateRoot(const blink::WebAXObject&); | 159 v8::Handle<v8::Object> CreateRoot(const blink::WebAXObject&); |
160 | 160 |
161 private: | 161 private: |
162 typedef v8::PersistentValueVector<v8::Object> ElementList; | 162 typedef v8::PersistentValueVector<v8::Object> ElementList; |
163 ElementList elements_; | 163 ElementList elements_; |
164 }; | 164 }; |
165 | 165 |
166 } // namespace content | 166 } // namespace content |
167 | 167 |
168 #endif // CONTENT_SHELL_RENDERER_TEST_RUNNER_WEB_AX_OBJECT_PROXY_H_ | 168 #endif // CONTENT_SHELL_RENDERER_TEST_RUNNER_WEB_AX_OBJECT_PROXY_H_ |
OLD | NEW |