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

Side by Side Diff: content/browser/renderer_host/render_process_host_impl.cc

Issue 2410123002: Remove content::BrowserThread knowledge from Device Sensors (Closed)
Patch Set: Rebase, avoid object creation on startup Created 4 years, 1 month 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
« no previous file with comments | « content/browser/device_sensors/sensor_manager_android_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 // Represents the browser side of the browser <--> renderer communication 5 // Represents the browser side of the browser <--> renderer communication
6 // channel. There will be one RenderProcessHost per renderer process. 6 // channel. There will be one RenderProcessHost per renderer process.
7 7
8 #include "content/browser/renderer_host/render_process_host_impl.h" 8 #include "content/browser/renderer_host/render_process_host_impl.h"
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 1262 matching lines...) Expand 10 before | Expand all | Expand 10 after
1273 scoped_refptr<base::SingleThreadTaskRunner> file_task_runner = 1273 scoped_refptr<base::SingleThreadTaskRunner> file_task_runner =
1274 BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE); 1274 BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE);
1275 registry->AddInterface(base::Bind(&MimeRegistryImpl::Create), 1275 registry->AddInterface(base::Bind(&MimeRegistryImpl::Create),
1276 file_task_runner); 1276 file_task_runner);
1277 #if defined(USE_MINIKIN_HYPHENATION) 1277 #if defined(USE_MINIKIN_HYPHENATION)
1278 registry->AddInterface(base::Bind(&hyphenation::HyphenationImpl::Create), 1278 registry->AddInterface(base::Bind(&hyphenation::HyphenationImpl::Create),
1279 file_task_runner); 1279 file_task_runner);
1280 #endif 1280 #endif
1281 1281
1282 // These callbacks will be run immediately on the IO thread. 1282 // These callbacks will be run immediately on the IO thread.
1283 registry->AddInterface(base::Bind(&DeviceLightHost::Create)); 1283 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner =
1284 registry->AddInterface(base::Bind(&DeviceMotionHost::Create)); 1284 BrowserThread::GetTaskRunnerForThread(BrowserThread::UI);
1285 registry->AddInterface(base::Bind(&DeviceOrientationHost::Create)); 1285 registry->AddInterface(base::Bind(&DeviceLightHost::Create, ui_task_runner));
1286 registry->AddInterface(base::Bind(&DeviceOrientationAbsoluteHost::Create)); 1286 registry->AddInterface(base::Bind(&DeviceMotionHost::Create, ui_task_runner));
1287 registry->AddInterface(
1288 base::Bind(&DeviceOrientationHost::Create, ui_task_runner));
1289 registry->AddInterface(
1290 base::Bind(&DeviceOrientationAbsoluteHost::Create, ui_task_runner));
1287 registry->AddInterface( 1291 registry->AddInterface(
1288 base::Bind(&URLLoaderFactoryImpl::Create, resource_message_filter_)); 1292 base::Bind(&URLLoaderFactoryImpl::Create, resource_message_filter_));
1289 1293
1290 registry->AddInterface( 1294 registry->AddInterface(
1291 base::Bind(&VideoCaptureHost::Create, 1295 base::Bind(&VideoCaptureHost::Create,
1292 BrowserMainLoop::GetInstance()->media_stream_manager())); 1296 BrowserMainLoop::GetInstance()->media_stream_manager()));
1293 1297
1294 // This is to support usage of WebSockets in cases in which there is no 1298 // This is to support usage of WebSockets in cases in which there is no
1295 // associated RenderFrame (e.g., Shared Workers). 1299 // associated RenderFrame (e.g., Shared Workers).
1296 AddUIThreadInterface( 1300 AddUIThreadInterface(
(...skipping 1708 matching lines...) Expand 10 before | Expand all | Expand 10 after
3005 bad_message::ReceivedBadMessage(render_process_id, 3009 bad_message::ReceivedBadMessage(render_process_id,
3006 bad_message::RPH_MOJO_PROCESS_ERROR); 3010 bad_message::RPH_MOJO_PROCESS_ERROR);
3007 } 3011 }
3008 3012
3009 void RenderProcessHostImpl::CreateURLLoaderFactory( 3013 void RenderProcessHostImpl::CreateURLLoaderFactory(
3010 mojo::InterfaceRequest<mojom::URLLoaderFactory> request) { 3014 mojo::InterfaceRequest<mojom::URLLoaderFactory> request) {
3011 URLLoaderFactoryImpl::Create(resource_message_filter_, std::move(request)); 3015 URLLoaderFactoryImpl::Create(resource_message_filter_, std::move(request));
3012 } 3016 }
3013 3017
3014 } // namespace content 3018 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/device_sensors/sensor_manager_android_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698