| OLD | NEW |
| 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 #include "content/shell/renderer/test_runner/mock_color_chooser.h" | 5 #include "components/test_runner/mock_color_chooser.h" |
| 6 | 6 |
| 7 #include "content/shell/renderer/test_runner/web_test_delegate.h" | 7 #include "components/test_runner/web_test_delegate.h" |
| 8 #include "content/shell/renderer/test_runner/web_test_proxy.h" | 8 #include "components/test_runner/web_test_proxy.h" |
| 9 | 9 |
| 10 namespace content { | 10 namespace content { |
| 11 | 11 |
| 12 namespace { | 12 namespace { |
| 13 class HostMethodTask : public WebMethodTask<MockColorChooser> { | 13 class HostMethodTask : public WebMethodTask<MockColorChooser> { |
| 14 public: | 14 public: |
| 15 typedef void (MockColorChooser::*CallbackMethodType)(); | 15 typedef void (MockColorChooser::*CallbackMethodType)(); |
| 16 HostMethodTask(MockColorChooser* object, CallbackMethodType callback) | 16 HostMethodTask(MockColorChooser* object, CallbackMethodType callback) |
| 17 : WebMethodTask<MockColorChooser>(object), | 17 : WebMethodTask<MockColorChooser>(object), |
| 18 callback_(callback) {} | 18 callback_(callback) {} |
| (...skipping 24 matching lines...) Expand all Loading... |
| 43 void MockColorChooser::endChooser() { | 43 void MockColorChooser::endChooser() { |
| 44 delegate_->PostDelayedTask( | 44 delegate_->PostDelayedTask( |
| 45 new HostMethodTask(this, &MockColorChooser::InvokeDidEndChooser), 0); | 45 new HostMethodTask(this, &MockColorChooser::InvokeDidEndChooser), 0); |
| 46 } | 46 } |
| 47 | 47 |
| 48 void MockColorChooser::InvokeDidEndChooser() { | 48 void MockColorChooser::InvokeDidEndChooser() { |
| 49 client_->didEndChooser(); | 49 client_->didEndChooser(); |
| 50 } | 50 } |
| 51 | 51 |
| 52 } // namespace content | 52 } // namespace content |
| OLD | NEW |