| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "build/build_config.h" | 5 #include "build/build_config.h" |
| 6 | 6 |
| 7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
| 8 #include <windows.h> | 8 #include <windows.h> |
| 9 #endif | 9 #endif |
| 10 | 10 |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 // Destroy the channel proxy before shutting down the thread. | 119 // Destroy the channel proxy before shutting down the thread. |
| 120 DestroyChannelProxy(); | 120 DestroyChannelProxy(); |
| 121 thread.Stop(); | 121 thread.Stop(); |
| 122 } | 122 } |
| 123 | 123 |
| 124 class ChannelListenerWithOnConnectedSend : public IPC::TestChannelListener { | 124 class ChannelListenerWithOnConnectedSend : public IPC::TestChannelListener { |
| 125 public: | 125 public: |
| 126 ChannelListenerWithOnConnectedSend() {} | 126 ChannelListenerWithOnConnectedSend() {} |
| 127 ~ChannelListenerWithOnConnectedSend() override {} | 127 ~ChannelListenerWithOnConnectedSend() override {} |
| 128 | 128 |
| 129 void OnChannelConnected(int32 peer_pid) override { | 129 void OnChannelConnected(int32_t peer_pid) override { |
| 130 SendNextMessage(); | 130 SendNextMessage(); |
| 131 } | 131 } |
| 132 }; | 132 }; |
| 133 | 133 |
| 134 #if defined(OS_WIN) || defined(OS_ANDROID) | 134 #if defined(OS_WIN) || defined(OS_ANDROID) |
| 135 // Acting flakey in Windows. http://crbug.com/129595 | 135 // Acting flakey in Windows. http://crbug.com/129595 |
| 136 #define MAYBE_SendMessageInChannelConnected DISABLED_SendMessageInChannelConnect
ed | 136 #define MAYBE_SendMessageInChannelConnected DISABLED_SendMessageInChannelConnect
ed |
| 137 #else | 137 #else |
| 138 #define MAYBE_SendMessageInChannelConnected SendMessageInChannelConnected | 138 #define MAYBE_SendMessageInChannelConnected SendMessageInChannelConnected |
| 139 #endif | 139 #endif |
| (...skipping 30 matching lines...) Expand all Loading... |
| 170 IPCTestBase::GetChannelName("GenericClient"), &listener, nullptr)); | 170 IPCTestBase::GetChannelName("GenericClient"), &listener, nullptr)); |
| 171 CHECK(channel->Connect()); | 171 CHECK(channel->Connect()); |
| 172 listener.Init(channel.get()); | 172 listener.Init(channel.get()); |
| 173 IPC::TestChannelListener::SendOneMessage(channel.get(), "hello from child"); | 173 IPC::TestChannelListener::SendOneMessage(channel.get(), "hello from child"); |
| 174 | 174 |
| 175 base::MessageLoop::current()->Run(); | 175 base::MessageLoop::current()->Run(); |
| 176 return 0; | 176 return 0; |
| 177 } | 177 } |
| 178 | 178 |
| 179 } // namespace | 179 } // namespace |
| OLD | NEW |