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

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

Issue 470923004: DevTools: DevToolsAgentHost::Close/GetURL for service workers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed crash Created 6 years, 4 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.cc
diff --git a/content/browser/devtools/embedded_worker_devtools_manager.cc b/content/browser/devtools/embedded_worker_devtools_manager.cc
index 54e90522f9435090b05024cacdcf5a6c6a3d3b9e..d92869f8a67b13dea7376b882a2a11f5d5a95105 100644
--- a/content/browser/devtools/embedded_worker_devtools_manager.cc
+++ b/content/browser/devtools/embedded_worker_devtools_manager.cc
@@ -28,22 +28,50 @@ scoped_refptr<DevToolsAgentHost> DevToolsAgentHost::GetForWorker(
}
EmbeddedWorkerDevToolsManager::ServiceWorkerIdentifier::ServiceWorkerIdentifier(
- const ServiceWorkerContextCore* const service_worker_context,
- int64 service_worker_version_id)
- : service_worker_context_(service_worker_context),
- service_worker_version_id_(service_worker_version_id) {
+ const ServiceWorkerContextCore* context,
+ base::WeakPtr<ServiceWorkerContextCore> context_weak,
+ int64 version_id,
+ const GURL& url)
+ : context_(context),
+ context_weak_(context_weak),
+ version_id_(version_id),
+ url_(url) {
}
EmbeddedWorkerDevToolsManager::ServiceWorkerIdentifier::ServiceWorkerIdentifier(
const ServiceWorkerIdentifier& other)
- : service_worker_context_(other.service_worker_context_),
- service_worker_version_id_(other.service_worker_version_id_) {
+ : context_(other.context_),
+ context_weak_(other.context_weak_),
+ version_id_(other.version_id_),
+ url_(other.url_) {
+}
+
+EmbeddedWorkerDevToolsManager::
+ServiceWorkerIdentifier::~ServiceWorkerIdentifier() {
}
bool EmbeddedWorkerDevToolsManager::ServiceWorkerIdentifier::Matches(
const ServiceWorkerIdentifier& other) const {
- return service_worker_context_ == other.service_worker_context_ &&
- service_worker_version_id_ == other.service_worker_version_id_;
+ return context_ == other.context_ && version_id_ == other.version_id_;
+}
+
+const ServiceWorkerContextCore*
+EmbeddedWorkerDevToolsManager::ServiceWorkerIdentifier::context() const {
+ return context_;
+}
+
+base::WeakPtr<ServiceWorkerContextCore>
+EmbeddedWorkerDevToolsManager::ServiceWorkerIdentifier::context_weak() const {
+ return context_weak_;
+}
+
+int64
+EmbeddedWorkerDevToolsManager::ServiceWorkerIdentifier::version_id() const {
+ return version_id_;
+}
+
+GURL EmbeddedWorkerDevToolsManager::ServiceWorkerIdentifier::url() const {
+ return url_;
}
// static

Powered by Google App Engine
This is Rietveld 408576698