Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(432)

Side by Side Diff: ppapi/proxy/ppapi_proxy_test.cc

Issue 14273043: ppapi: Use base::MessageLoop. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comments Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ppapi/proxy/ppapi_proxy_test.h ('k') | ppapi/proxy/ppb_image_data_proxy.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 519 matching lines...) Expand 10 before | Expand all | Expand 10 after
530 local_harness_ = &plugin_; 530 local_harness_ = &plugin_;
531 } 531 }
532 } 532 }
533 533
534 TwoWayTest::~TwoWayTest() { 534 TwoWayTest::~TwoWayTest() {
535 shutdown_event_.Signal(); 535 shutdown_event_.Signal();
536 } 536 }
537 537
538 void TwoWayTest::SetUp() { 538 void TwoWayTest::SetUp() {
539 base::Thread::Options options; 539 base::Thread::Options options;
540 options.message_loop_type = MessageLoop::TYPE_IO; 540 options.message_loop_type = base::MessageLoop::TYPE_IO;
541 io_thread_.StartWithOptions(options); 541 io_thread_.StartWithOptions(options);
542 plugin_thread_.Start(); 542 plugin_thread_.Start();
543 543
544 // Construct the IPC handle name using the process ID so we can safely run 544 // Construct the IPC handle name using the process ID so we can safely run
545 // multiple |TwoWayTest|s concurrently. 545 // multiple |TwoWayTest|s concurrently.
546 std::ostringstream handle_name; 546 std::ostringstream handle_name;
547 handle_name << "TwoWayTestChannel" << base::GetCurrentProcId(); 547 handle_name << "TwoWayTestChannel" << base::GetCurrentProcId();
548 IPC::ChannelHandle handle(handle_name.str()); 548 IPC::ChannelHandle handle(handle_name.str());
549 base::WaitableEvent remote_harness_set_up(true, false); 549 base::WaitableEvent remote_harness_set_up(true, false);
550 plugin_thread_.message_loop_proxy()->PostTask( 550 plugin_thread_.message_loop_proxy()->PostTask(
(...skipping 30 matching lines...) Expand all
581 plugin_thread_.message_loop_proxy()->PostTask(FROM_HERE, 581 plugin_thread_.message_loop_proxy()->PostTask(FROM_HERE,
582 base::Bind(&RunTaskOnRemoteHarness, 582 base::Bind(&RunTaskOnRemoteHarness,
583 task, 583 task,
584 &task_complete)); 584 &task_complete));
585 task_complete.Wait(); 585 task_complete.Wait();
586 } 586 }
587 587
588 588
589 } // namespace proxy 589 } // namespace proxy
590 } // namespace ppapi 590 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/proxy/ppapi_proxy_test.h ('k') | ppapi/proxy/ppb_image_data_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698