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

Unified Diff: content/browser/devtools/embedded_worker_devtools_manager.h

Issue 261753008: Call EmbeddedWorkerDevToolsManager::ServiceWorkerCreated, WorkerContextStarted and WorkerDestroyed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: incorporated kinuko's comment Created 6 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/devtools/embedded_worker_devtools_manager.h
diff --git a/content/browser/devtools/embedded_worker_devtools_manager.h b/content/browser/devtools/embedded_worker_devtools_manager.h
index ea075740e84ef64268819021fe1344c64ad81422..874156ba7c9f704c646bd66fda74d81e8bac5b90 100644
--- a/content/browser/devtools/embedded_worker_devtools_manager.h
+++ b/content/browser/devtools/embedded_worker_devtools_manager.h
@@ -15,8 +15,6 @@
#include "content/browser/shared_worker/shared_worker_instance.h"
#include "content/common/content_export.h"
-class GURL;
-
namespace content {
class DevToolsAgentHost;
@@ -35,7 +33,7 @@ class CONTENT_EXPORT EmbeddedWorkerDevToolsManager {
int worker_route_id);
DevToolsAgentHost* GetDevToolsAgentHostForServiceWorker(
const base::FilePath& storage_partition_path,
- const GURL& service_worker_scope);
+ int64 service_worker_version_id);
// Returns true when the worker must be paused on start.
bool SharedWorkerCreated(int worker_process_id,
@@ -43,12 +41,12 @@ class CONTENT_EXPORT EmbeddedWorkerDevToolsManager {
const SharedWorkerInstance& instance);
// Returns true when the worker must be paused on start.
// TODO(horo): Currently we identify ServiceWorkers with the path of storage
- // partition and the scope of ServiceWorker. Consider having a class like
+ // partition and the version id of ServiceWorker. Consider having a class like
michaeln 2014/05/15 19:15:15 identifying by path is a good idea, one possible p
horo 2014/05/16 03:55:21 Thank you for pointing out. I didn't know that. I
// SharedWorkerInstance instead of the pair.
bool ServiceWorkerCreated(int worker_process_id,
int worker_route_id,
const base::FilePath& storage_partition_path,
- const GURL& service_worker_scope);
+ int64 service_worker_version_id);
void WorkerContextStarted(int worker_process_id, int worker_route_id);
void WorkerDestroyed(int worker_process_id, int worker_route_id);
@@ -71,7 +69,7 @@ class CONTENT_EXPORT EmbeddedWorkerDevToolsManager {
explicit WorkerInfo(const SharedWorkerInstance& instance);
// Creates WorkerInfo for ServiceWorker.
WorkerInfo(const base::FilePath& storage_partition_path,
- const GURL& service_worker_scope);
+ int64 service_worker_version_id);
~WorkerInfo();
WorkerState state() { return state_; }
@@ -82,12 +80,12 @@ class CONTENT_EXPORT EmbeddedWorkerDevToolsManager {
}
bool Matches(const SharedWorkerInstance& other);
bool Matches(const base::FilePath& other_storage_partition_path,
- const GURL& other_service_worker_scope);
+ int64 other_service_worker_version_id);
private:
scoped_ptr<SharedWorkerInstance> shared_worker_instance_;
scoped_ptr<base::FilePath> storage_partition_path_;
- scoped_ptr<GURL> service_worker_scope_;
+ int64 service_worker_version_id_;
WorkerState state_;
EmbeddedWorkerDevToolsAgentHost* agent_host_;
};
@@ -103,7 +101,7 @@ class CONTENT_EXPORT EmbeddedWorkerDevToolsManager {
const SharedWorkerInstance& instance);
WorkerInfoMap::iterator FindExistingServiceWorkerInfo(
const base::FilePath& storage_partition_path,
- const GURL& service_worker_scope);
+ int64 service_worker_version_id);
void MoveToPausedState(const WorkerId& id, const WorkerInfoMap::iterator& it);

Powered by Google App Engine
This is Rietveld 408576698