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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 SetRendererClientForTesting(content_renderer_client_.get()); | 177 SetRendererClientForTesting(content_renderer_client_.get()); |
178 | 178 |
179 browser_threads_.reset( | 179 browser_threads_.reset( |
180 new TestBrowserThreadBundle(TestBrowserThreadBundle::IO_MAINLOOP)); | 180 new TestBrowserThreadBundle(TestBrowserThreadBundle::IO_MAINLOOP)); |
181 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner = | 181 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner = |
182 base::ThreadTaskRunnerHandle::Get(); | 182 base::ThreadTaskRunnerHandle::Get(); |
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 service_manager::Identity child_identity( |
| 188 mojom::kRendererServiceName, service_manager::mojom::kInheritUserID, |
| 189 "test"); |
187 child_connection_.reset(new ChildConnection( | 190 child_connection_.reset(new ChildConnection( |
188 mojom::kRendererServiceName, "test", &process_connection, | 191 child_identity, &process_connection, |
189 ServiceManagerConnection::GetForProcess()->GetConnector(), | 192 ServiceManagerConnection::GetForProcess()->GetConnector(), |
190 io_task_runner)); | 193 io_task_runner)); |
191 | 194 |
192 mojo::MessagePipe pipe; | 195 mojo::MessagePipe pipe; |
193 child_connection_->BindInterface(IPC::mojom::ChannelBootstrap::Name_, | 196 child_connection_->BindInterface(IPC::mojom::ChannelBootstrap::Name_, |
194 std::move(pipe.handle1)); | 197 std::move(pipe.handle1)); |
195 | 198 |
196 channel_ = | 199 channel_ = |
197 IPC::ChannelProxy::Create(IPC::ChannelMojo::CreateServerFactory( | 200 IPC::ChannelProxy::Create(IPC::ChannelMojo::CreateServerFactory( |
198 std::move(pipe.handle0), io_task_runner), | 201 std::move(pipe.handle0), io_task_runner), |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
393 // These formats are guaranteed to work on all platforms. | 396 // These formats are guaranteed to work on all platforms. |
394 ::testing::Values(gfx::BufferFormat::R_8, | 397 ::testing::Values(gfx::BufferFormat::R_8, |
395 gfx::BufferFormat::BGR_565, | 398 gfx::BufferFormat::BGR_565, |
396 gfx::BufferFormat::RGBA_4444, | 399 gfx::BufferFormat::RGBA_4444, |
397 gfx::BufferFormat::RGBA_8888, | 400 gfx::BufferFormat::RGBA_8888, |
398 gfx::BufferFormat::BGRA_8888, | 401 gfx::BufferFormat::BGRA_8888, |
399 gfx::BufferFormat::YVU_420))); | 402 gfx::BufferFormat::YVU_420))); |
400 | 403 |
401 } // namespace | 404 } // namespace |
402 } // namespace content | 405 } // namespace content |
OLD | NEW |