OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 11 matching lines...) Expand all Loading... |
22 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 22 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
23 */ | 23 */ |
24 | 24 |
25 #include "MockWebRTCDataChannelHandler.h" | 25 #include "MockWebRTCDataChannelHandler.h" |
26 | 26 |
27 #include "public/platform/WebRTCDataChannelHandlerClient.h" | 27 #include "public/platform/WebRTCDataChannelHandlerClient.h" |
28 #include "public/platform/WebRTCDataChannelInit.h" | 28 #include "public/platform/WebRTCDataChannelInit.h" |
29 #include "public/testing/WebTestDelegate.h" | 29 #include "public/testing/WebTestDelegate.h" |
30 #include <assert.h> | 30 #include <assert.h> |
31 | 31 |
32 using namespace WebKit; | 32 using namespace blink; |
33 | 33 |
34 namespace WebTestRunner { | 34 namespace WebTestRunner { |
35 | 35 |
36 class DataChannelReadyStateTask : public WebMethodTask<MockWebRTCDataChannelHand
ler> { | 36 class DataChannelReadyStateTask : public WebMethodTask<MockWebRTCDataChannelHand
ler> { |
37 public: | 37 public: |
38 DataChannelReadyStateTask(MockWebRTCDataChannelHandler* object, WebRTCDataCh
annelHandlerClient* dataChannelClient, WebRTCDataChannelHandlerClient::ReadyStat
e state) | 38 DataChannelReadyStateTask(MockWebRTCDataChannelHandler* object, WebRTCDataCh
annelHandlerClient* dataChannelClient, WebRTCDataChannelHandlerClient::ReadyStat
e state) |
39 : WebMethodTask<MockWebRTCDataChannelHandler>(object) | 39 : WebMethodTask<MockWebRTCDataChannelHandler>(object) |
40 , m_dataChannelClient(dataChannelClient) | 40 , m_dataChannelClient(dataChannelClient) |
41 , m_state(state) | 41 , m_state(state) |
42 { | 42 { |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 return true; | 119 return true; |
120 } | 120 } |
121 | 121 |
122 void MockWebRTCDataChannelHandler::close() | 122 void MockWebRTCDataChannelHandler::close() |
123 { | 123 { |
124 assert(m_client); | 124 assert(m_client); |
125 m_delegate->postTask(new DataChannelReadyStateTask(this, m_client, WebRTCDat
aChannelHandlerClient::ReadyStateClosed)); | 125 m_delegate->postTask(new DataChannelReadyStateTask(this, m_client, WebRTCDat
aChannelHandlerClient::ReadyStateClosed)); |
126 } | 126 } |
127 | 127 |
128 } | 128 } |
OLD | NEW |