| 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 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| (...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 315 PluginProxyMultiThreadTest::PluginProxyMultiThreadTest() { | 315 PluginProxyMultiThreadTest::PluginProxyMultiThreadTest() { |
| 316 } | 316 } |
| 317 | 317 |
| 318 PluginProxyMultiThreadTest::~PluginProxyMultiThreadTest() { | 318 PluginProxyMultiThreadTest::~PluginProxyMultiThreadTest() { |
| 319 } | 319 } |
| 320 | 320 |
| 321 void PluginProxyMultiThreadTest::RunTest() { | 321 void PluginProxyMultiThreadTest::RunTest() { |
| 322 main_thread_message_loop_proxy_ = | 322 main_thread_message_loop_proxy_ = |
| 323 PpapiGlobals::Get()->GetMainThreadMessageLoop(); | 323 PpapiGlobals::Get()->GetMainThreadMessageLoop(); |
| 324 ASSERT_EQ(main_thread_message_loop_proxy_.get(), | 324 ASSERT_EQ(main_thread_message_loop_proxy_.get(), |
| 325 base::MessageLoopProxy::current()); | 325 base::MessageLoopProxy::current().get()); |
| 326 nested_main_thread_message_loop_.reset(new base::RunLoop()); | 326 nested_main_thread_message_loop_.reset(new base::RunLoop()); |
| 327 | 327 |
| 328 secondary_thread_.reset(new base::DelegateSimpleThread( | 328 secondary_thread_.reset(new base::DelegateSimpleThread( |
| 329 this, "PluginProxyMultiThreadTest")); | 329 this, "PluginProxyMultiThreadTest")); |
| 330 | 330 |
| 331 { | 331 { |
| 332 ProxyAutoLock auto_lock; | 332 ProxyAutoLock auto_lock; |
| 333 | 333 |
| 334 // MessageLoopResource assumes that the proxy lock has been acquired. | 334 // MessageLoopResource assumes that the proxy lock has been acquired. |
| 335 secondary_thread_message_loop_ = new MessageLoopResource(pp_instance()); | 335 secondary_thread_message_loop_ = new MessageLoopResource(pp_instance()); |
| (...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 590 plugin_thread_.message_loop_proxy()->PostTask(FROM_HERE, | 590 plugin_thread_.message_loop_proxy()->PostTask(FROM_HERE, |
| 591 base::Bind(&RunTaskOnRemoteHarness, | 591 base::Bind(&RunTaskOnRemoteHarness, |
| 592 task, | 592 task, |
| 593 &task_complete)); | 593 &task_complete)); |
| 594 task_complete.Wait(); | 594 task_complete.Wait(); |
| 595 } | 595 } |
| 596 | 596 |
| 597 | 597 |
| 598 } // namespace proxy | 598 } // namespace proxy |
| 599 } // namespace ppapi | 599 } // namespace ppapi |
| OLD | NEW |