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

Unified Diff: content/browser/worker_host/worker_process_host.h

Issue 14137016: Lower the priority of shared workers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changes from review. Created 7 years, 7 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/worker_host/worker_process_host.h
diff --git a/content/browser/worker_host/worker_process_host.h b/content/browser/worker_host/worker_process_host.h
index dd1d58fe322c9ac7a5e1a7ea045497247cda5b4f..4a86b86dbdaf24232cbed5edc686c412389c7c00 100644
--- a/content/browser/worker_host/worker_process_host.h
+++ b/content/browser/worker_host/worker_process_host.h
@@ -158,6 +158,9 @@ class WorkerProcessHost : public BrowserChildProcessHostDelegate,
// Terminates the given worker, i.e. based on a UI action.
CONTENT_EXPORT void TerminateWorker(int worker_route_id);
+ // Callers can reduce the WorkerProcess' priority.
+ void SetBackgrounded(bool backgrounded);
+
CONTENT_EXPORT const ChildProcessData& GetData();
typedef std::list<WorkerInstance> Instances;
@@ -167,6 +170,8 @@ class WorkerProcessHost : public BrowserChildProcessHostDelegate,
return resource_context_;
}
+ bool process_launched() const { return process_launched_; }
+
protected:
friend class WorkerServiceImpl;
@@ -221,6 +226,7 @@ class WorkerProcessHost : public BrowserChildProcessHostDelegate,
scoped_refptr<WorkerMessageFilter> worker_message_filter_;
scoped_ptr<BrowserChildProcessHostImpl> process_;
+ bool process_launched_;
DISALLOW_COPY_AND_ASSIGN(WorkerProcessHost);
};
« no previous file with comments | « content/browser/loader/resource_dispatcher_host_unittest.cc ('k') | content/browser/worker_host/worker_process_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698