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

Side by Side Diff: content/shell/renderer/test_runner/WebTestProxy.h

Issue 123243002: Replace WebNonCopyable with DISALLOW_COPY_AND_ASSIGN in test runner library (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updates Created 6 years, 11 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 | Annotate | Revision Log
OLDNEW
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 WebTestProxy_h 5 #ifndef WebTestProxy_h
6 #define WebTestProxy_h 6 #define WebTestProxy_h
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
11 #include "base/basictypes.h"
11 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
12 #include "content/shell/renderer/test_runner/WebTask.h" 13 #include "content/shell/renderer/test_runner/WebTask.h"
13 #include "third_party/WebKit/public/platform/WebNonCopyable.h"
14 #include "third_party/WebKit/public/platform/WebRect.h" 14 #include "third_party/WebKit/public/platform/WebRect.h"
15 #include "third_party/WebKit/public/platform/WebURLError.h" 15 #include "third_party/WebKit/public/platform/WebURLError.h"
16 #include "third_party/WebKit/public/platform/WebURLRequest.h" 16 #include "third_party/WebKit/public/platform/WebURLRequest.h"
17 #include "third_party/WebKit/public/web/WebAXEnums.h" 17 #include "third_party/WebKit/public/web/WebAXEnums.h"
18 #include "third_party/WebKit/public/web/WebDOMMessageEvent.h" 18 #include "third_party/WebKit/public/web/WebDOMMessageEvent.h"
19 #include "third_party/WebKit/public/web/WebDataSource.h" 19 #include "third_party/WebKit/public/web/WebDataSource.h"
20 #include "third_party/WebKit/public/web/WebDragOperation.h" 20 #include "third_party/WebKit/public/web/WebDragOperation.h"
21 #include "third_party/WebKit/public/web/WebIconURL.h" 21 #include "third_party/WebKit/public/web/WebIconURL.h"
22 #include "third_party/WebKit/public/web/WebNavigationPolicy.h" 22 #include "third_party/WebKit/public/web/WebNavigationPolicy.h"
23 #include "third_party/WebKit/public/web/WebNavigationType.h" 23 #include "third_party/WebKit/public/web/WebNavigationType.h"
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 std::map<unsigned, blink::WebURLRequest> m_requestMap; 223 std::map<unsigned, blink::WebURLRequest> m_requestMap;
224 224
225 bool m_logConsoleOutput; 225 bool m_logConsoleOutput;
226 int m_chooserCount; 226 int m_chooserCount;
227 227
228 scoped_ptr<blink::WebGeolocationClientMock> m_geolocationClient; 228 scoped_ptr<blink::WebGeolocationClientMock> m_geolocationClient;
229 scoped_ptr<blink::WebMIDIClientMock> m_midiClient; 229 scoped_ptr<blink::WebMIDIClientMock> m_midiClient;
230 scoped_ptr<MockWebSpeechRecognizer> m_speechRecognizer; 230 scoped_ptr<MockWebSpeechRecognizer> m_speechRecognizer;
231 scoped_ptr<MockWebSpeechInputController> m_speechInputController; 231 scoped_ptr<MockWebSpeechInputController> m_speechInputController;
232 232
233 // FIXME:: We want to move away from this pattern and mark classes
234 // as Noncopyable, but this class is marked as WEBTESTRUNNER_EXPORT
235 // while WebNonCopyable is not, so we cannot inherit from WebNonCopyable.
236 // To overcome the problem, for now not inheriting from WebNonCopyable
237 // but plan to fix it when we make the change of making WebNonCopyable
238 // a macro rather than class. We will have a single way to mark all classes
239 // as Noncopyable.
240 // Tracked under: http://code.google.com/p/chromium/issues/detail?id=229178
241 private: 233 private:
242 WebTestProxyBase(WebTestProxyBase&); 234 DISALLOW_COPY_AND_ASSIGN(WebTestProxyBase);
243 WebTestProxyBase& operator=(const WebTestProxyBase&);
244 }; 235 };
245 236
246 // Use this template to inject methods into your WebViewClient/WebFrameClient 237 // Use this template to inject methods into your WebViewClient/WebFrameClient
247 // implementation required for the running layout tests. 238 // implementation required for the running layout tests.
248 template<class Base, typename T> 239 template<class Base, typename T>
249 class WebTestProxy : public Base, public WebTestProxyBase, public blink::WebNonC opyable { 240 class WebTestProxy : public Base, public WebTestProxyBase {
250 public: 241 public:
251 explicit WebTestProxy(T t) 242 explicit WebTestProxy(T t)
252 : Base(t) 243 : Base(t)
253 { 244 {
254 } 245 }
255 246
256 virtual ~WebTestProxy() { } 247 virtual ~WebTestProxy() { }
257 248
258 // WebViewClient implementation. 249 // WebViewClient implementation.
259 virtual void didInvalidateRect(const blink::WebRect& rect) 250 virtual void didInvalidateRect(const blink::WebRect& rect)
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
529 WebTestProxyBase::hideValidationMessage(); 520 WebTestProxyBase::hideValidationMessage();
530 } 521 }
531 virtual void moveValidationMessage(const blink::WebRect& anchorInRootView) 522 virtual void moveValidationMessage(const blink::WebRect& anchorInRootView)
532 { 523 {
533 WebTestProxyBase::moveValidationMessage(anchorInRootView); 524 WebTestProxyBase::moveValidationMessage(anchorInRootView);
534 } 525 }
535 virtual void postSpellCheckEvent(const blink::WebString& eventName) 526 virtual void postSpellCheckEvent(const blink::WebString& eventName)
536 { 527 {
537 WebTestProxyBase::postSpellCheckEvent(eventName); 528 WebTestProxyBase::postSpellCheckEvent(eventName);
538 } 529 }
530
531 private:
532 DISALLOW_COPY_AND_ASSIGN(WebTestProxy);
539 }; 533 };
540 534
541 } 535 }
542 536
543 #endif // WebTestProxy_h 537 #endif // WebTestProxy_h
OLDNEW
« no previous file with comments | « content/shell/renderer/test_runner/WebPermissions.h ('k') | content/shell/renderer/test_runner/WebTestThemeControlWin.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698