Re-reland: Add MemoryCoordinator
This is fourth attempt... Pass InterfacePtr instead of InterfaceRegistry
to avoid dependency from components/memory_coordinator to shell/services
Original description:
This CL adds MemoryCoordinator mojo interface and
its implementation. When --enable-features=MemoryCoordinator
is specified the browser and renderers create their
MemoryCoordinators. MemoryCoordinatorImpl (which lives in
the browser process) creates a mojo message pipe when a
renderer is launched.
This CL doesn't add actual handling of memory events, which
will be implemented in follow-up CLs.
BUG=617492
[email protected],[email protected],[email protected],[email protected]
Review-Url: https://codereview.chromium.org/2149413002
Cr-Commit-Position: refs/heads/master@{#406247}
diff --git a/components/memory_coordinator.gypi b/components/memory_coordinator.gypi
index 87da0dc..693b0f9 100644
--- a/components/memory_coordinator.gypi
+++ b/components/memory_coordinator.gypi
@@ -10,6 +10,7 @@
'type': 'static_library',
'sources': [
'memory_coordinator/public/interfaces/child_memory_coordinator.mojom',
+ 'memory_coordinator/public/interfaces/memory_coordinator.mojom',
],
'variables': {
'use_new_wrapper_types': 'false',
@@ -19,12 +20,15 @@
{
# GN version: //components/memory_coordinator/common
'target_name': 'memory_coordinator_common',
- 'type': 'none',
+ 'type': 'static_library',
'dependencies': [
+ '<(DEPTH)/base/base.gyp:base',
'memory_coordinator_mojo_bindings',
],
'sources': [
'memory_coordinator/common/memory_coordinator_client.h',
+ 'memory_coordinator/common/memory_coordinator_features.cc',
+ 'memory_coordinator/common/memory_coordinator_features.h',
],
},
{
@@ -41,5 +45,19 @@
'memory_coordinator/child/child_memory_coordinator_impl.h',
],
},
+ {
+ # GN version: //components/memory_coordinator/browser
+ 'target_name': 'memory_coordinator_browser',
+ 'type': 'static_library',
+ 'dependencies': [
+ '<(DEPTH)/base/base.gyp:base',
+ 'memory_coordinator_common',
+ 'memory_coordinator_mojo_bindings',
+ ],
+ 'sources': [
+ 'memory_coordinator/browser/memory_coordinator.cc',
+ 'memory_coordinator/browser/memory_coordinator.h',
+ ],
+ },
],
}