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

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: rebase + comments v2 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 1240 matching lines...) Expand 10 before | Expand all | Expand 10 after
1308 registry->AddInterface( 1309 registry->AddInterface(
1309 base::Bind(&device::DeviceOrientationAbsoluteHost::Create)); 1310 base::Bind(&device::DeviceOrientationAbsoluteHost::Create));
1310 #endif // defined(OS_ANDROID) 1311 #endif // defined(OS_ANDROID)
1311 1312
1312 registry->AddInterface(base::Bind(&device::GamepadMonitor::Create)); 1313 registry->AddInterface(base::Bind(&device::GamepadMonitor::Create));
1313 1314
1314 registry->AddInterface( 1315 registry->AddInterface(
1315 base::Bind(&PushMessagingManager::BindRequest, 1316 base::Bind(&PushMessagingManager::BindRequest,
1316 base::Unretained(push_messaging_manager_.get()))); 1317 base::Unretained(push_messaging_manager_.get())));
1317 1318
1319 registry->AddInterface(base::Bind(
1320 &BackgroundFetchServiceImpl::Create,
1321 make_scoped_refptr(storage_partition_impl_->GetBackgroundFetchContext()),
1322 make_scoped_refptr(storage_partition_impl_->GetServiceWorkerContext())));
1323
1318 registry->AddInterface(base::Bind(&RenderProcessHostImpl::CreateMusGpuRequest, 1324 registry->AddInterface(base::Bind(&RenderProcessHostImpl::CreateMusGpuRequest,
1319 base::Unretained(this))); 1325 base::Unretained(this)));
1320 1326
1321 registry->AddInterface( 1327 registry->AddInterface(
1322 base::Bind(&VideoCaptureHost::Create, 1328 base::Bind(&VideoCaptureHost::Create,
1323 BrowserMainLoop::GetInstance()->media_stream_manager())); 1329 BrowserMainLoop::GetInstance()->media_stream_manager()));
1324 1330
1325 // This is to support usage of WebSockets in cases in which there is no 1331 // This is to support usage of WebSockets in cases in which there is no
1326 // associated RenderFrame (e.g., Shared Workers). 1332 // associated RenderFrame (e.g., Shared Workers).
1327 AddUIThreadInterface( 1333 AddUIThreadInterface(
(...skipping 1741 matching lines...) Expand 10 before | Expand all | Expand 10 after
3069 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; 3075 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error;
3070 3076
3071 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. 3077 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing.
3072 // Capture the error message in a crash key value. 3078 // Capture the error message in a crash key value.
3073 base::debug::ScopedCrashKey error_key_value("mojo-message-error", error); 3079 base::debug::ScopedCrashKey error_key_value("mojo-message-error", error);
3074 bad_message::ReceivedBadMessage(render_process_id, 3080 bad_message::ReceivedBadMessage(render_process_id,
3075 bad_message::RPH_MOJO_PROCESS_ERROR); 3081 bad_message::RPH_MOJO_PROCESS_ERROR);
3076 } 3082 }
3077 3083
3078 } // namespace content 3084 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/background_fetch/background_fetch_service_impl.cc ('k') | content/browser/storage_partition_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698