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

Unified Diff: content/child/memory/child_memory_coordinator_impl.h

Issue 2731913002: NotForReview: Expose the global memory budget (chromium side)
Patch Set: Add --simulate-memory-pressure 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 side-by-side diff with in-line comments
Download patch
Index: content/child/memory/child_memory_coordinator_impl.h
diff --git a/content/child/memory/child_memory_coordinator_impl.h b/content/child/memory/child_memory_coordinator_impl.h
index 96da7294c4b83609522d41a84a0fadad80933341..2f24579ba8f969a8c7b670895e2d9e5d2d0acdb0 100644
--- a/content/child/memory/child_memory_coordinator_impl.h
+++ b/content/child/memory/child_memory_coordinator_impl.h
@@ -12,6 +12,7 @@
#include "content/common/content_export.h"
#include "content/common/memory_coordinator.mojom.h"
#include "mojo/public/cpp/bindings/binding.h"
+#include "mojo/public/cpp/system/buffer.h"
namespace content {
@@ -39,6 +40,8 @@ class CONTENT_EXPORT ChildMemoryCoordinatorImpl
// base::MemoryCoordinator implementations:
base::MemoryState GetCurrentMemoryState() const override;
+ int64_t GetGlobalBudget() override;
+ void SetGlobalBudgetUpdateInterval(uint32_t interval_ms) override;
// mojom::ChildMemoryCoordinator implementations:
void OnStateChange(mojom::MemoryState state) override;
@@ -50,10 +53,14 @@ class CONTENT_EXPORT ChildMemoryCoordinatorImpl
private:
friend class ChildMemoryCoordinatorImplTest;
+ void OnGetGlobalBudgetHandle(mojo::ScopedSharedBufferHandle handle);
+
mojo::Binding<mojom::ChildMemoryCoordinator> binding_;
base::MemoryState current_state_ = base::MemoryState::NORMAL;
mojom::MemoryCoordinatorHandlePtr parent_;
ChildMemoryCoordinatorDelegate* delegate_;
+ mojo::ScopedSharedBufferHandle global_budget_handle_;
+ mojo::ScopedSharedBufferMapping global_budget_mapping_;
DISALLOW_COPY_AND_ASSIGN(ChildMemoryCoordinatorImpl);
};
« no previous file with comments | « content/browser/memory/memory_coordinator_impl.cc ('k') | content/child/memory/child_memory_coordinator_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698