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

Unified Diff: content/public/browser/worker_service.h

Issue 9317026: Hide WorkerProcessHost from chrome. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 8 years, 11 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
« no previous file with comments | « content/public/browser/content_browser_client.h ('k') | content/public/browser/worker_service_observer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/browser/worker_service.h
===================================================================
--- content/public/browser/worker_service.h (revision 119868)
+++ content/public/browser/worker_service.h (working copy)
@@ -6,15 +6,21 @@
#define CONTENT_PUBLIC_BROWSER_WORKER_SERVICE_H_
#pragma once
+#include <vector>
+
+#include "base/process.h"
#include "content/common/content_export.h"
+class GURL;
+
namespace content {
class WorkerServiceObserver;
// A singleton for managing HTML5 shared web workers. These are run in a
// separate process, since multiple renderer processes can be talking to a
-// single shared worker.
+// single shared worker. All the methods below can only be called on the IO
+// thread.
class WorkerService {
public:
virtual ~WorkerService() {}
@@ -22,6 +28,20 @@
// Returns the WorkerService singleton.
CONTENT_EXPORT static WorkerService* GetInstance();
+ // Terminates the given worker. Returns true if the process was found.
+ virtual bool TerminateWorker(int process_id, int route_id) = 0;
+
+ struct WorkerInfo {
+ GURL url;
+ string16 name;
+ int process_id;
+ int route_id;
+ base::ProcessHandle handle;
+ };
+
+ // Return information about all the currently running workers.
+ virtual std::vector<WorkerInfo> GetWorkers() = 0;
+
virtual void AddObserver(WorkerServiceObserver* observer) = 0;
virtual void RemoveObserver(WorkerServiceObserver* observer) = 0;
};
« no previous file with comments | « content/public/browser/content_browser_client.h ('k') | content/public/browser/worker_service_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698