| 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 "ppapi/proxy/ppapi_proxy_test.h" | 5 #include "ppapi/proxy/ppapi_proxy_test.h" |
| 6 | 6 |
| 7 #include <sstream> | 7 #include <sstream> |
| 8 #include <tuple> |
| 8 | 9 |
| 9 #include "base/bind.h" | 10 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 11 #include "base/bind_helpers.h" |
| 11 #include "base/location.h" | 12 #include "base/location.h" |
| 12 #include "base/observer_list.h" | 13 #include "base/observer_list.h" |
| 13 #include "base/process/process_handle.h" | 14 #include "base/process/process_handle.h" |
| 14 #include "base/run_loop.h" | 15 #include "base/run_loop.h" |
| 15 #include "base/single_thread_task_runner.h" | 16 #include "base/single_thread_task_runner.h" |
| 16 #include "base/thread_task_runner_handle.h" | 17 #include "base/thread_task_runner_handle.h" |
| 17 #include "ipc/ipc_sync_channel.h" | 18 #include "ipc/ipc_sync_channel.h" |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 EXPECT_TRUE(reply_msg); | 138 EXPECT_TRUE(reply_msg); |
| 138 if (!reply_msg) | 139 if (!reply_msg) |
| 139 return false; | 140 return false; |
| 140 | 141 |
| 141 base::TupleTypes<PpapiMsg_SupportsInterface::ReplyParam>::ValueTuple | 142 base::TupleTypes<PpapiMsg_SupportsInterface::ReplyParam>::ValueTuple |
| 142 reply_data; | 143 reply_data; |
| 143 EXPECT_TRUE(PpapiMsg_SupportsInterface::ReadReplyParam( | 144 EXPECT_TRUE(PpapiMsg_SupportsInterface::ReadReplyParam( |
| 144 reply_msg, &reply_data)); | 145 reply_msg, &reply_data)); |
| 145 | 146 |
| 146 sink().ClearMessages(); | 147 sink().ClearMessages(); |
| 147 return base::get<0>(reply_data); | 148 return std::get<0>(reply_data); |
| 148 } | 149 } |
| 149 | 150 |
| 150 // PluginProxyTestHarness ------------------------------------------------------ | 151 // PluginProxyTestHarness ------------------------------------------------------ |
| 151 | 152 |
| 152 PluginProxyTestHarness::PluginProxyTestHarness( | 153 PluginProxyTestHarness::PluginProxyTestHarness( |
| 153 GlobalsConfiguration globals_config) | 154 GlobalsConfiguration globals_config) |
| 154 : globals_config_(globals_config) { | 155 : globals_config_(globals_config) { |
| 155 } | 156 } |
| 156 | 157 |
| 157 PluginProxyTestHarness::~PluginProxyTestHarness() { | 158 PluginProxyTestHarness::~PluginProxyTestHarness() { |
| (...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 581 void TwoWayTest::PostTaskOnRemoteHarness(const base::Closure& task) { | 582 void TwoWayTest::PostTaskOnRemoteHarness(const base::Closure& task) { |
| 582 base::WaitableEvent task_complete(true, false); | 583 base::WaitableEvent task_complete(true, false); |
| 583 plugin_thread_.task_runner()->PostTask( | 584 plugin_thread_.task_runner()->PostTask( |
| 584 FROM_HERE, base::Bind(&RunTaskOnRemoteHarness, task, &task_complete)); | 585 FROM_HERE, base::Bind(&RunTaskOnRemoteHarness, task, &task_complete)); |
| 585 task_complete.Wait(); | 586 task_complete.Wait(); |
| 586 } | 587 } |
| 587 | 588 |
| 588 | 589 |
| 589 } // namespace proxy | 590 } // namespace proxy |
| 590 } // namespace ppapi | 591 } // namespace ppapi |
| OLD | NEW |