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

Unified Diff: content/browser/renderer_host/render_process_host_impl.h

Issue 2387603003: Resume a backgrounded renderer that was purged and suspended (Closed)
Patch Set: Use constexpr base::TimeDelta Created 4 years, 2 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/renderer_host/render_process_host_impl.h
diff --git a/content/browser/renderer_host/render_process_host_impl.h b/content/browser/renderer_host/render_process_host_impl.h
index 419e0cd3df4b0b4ffcb39760bd194835307c4885..bbefe08c7e82564c1b4e4f72e32d31a247bb3b69 100644
--- a/content/browser/renderer_host/render_process_host_impl.h
+++ b/content/browser/renderer_host/render_process_host_impl.h
@@ -175,6 +175,9 @@ class CONTENT_EXPORT RenderProcessHostImpl
void ForceReleaseWorkerRefCounts() override;
bool IsWorkerRefCountDisabled() override;
void PurgeAndSuspend() override;
+ void Resume() override;
+ const base::TimeTicks& GetLastPurgedAndSuspendedTime() const override;
+ const base::TimeTicks& GetLastResumedInBackgroundTime() const override;
mojom::RouteProvider* GetRemoteRouteProvider();
@@ -465,6 +468,12 @@ class CONTENT_EXPORT RenderProcessHostImpl
// Stores the time at which the first call to Init happened.
base::TimeTicks init_time_;
+ // The last time when the renderer is purged and suspended.
+ base::TimeTicks last_purged_and_suspended_time_;
+
+ // The last time when the renderer is resumed in the background.
+ base::TimeTicks last_resumed_in_background_time_;
+
// Used to launch and terminate the process without blocking the UI thread.
std::unique_ptr<ChildProcessLauncher> child_process_launcher_;

Powered by Google App Engine
This is Rietveld 408576698