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

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

Issue 2745243002: Implement a Mojo service for Background Fetch (Closed)
Patch Set: Implement a Mojo service for Background Fetch Created 3 years, 9 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 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 #include "base/threading/thread_task_runner_handle.h" 48 #include "base/threading/thread_task_runner_handle.h"
49 #include "base/trace_event/trace_event.h" 49 #include "base/trace_event/trace_event.h"
50 #include "base/tracked_objects.h" 50 #include "base/tracked_objects.h"
51 #include "build/build_config.h" 51 #include "build/build_config.h"
52 #include "cc/base/switches.h" 52 #include "cc/base/switches.h"
53 #include "cc/output/buffer_to_texture_target_map.h" 53 #include "cc/output/buffer_to_texture_target_map.h"
54 #include "components/discardable_memory/service/discardable_shared_memory_manage r.h" 54 #include "components/discardable_memory/service/discardable_shared_memory_manage r.h"
55 #include "components/tracing/common/tracing_switches.h" 55 #include "components/tracing/common/tracing_switches.h"
56 #include "content/browser/appcache/appcache_dispatcher_host.h" 56 #include "content/browser/appcache/appcache_dispatcher_host.h"
57 #include "content/browser/appcache/chrome_appcache_service.h" 57 #include "content/browser/appcache/chrome_appcache_service.h"
58 #include "content/browser/background_fetch/background_fetch_service_impl.h"
58 #include "content/browser/background_sync/background_sync_service_impl.h" 59 #include "content/browser/background_sync/background_sync_service_impl.h"
59 #include "content/browser/bad_message.h" 60 #include "content/browser/bad_message.h"
60 #include "content/browser/blob_storage/blob_dispatcher_host.h" 61 #include "content/browser/blob_storage/blob_dispatcher_host.h"
61 #include "content/browser/blob_storage/chrome_blob_storage_context.h" 62 #include "content/browser/blob_storage/chrome_blob_storage_context.h"
62 #include "content/browser/broadcast_channel/broadcast_channel_provider.h" 63 #include "content/browser/broadcast_channel/broadcast_channel_provider.h"
63 #include "content/browser/browser_child_process_host_impl.h" 64 #include "content/browser/browser_child_process_host_impl.h"
64 #include "content/browser/browser_main.h" 65 #include "content/browser/browser_main.h"
65 #include "content/browser/browser_main_loop.h" 66 #include "content/browser/browser_main_loop.h"
66 #include "content/browser/browser_plugin/browser_plugin_message_filter.h" 67 #include "content/browser/browser_plugin/browser_plugin_message_filter.h"
67 #include "content/browser/cache_storage/cache_storage_context_impl.h" 68 #include "content/browser/cache_storage/cache_storage_context_impl.h"
(...skipping 1242 matching lines...) Expand 10 before | Expand all | Expand 10 after
1310 registry->AddInterface( 1311 registry->AddInterface(
1311 base::Bind(&device::DeviceOrientationAbsoluteHost::Create)); 1312 base::Bind(&device::DeviceOrientationAbsoluteHost::Create));
1312 #endif // defined(OS_ANDROID) 1313 #endif // defined(OS_ANDROID)
1313 1314
1314 registry->AddInterface(base::Bind(&device::GamepadMonitor::Create)); 1315 registry->AddInterface(base::Bind(&device::GamepadMonitor::Create));
1315 1316
1316 registry->AddInterface( 1317 registry->AddInterface(
1317 base::Bind(&PushMessagingManager::BindRequest, 1318 base::Bind(&PushMessagingManager::BindRequest,
1318 base::Unretained(push_messaging_manager_.get()))); 1319 base::Unretained(push_messaging_manager_.get())));
1319 1320
1321 registry->AddInterface(base::Bind(
1322 &BackgroundFetchServiceImpl::Create,
1323 base::Unretained(storage_partition_impl_->GetBackgroundFetchContext()),
dcheng 2017/03/16 07:14:07 Which will probably require binding these as scope
Peter Beverloo 2017/03/16 15:32:55 Done.
1324 base::Unretained(storage_partition_impl_->GetServiceWorkerContext())));
1325
1320 registry->AddInterface(base::Bind(&RenderProcessHostImpl::CreateMusGpuRequest, 1326 registry->AddInterface(base::Bind(&RenderProcessHostImpl::CreateMusGpuRequest,
1321 base::Unretained(this))); 1327 base::Unretained(this)));
1322 1328
1323 registry->AddInterface( 1329 registry->AddInterface(
1324 base::Bind(&VideoCaptureHost::Create, 1330 base::Bind(&VideoCaptureHost::Create,
1325 BrowserMainLoop::GetInstance()->media_stream_manager())); 1331 BrowserMainLoop::GetInstance()->media_stream_manager()));
1326 1332
1327 // This is to support usage of WebSockets in cases in which there is no 1333 // This is to support usage of WebSockets in cases in which there is no
1328 // associated RenderFrame (e.g., Shared Workers). 1334 // associated RenderFrame (e.g., Shared Workers).
1329 AddUIThreadInterface( 1335 AddUIThreadInterface(
(...skipping 1742 matching lines...) Expand 10 before | Expand all | Expand 10 after
3072 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; 3078 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error;
3073 3079
3074 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. 3080 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing.
3075 // Capture the error message in a crash key value. 3081 // Capture the error message in a crash key value.
3076 base::debug::ScopedCrashKey error_key_value("mojo-message-error", error); 3082 base::debug::ScopedCrashKey error_key_value("mojo-message-error", error);
3077 bad_message::ReceivedBadMessage(render_process_id, 3083 bad_message::ReceivedBadMessage(render_process_id,
3078 bad_message::RPH_MOJO_PROCESS_ERROR); 3084 bad_message::RPH_MOJO_PROCESS_ERROR);
3079 } 3085 }
3080 3086
3081 } // namespace content 3087 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698