| 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_MOCKCOLORCHOOSER_H_ | 5 #ifndef CONTENT_SHELL_RENDERER_TEST_RUNNER_MOCKCOLORCHOOSER_H_ |
| 6 #define CONTENT_SHELL_RENDERER_TEST_RUNNER_MOCKCOLORCHOOSER_H_ | 6 #define CONTENT_SHELL_RENDERER_TEST_RUNNER_MOCKCOLORCHOOSER_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "content/shell/renderer/test_runner/TestCommon.h" | 9 #include "content/shell/renderer/test_runner/TestCommon.h" |
| 10 #include "content/shell/renderer/test_runner/WebTask.h" | 10 #include "content/shell/renderer/test_runner/WebTask.h" |
| 11 #include "third_party/WebKit/public/web/WebColorChooser.h" | 11 #include "third_party/WebKit/public/web/WebColorChooser.h" |
| 12 #include "third_party/WebKit/public/web/WebColorChooserClient.h" | 12 #include "third_party/WebKit/public/web/WebColorChooserClient.h" |
| 13 | 13 |
| 14 namespace WebTestRunner { | |
| 15 class WebTestDelegate; | |
| 16 } | |
| 17 | |
| 18 namespace content { | 14 namespace content { |
| 19 | 15 |
| 16 class WebTestDelegate; |
| 20 class WebTestProxyBase; | 17 class WebTestProxyBase; |
| 21 | 18 |
| 22 class MockColorChooser : public blink::WebColorChooser { | 19 class MockColorChooser : public blink::WebColorChooser { |
| 23 public: | 20 public: |
| 24 MockColorChooser(blink::WebColorChooserClient*, WebTestRunner::WebTestDelega
te*, content::WebTestProxyBase*); | 21 MockColorChooser(blink::WebColorChooserClient*, WebTestDelegate*, WebTestPro
xyBase*); |
| 25 virtual ~MockColorChooser(); | 22 virtual ~MockColorChooser(); |
| 26 | 23 |
| 27 // blink::WebColorChooser implementation. | 24 // blink::WebColorChooser implementation. |
| 28 virtual void setSelectedColor(const blink::WebColor) OVERRIDE; | 25 virtual void setSelectedColor(const blink::WebColor) OVERRIDE; |
| 29 virtual void endChooser() OVERRIDE; | 26 virtual void endChooser() OVERRIDE; |
| 30 | 27 |
| 31 void invokeDidEndChooser(); | 28 void invokeDidEndChooser(); |
| 32 WebTestRunner::WebTaskList* taskList() { return &m_taskList; } | 29 WebTaskList* taskList() { return &m_taskList; } |
| 33 | 30 |
| 34 private: | 31 private: |
| 35 blink::WebColorChooserClient* m_client; | 32 blink::WebColorChooserClient* m_client; |
| 36 WebTestRunner::WebTestDelegate* m_delegate; | 33 WebTestDelegate* m_delegate; |
| 37 content::WebTestProxyBase* m_proxy; | 34 WebTestProxyBase* m_proxy; |
| 38 WebTestRunner::WebTaskList m_taskList; | 35 WebTaskList m_taskList; |
| 39 | 36 |
| 40 DISALLOW_COPY_AND_ASSIGN(MockColorChooser); | 37 DISALLOW_COPY_AND_ASSIGN(MockColorChooser); |
| 41 }; | 38 }; |
| 42 | 39 |
| 43 } // namespace content | 40 } // namespace content |
| 44 | 41 |
| 45 #endif // CONTENT_SHELL_RENDERER_TEST_RUNNER_MOCKCOLORCHOOSER_H_ | 42 #endif // CONTENT_SHELL_RENDERER_TEST_RUNNER_MOCKCOLORCHOOSER_H_ |
| OLD | NEW |