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

Side by Side Diff: Source/testing/runner/WebAXObjectProxy.h

Issue 61773005: Rename WebKit namespace to blink (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 24 matching lines...) Expand all
35 #include "public/web/WebAXObject.h" 35 #include "public/web/WebAXObject.h"
36 #include <vector> 36 #include <vector>
37 37
38 namespace WebTestRunner { 38 namespace WebTestRunner {
39 39
40 class WebAXObjectProxy : public CppBoundClass { 40 class WebAXObjectProxy : public CppBoundClass {
41 public: 41 public:
42 class Factory { 42 class Factory {
43 public: 43 public:
44 virtual ~Factory() { } 44 virtual ~Factory() { }
45 virtual WebAXObjectProxy* getOrCreate(const WebKit::WebAXObject&) = 0; 45 virtual WebAXObjectProxy* getOrCreate(const blink::WebAXObject&) = 0;
46 }; 46 };
47 47
48 WebAXObjectProxy(const WebKit::WebAXObject&, Factory*); 48 WebAXObjectProxy(const blink::WebAXObject&, Factory*);
49 49
50 virtual WebAXObjectProxy* getChildAtIndex(unsigned); 50 virtual WebAXObjectProxy* getChildAtIndex(unsigned);
51 virtual bool isRoot() const { return false; } 51 virtual bool isRoot() const { return false; }
52 virtual bool isEqual(const WebKit::WebAXObject&); 52 virtual bool isEqual(const blink::WebAXObject&);
53 53
54 virtual void notificationReceived(const char *notificationName); 54 virtual void notificationReceived(const char *notificationName);
55 55
56 protected: 56 protected:
57 const WebKit::WebAXObject& accessibilityObject() const { return m_accessibil ityObject; } 57 const blink::WebAXObject& accessibilityObject() const { return m_accessibili tyObject; }
58 58
59 Factory* factory() const { return m_factory; } 59 Factory* factory() const { return m_factory; }
60 60
61 private: 61 private:
62 // Bound properties. 62 // Bound properties.
63 void roleGetterCallback(CppVariant*); 63 void roleGetterCallback(CppVariant*);
64 void titleGetterCallback(CppVariant*); 64 void titleGetterCallback(CppVariant*);
65 void descriptionGetterCallback(CppVariant*); 65 void descriptionGetterCallback(CppVariant*);
66 void helpTextGetterCallback(CppVariant*); 66 void helpTextGetterCallback(CppVariant*);
67 void stringValueGetterCallback(CppVariant*); 67 void stringValueGetterCallback(CppVariant*);
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 void removeNotificationListenerCallback(const CppArgumentList&, CppVariant*) ; 126 void removeNotificationListenerCallback(const CppArgumentList&, CppVariant*) ;
127 void takeFocusCallback(const CppArgumentList&, CppVariant*); 127 void takeFocusCallback(const CppArgumentList&, CppVariant*);
128 void scrollToMakeVisibleCallback(const CppArgumentList&, CppVariant*); 128 void scrollToMakeVisibleCallback(const CppArgumentList&, CppVariant*);
129 void scrollToMakeVisibleWithSubFocusCallback(const CppArgumentList&, CppVari ant*); 129 void scrollToMakeVisibleWithSubFocusCallback(const CppArgumentList&, CppVari ant*);
130 void scrollToGlobalPointCallback(const CppArgumentList&, CppVariant*); 130 void scrollToGlobalPointCallback(const CppArgumentList&, CppVariant*);
131 void wordStartCallback(const CppArgumentList&, CppVariant*); 131 void wordStartCallback(const CppArgumentList&, CppVariant*);
132 void wordEndCallback(const CppArgumentList&, CppVariant*); 132 void wordEndCallback(const CppArgumentList&, CppVariant*);
133 133
134 void fallbackCallback(const CppArgumentList&, CppVariant*); 134 void fallbackCallback(const CppArgumentList&, CppVariant*);
135 135
136 WebKit::WebAXObject m_accessibilityObject; 136 blink::WebAXObject m_accessibilityObject;
137 Factory* m_factory; 137 Factory* m_factory;
138 std::vector<CppVariant> m_notificationCallbacks; 138 std::vector<CppVariant> m_notificationCallbacks;
139 }; 139 };
140 140
141 141
142 class RootWebAXObjectProxy : public WebAXObjectProxy { 142 class RootWebAXObjectProxy : public WebAXObjectProxy {
143 public: 143 public:
144 RootWebAXObjectProxy(const WebKit::WebAXObject&, Factory*); 144 RootWebAXObjectProxy(const blink::WebAXObject&, Factory*);
145 145
146 virtual WebAXObjectProxy* getChildAtIndex(unsigned); 146 virtual WebAXObjectProxy* getChildAtIndex(unsigned);
147 virtual bool isRoot() const { return true; } 147 virtual bool isRoot() const { return true; }
148 }; 148 };
149 149
150 150
151 // Provides simple lifetime management of the WebAXObjectProxy instances: 151 // Provides simple lifetime management of the WebAXObjectProxy instances:
152 // all WebAXObjectProxys ever created from the controller are stored in 152 // all WebAXObjectProxys ever created from the controller are stored in
153 // a list and cleared explicitly. 153 // a list and cleared explicitly.
154 class WebAXObjectProxyList : public WebAXObjectProxy::Factory { 154 class WebAXObjectProxyList : public WebAXObjectProxy::Factory {
155 public: 155 public:
156 WebAXObjectProxyList() { } 156 WebAXObjectProxyList() { }
157 virtual ~WebAXObjectProxyList(); 157 virtual ~WebAXObjectProxyList();
158 158
159 void clear(); 159 void clear();
160 virtual WebAXObjectProxy* getOrCreate(const WebKit::WebAXObject&); 160 virtual WebAXObjectProxy* getOrCreate(const blink::WebAXObject&);
161 WebAXObjectProxy* createRoot(const WebKit::WebAXObject&); 161 WebAXObjectProxy* createRoot(const blink::WebAXObject&);
162 162
163 private: 163 private:
164 typedef std::vector<WebAXObjectProxy*> ElementList; 164 typedef std::vector<WebAXObjectProxy*> ElementList;
165 ElementList m_elements; 165 ElementList m_elements;
166 }; 166 };
167 167
168 } 168 }
169 169
170 #endif // WebAXObjectProxy_h 170 #endif // WebAXObjectProxy_h
OLDNEW
« no previous file with comments | « Source/testing/runner/TextInputController.cpp ('k') | Source/testing/runner/WebAXObjectProxy.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698