| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/renderer/render_thread_impl.h" | 5 #include "content/renderer/render_thread_impl.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 | 183 |
| 184 InitializeMojo(); | 184 InitializeMojo(); |
| 185 shell_context_.reset(new TestServiceManagerContext); | 185 shell_context_.reset(new TestServiceManagerContext); |
| 186 mojo::edk::PendingProcessConnection process_connection; | 186 mojo::edk::PendingProcessConnection process_connection; |
| 187 child_connection_.reset(new ChildConnection( | 187 child_connection_.reset(new ChildConnection( |
| 188 mojom::kRendererServiceName, "test", &process_connection, | 188 mojom::kRendererServiceName, "test", &process_connection, |
| 189 ServiceManagerConnection::GetForProcess()->GetConnector(), | 189 ServiceManagerConnection::GetForProcess()->GetConnector(), |
| 190 io_task_runner)); | 190 io_task_runner)); |
| 191 | 191 |
| 192 mojo::MessagePipe pipe; | 192 mojo::MessagePipe pipe; |
| 193 IPC::mojom::ChannelBootstrapPtr channel_bootstrap; | 193 child_connection_->BindInterface(IPC::mojom::ChannelBootstrap::Name_, |
| 194 child_connection_->GetRemoteInterfaces()->GetInterface(&channel_bootstrap); | 194 std::move(pipe.handle1)); |
| 195 | 195 |
| 196 channel_ = IPC::ChannelProxy::Create( | 196 channel_ = |
| 197 IPC::ChannelMojo::CreateServerFactory( | 197 IPC::ChannelProxy::Create(IPC::ChannelMojo::CreateServerFactory( |
| 198 channel_bootstrap.PassInterface().PassHandle(), io_task_runner), | 198 std::move(pipe.handle0), io_task_runner), |
| 199 nullptr, io_task_runner); | 199 nullptr, io_task_runner); |
| 200 | 200 |
| 201 mock_process_.reset(new MockRenderProcess); | 201 mock_process_.reset(new MockRenderProcess); |
| 202 test_task_counter_ = make_scoped_refptr(new TestTaskCounter()); | 202 test_task_counter_ = make_scoped_refptr(new TestTaskCounter()); |
| 203 | 203 |
| 204 // RenderThreadImpl expects the browser to pass these flags. | 204 // RenderThreadImpl expects the browser to pass these flags. |
| 205 base::CommandLine* cmd = base::CommandLine::ForCurrentProcess(); | 205 base::CommandLine* cmd = base::CommandLine::ForCurrentProcess(); |
| 206 base::CommandLine::StringVector old_argv = cmd->argv(); | 206 base::CommandLine::StringVector old_argv = cmd->argv(); |
| 207 | 207 |
| 208 cmd->AppendSwitchASCII(switches::kNumRasterThreads, "1"); | 208 cmd->AppendSwitchASCII(switches::kNumRasterThreads, "1"); |
| 209 cmd->AppendSwitchASCII( | 209 cmd->AppendSwitchASCII( |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 393 // These formats are guaranteed to work on all platforms. | 393 // These formats are guaranteed to work on all platforms. |
| 394 ::testing::Values(gfx::BufferFormat::R_8, | 394 ::testing::Values(gfx::BufferFormat::R_8, |
| 395 gfx::BufferFormat::BGR_565, | 395 gfx::BufferFormat::BGR_565, |
| 396 gfx::BufferFormat::RGBA_4444, | 396 gfx::BufferFormat::RGBA_4444, |
| 397 gfx::BufferFormat::RGBA_8888, | 397 gfx::BufferFormat::RGBA_8888, |
| 398 gfx::BufferFormat::BGRA_8888, | 398 gfx::BufferFormat::BGRA_8888, |
| 399 gfx::BufferFormat::YVU_420))); | 399 gfx::BufferFormat::YVU_420))); |
| 400 | 400 |
| 401 } // namespace | 401 } // namespace |
| 402 } // namespace content | 402 } // namespace content |
| OLD | NEW |