| 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 #include "content/shell/renderer/test_runner/MockColorChooser.h" | 5 #include "content/shell/renderer/test_runner/MockColorChooser.h" |
| 6 | 6 |
| 7 #include "content/shell/renderer/test_runner/WebTestDelegate.h" | 7 #include "content/shell/renderer/test_runner/WebTestDelegate.h" |
| 8 #include "content/shell/renderer/test_runner/WebTestProxy.h" | 8 #include "content/shell/renderer/test_runner/WebTestProxy.h" |
| 9 | 9 |
| 10 using namespace WebTestRunner; |
| 10 using namespace blink; | 11 using namespace blink; |
| 11 using namespace content; | |
| 12 using namespace std; | 12 using namespace std; |
| 13 | 13 |
| 14 namespace WebTestRunner { | 14 namespace content { |
| 15 | 15 |
| 16 namespace { | 16 namespace { |
| 17 class HostMethodTask : public WebMethodTask<MockColorChooser> { | 17 class HostMethodTask : public WebMethodTask<MockColorChooser> { |
| 18 public: | 18 public: |
| 19 typedef void (MockColorChooser::*CallbackMethodType)(); | 19 typedef void (MockColorChooser::*CallbackMethodType)(); |
| 20 HostMethodTask(MockColorChooser* object, CallbackMethodType callback) | 20 HostMethodTask(MockColorChooser* object, CallbackMethodType callback) |
| 21 : WebMethodTask<MockColorChooser>(object) | 21 : WebMethodTask<MockColorChooser>(object) |
| 22 , m_callback(callback) | 22 , m_callback(callback) |
| 23 { } | 23 { } |
| 24 | 24 |
| (...skipping 24 matching lines...) Expand all Loading... |
| 49 void MockColorChooser::endChooser() | 49 void MockColorChooser::endChooser() |
| 50 { | 50 { |
| 51 m_delegate->postDelayedTask(new HostMethodTask(this, &MockColorChooser::invo
keDidEndChooser), 0); | 51 m_delegate->postDelayedTask(new HostMethodTask(this, &MockColorChooser::invo
keDidEndChooser), 0); |
| 52 } | 52 } |
| 53 | 53 |
| 54 void MockColorChooser::invokeDidEndChooser() | 54 void MockColorChooser::invokeDidEndChooser() |
| 55 { | 55 { |
| 56 m_client->didEndChooser(); | 56 m_client->didEndChooser(); |
| 57 } | 57 } |
| 58 | 58 |
| 59 } | 59 } // namespace content |
| OLD | NEW |