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

Unified Diff: content/browser/memory/memory_coordinator_impl.h

Issue 2681643003: Expose DiscardTab() to MemoryCoordiantor (Closed)
Patch Set: fix compile error on android Created 3 years, 10 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/browser/memory/memory_coordinator_impl.h
diff --git a/content/browser/memory/memory_coordinator_impl.h b/content/browser/memory/memory_coordinator_impl.h
index 250d58672b3410f2a97e77271df16dd431bde6e8..3fb76e95d0c3714a17b8838f23a2d424d634a7a1 100644
--- a/content/browser/memory/memory_coordinator_impl.h
+++ b/content/browser/memory/memory_coordinator_impl.h
@@ -99,6 +99,9 @@ class CONTENT_EXPORT MemoryCoordinatorImpl : public MemoryCoordinator,
// the state is actually changed.
bool ChangeStateIfNeeded(MemoryState prev_state, MemoryState next_state);
+ // Asks the delegate to discard a tab.
+ void DiscardTab();
+
protected:
// Returns the RenderProcessHost which is correspond to the given id.
// Returns nullptr if there is no corresponding RenderProcessHost.
@@ -110,6 +113,8 @@ class CONTENT_EXPORT MemoryCoordinatorImpl : public MemoryCoordinator,
void SetDelegateForTesting(
std::unique_ptr<MemoryCoordinatorDelegate> delegate);
+ MemoryCoordinatorDelegate* delegate() { return delegate_.get(); }
+
// Adds the given ChildMemoryCoordinator as a child of this coordinator.
void AddChildForTesting(int dummy_render_process_id,
mojom::ChildMemoryCoordinatorPtr child);

Powered by Google App Engine
This is Rietveld 408576698