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

Side by Side Diff: content/test/render_thread_impl_browser_test_ipc_helper.cc

Issue 2109483002: Remove MojoApplication[Host] & ApplicationSetup. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@u2
Patch Set: . Created 4 years, 5 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "content/test/render_thread_impl_browser_test_ipc_helper.h" 5 #include "content/test/render_thread_impl_browser_test_ipc_helper.h"
6 6
7 #include "mojo/edk/embedder/embedder.h" 7 #include "mojo/edk/embedder/embedder.h"
8 #include "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/include/gtest/gtest.h"
9 9
10 namespace content { 10 namespace content {
(...skipping 23 matching lines...) Expand all
34 options.message_loop_type = base::MessageLoop::TYPE_IO; 34 options.message_loop_type = base::MessageLoop::TYPE_IO;
35 ASSERT_TRUE(ipc_thread_->StartWithOptions(options)); 35 ASSERT_TRUE(ipc_thread_->StartWithOptions(options));
36 } 36 }
37 37
38 void RenderThreadImplBrowserIPCTestHelper::SetupMojo() { 38 void RenderThreadImplBrowserIPCTestHelper::SetupMojo() {
39 InitializeMojo(); 39 InitializeMojo();
40 40
41 std::string child_token = mojo::edk::GenerateRandomToken(); 41 std::string child_token = mojo::edk::GenerateRandomToken();
42 ipc_support_.reset( 42 ipc_support_.reset(
43 new mojo::edk::test::ScopedIPCSupport(ipc_thread_->task_runner())); 43 new mojo::edk::test::ScopedIPCSupport(ipc_thread_->task_runner()));
44 mojo_application_host_.reset(new MojoApplicationHost(child_token)); 44 mojo_application_token_ = mojo::edk::GenerateRandomToken();
45 mojo_application_token_ = mojo_application_host_->GetToken();
46 45
47 mojo_ipc_token_ = mojo::edk::GenerateRandomToken(); 46 mojo_ipc_token_ = mojo::edk::GenerateRandomToken();
48 47
49 mojo::MessagePipe pipe; 48 mojo::MessagePipe pipe;
50 channel_ = IPC::ChannelProxy::Create( 49 channel_ = IPC::ChannelProxy::Create(
51 IPC::ChannelMojo::CreateServerFactory( 50 IPC::ChannelMojo::CreateServerFactory(
52 mojo::edk::CreateParentMessagePipe(mojo_ipc_token_, child_token)), 51 mojo::edk::CreateParentMessagePipe(mojo_ipc_token_, child_token)),
53 dummy_listener_.get(), ipc_thread_->task_runner()); 52 dummy_listener_.get(), ipc_thread_->task_runner());
54 } 53 }
55 54
56 scoped_refptr<base::SingleThreadTaskRunner> 55 scoped_refptr<base::SingleThreadTaskRunner>
57 RenderThreadImplBrowserIPCTestHelper::GetIOTaskRunner() const { 56 RenderThreadImplBrowserIPCTestHelper::GetIOTaskRunner() const {
58 return ipc_thread_->task_runner(); 57 return ipc_thread_->task_runner();
59 } 58 }
60 59
61 } // namespace content 60 } // namespace content
OLDNEW
« no previous file with comments | « content/test/render_thread_impl_browser_test_ipc_helper.h ('k') | content/utility/utility_thread_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698