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

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

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.h
diff --git a/content/browser/devtools/embedded_worker_devtools_manager.h b/content/browser/devtools/embedded_worker_devtools_manager.h
index 34e2ebce93e1142cac082ef6b9f2ae10160ba6fe..9bcc2f0980a7047c7edbc24b8f1f416a7c34c03d 100644
--- a/content/browser/devtools/embedded_worker_devtools_manager.h
+++ b/content/browser/devtools/embedded_worker_devtools_manager.h
@@ -11,6 +11,7 @@
#include "base/gtest_prod_util.h"
#include "base/memory/scoped_vector.h"
#include "base/memory/singleton.h"
+#include "base/memory/weak_ptr.h"
#include "base/strings/string16.h"
#include "content/browser/shared_worker/shared_worker_instance.h"
#include "content/common/content_export.h"
@@ -31,16 +32,25 @@ class CONTENT_EXPORT EmbeddedWorkerDevToolsManager {
class ServiceWorkerIdentifier {
public:
ServiceWorkerIdentifier(
- const ServiceWorkerContextCore* const service_worker_context,
- int64 service_worker_version_id);
- explicit ServiceWorkerIdentifier(const ServiceWorkerIdentifier& other);
- ~ServiceWorkerIdentifier() {}
+ const ServiceWorkerContextCore* context,
+ base::WeakPtr<ServiceWorkerContextCore> context_weak,
+ int64 version_id,
+ const GURL& url);
+ ServiceWorkerIdentifier(const ServiceWorkerIdentifier& other);
+ ~ServiceWorkerIdentifier();
bool Matches(const ServiceWorkerIdentifier& other) const;
+ const ServiceWorkerContextCore* context() const;
+ base::WeakPtr<ServiceWorkerContextCore> context_weak() const;
+ int64 version_id() const;
+ GURL url() const;
+
private:
- const ServiceWorkerContextCore* const service_worker_context_;
- const int64 service_worker_version_id_;
+ const ServiceWorkerContextCore* const context_;
+ const base::WeakPtr<ServiceWorkerContextCore> context_weak_;
+ const int64 version_id_;
+ const GURL url_;
};
// Returns the EmbeddedWorkerDevToolsManager singleton.

Powered by Google App Engine
This is Rietveld 408576698