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_webrtc_data_channel_handler.h" | 5 #include "components/test_runner/mock_webrtc_data_channel_handler.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "content/shell/renderer/test_runner/web_test_delegate.h" | 8 #include "components/test_runner/web_test_delegate.h" |
9 #include "third_party/WebKit/public/platform/WebRTCDataChannelHandlerClient.h" | 9 #include "third_party/WebKit/public/platform/WebRTCDataChannelHandlerClient.h" |
10 | 10 |
11 using namespace blink; | 11 using namespace blink; |
12 | 12 |
13 namespace content { | 13 namespace content { |
14 | 14 |
15 class DataChannelReadyStateTask | 15 class DataChannelReadyStateTask |
16 : public WebMethodTask<MockWebRTCDataChannelHandler> { | 16 : public WebMethodTask<MockWebRTCDataChannelHandler> { |
17 public: | 17 public: |
18 DataChannelReadyStateTask(MockWebRTCDataChannelHandler* object, | 18 DataChannelReadyStateTask(MockWebRTCDataChannelHandler* object, |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 return true; | 103 return true; |
104 } | 104 } |
105 | 105 |
106 void MockWebRTCDataChannelHandler::close() { | 106 void MockWebRTCDataChannelHandler::close() { |
107 DCHECK(client_); | 107 DCHECK(client_); |
108 delegate_->PostTask(new DataChannelReadyStateTask( | 108 delegate_->PostTask(new DataChannelReadyStateTask( |
109 this, client_, WebRTCDataChannelHandlerClient::ReadyStateClosed)); | 109 this, client_, WebRTCDataChannelHandlerClient::ReadyStateClosed)); |
110 } | 110 } |
111 | 111 |
112 } // namespace content | 112 } // namespace content |
OLD | NEW |