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

Side by Side Diff: content/shell/test_runner/web_ax_object_proxy.h

Issue 2923053002: Move MainWorldScriptContext accessor/method from WebFrame to WebLocalFrame. (Closed)
Patch Set: Rebasing... Created 3 years, 6 months 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
OLDNEW
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_TEST_RUNNER_WEB_AX_OBJECT_PROXY_H_ 5 #ifndef CONTENT_SHELL_TEST_RUNNER_WEB_AX_OBJECT_PROXY_H_
6 #define CONTENT_SHELL_TEST_RUNNER_WEB_AX_OBJECT_PROXY_H_ 6 #define CONTENT_SHELL_TEST_RUNNER_WEB_AX_OBJECT_PROXY_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string> 10 #include <string>
11 11
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "gin/object_template_builder.h" 13 #include "gin/object_template_builder.h"
14 #include "gin/wrappable.h" 14 #include "gin/wrappable.h"
15 #include "third_party/WebKit/public/web/WebAXObject.h" 15 #include "third_party/WebKit/public/web/WebAXObject.h"
16 #include "v8/include/v8-util.h" 16 #include "v8/include/v8-util.h"
17 #include "v8/include/v8.h" 17 #include "v8/include/v8.h"
18 18
19 namespace blink { 19 namespace blink {
20 class WebFrame; 20 class WebLocalFrame;
21 } 21 }
22 22
23 namespace test_runner { 23 namespace test_runner {
24 24
25 class WebAXObjectProxy : public gin::Wrappable<WebAXObjectProxy> { 25 class WebAXObjectProxy : public gin::Wrappable<WebAXObjectProxy> {
26 public: 26 public:
27 class Factory { 27 class Factory {
28 public: 28 public:
29 virtual ~Factory() {} 29 virtual ~Factory() {}
30 virtual v8::Local<v8::Object> GetOrCreate( 30 virtual v8::Local<v8::Object> GetOrCreate(
31 const blink::WebAXObject& object) = 0; 31 const blink::WebAXObject& object) = 0;
32 }; 32 };
33 33
34 static gin::WrapperInfo kWrapperInfo; 34 static gin::WrapperInfo kWrapperInfo;
35 35
36 WebAXObjectProxy(const blink::WebAXObject& object, Factory* factory); 36 WebAXObjectProxy(const blink::WebAXObject& object, Factory* factory);
37 ~WebAXObjectProxy() override; 37 ~WebAXObjectProxy() override;
38 38
39 // gin::Wrappable: 39 // gin::Wrappable:
40 gin::ObjectTemplateBuilder GetObjectTemplateBuilder( 40 gin::ObjectTemplateBuilder GetObjectTemplateBuilder(
41 v8::Isolate* isolate) override; 41 v8::Isolate* isolate) override;
42 42
43 virtual v8::Local<v8::Object> GetChildAtIndex(unsigned index); 43 virtual v8::Local<v8::Object> GetChildAtIndex(unsigned index);
44 virtual bool IsRoot() const; 44 virtual bool IsRoot() const;
45 bool IsEqualToObject(const blink::WebAXObject& object); 45 bool IsEqualToObject(const blink::WebAXObject& object);
46 46
47 void NotificationReceived(blink::WebFrame* frame, 47 void NotificationReceived(blink::WebLocalFrame* frame,
48 const std::string& notification_name); 48 const std::string& notification_name);
49 void Reset(); 49 void Reset();
50 50
51 protected: 51 protected:
52 const blink::WebAXObject& accessibility_object() const { 52 const blink::WebAXObject& accessibility_object() const {
53 return accessibility_object_; 53 return accessibility_object_;
54 } 54 }
55 55
56 Factory* factory() const { return factory_; } 56 Factory* factory() const { return factory_; }
57 57
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 v8::Local<v8::Object> GetOrCreate(const blink::WebAXObject&) override; 237 v8::Local<v8::Object> GetOrCreate(const blink::WebAXObject&) override;
238 238
239 private: 239 private:
240 typedef v8::PersistentValueVector<v8::Object> ElementList; 240 typedef v8::PersistentValueVector<v8::Object> ElementList;
241 ElementList elements_; 241 ElementList elements_;
242 }; 242 };
243 243
244 } // namespace test_runner 244 } // namespace test_runner
245 245
246 #endif // CONTENT_SHELL_TEST_RUNNER_WEB_AX_OBJECT_PROXY_H_ 246 #endif // CONTENT_SHELL_TEST_RUNNER_WEB_AX_OBJECT_PROXY_H_
OLDNEW
« no previous file with comments | « content/shell/test_runner/test_runner_for_specific_view.cc ('k') | content/shell/test_runner/web_ax_object_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698