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

Side by Side Diff: content/browser/devtools/service_worker_devtools_manager.h

Issue 1221643014: Service Worker: Migrate to version_uuid and surface ServiceWorker.id. (Chromium 2/3) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_BROWSER_DEVTOOLS_SERVICE_WORKER_DEVTOOLS_MANAGER_H_ 5 #ifndef CONTENT_BROWSER_DEVTOOLS_SERVICE_WORKER_DEVTOOLS_MANAGER_H_
6 #define CONTENT_BROWSER_DEVTOOLS_SERVICE_WORKER_DEVTOOLS_MANAGER_H_ 6 #define CONTENT_BROWSER_DEVTOOLS_SERVICE_WORKER_DEVTOOLS_MANAGER_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 26 matching lines...) Expand all
37 37
38 protected: 38 protected:
39 virtual ~Observer() {} 39 virtual ~Observer() {}
40 }; 40 };
41 41
42 class ServiceWorkerIdentifier { 42 class ServiceWorkerIdentifier {
43 public: 43 public:
44 ServiceWorkerIdentifier( 44 ServiceWorkerIdentifier(
45 const ServiceWorkerContextCore* context, 45 const ServiceWorkerContextCore* context,
46 base::WeakPtr<ServiceWorkerContextCore> context_weak, 46 base::WeakPtr<ServiceWorkerContextCore> context_weak,
47 int64 version_id, 47 std::string version_uuid,
48 const GURL& url); 48 const GURL& url);
49 ServiceWorkerIdentifier(const ServiceWorkerIdentifier& other); 49 ServiceWorkerIdentifier(const ServiceWorkerIdentifier& other);
50 ~ServiceWorkerIdentifier(); 50 ~ServiceWorkerIdentifier();
51 51
52 bool Matches(const ServiceWorkerIdentifier& other) const; 52 bool Matches(const ServiceWorkerIdentifier& other) const;
53 53
54 const ServiceWorkerContextCore* context() const { return context_; } 54 const ServiceWorkerContextCore* context() const { return context_; }
55 base::WeakPtr<ServiceWorkerContextCore> context_weak() const { 55 base::WeakPtr<ServiceWorkerContextCore> context_weak() const {
56 return context_weak_; 56 return context_weak_;
57 } 57 }
58 int64 version_id() const { return version_id_; } 58 std::string version_uuid() const { return version_uuid_; }
59 GURL url() const { return url_; } 59 GURL url() const { return url_; }
60 60
61 private: 61 private:
62 const ServiceWorkerContextCore* const context_; 62 const ServiceWorkerContextCore* const context_;
63 const base::WeakPtr<ServiceWorkerContextCore> context_weak_; 63 const base::WeakPtr<ServiceWorkerContextCore> context_weak_;
64 const int64 version_id_; 64 const std::string version_uuid_;
65 const GURL url_; 65 const GURL url_;
66 }; 66 };
67 67
68 // Returns the ServiceWorkerDevToolsManager singleton. 68 // Returns the ServiceWorkerDevToolsManager singleton.
69 static ServiceWorkerDevToolsManager* GetInstance(); 69 static ServiceWorkerDevToolsManager* GetInstance();
70 70
71 DevToolsAgentHostImpl* GetDevToolsAgentHostForWorker(int worker_process_id, 71 DevToolsAgentHostImpl* GetDevToolsAgentHostForWorker(int worker_process_id,
72 int worker_route_id); 72 int worker_route_id);
73 void AddAllAgentHosts( 73 void AddAllAgentHosts(
74 std::vector<scoped_refptr<ServiceWorkerDevToolsAgentHost>>* result); 74 std::vector<scoped_refptr<ServiceWorkerDevToolsAgentHost>>* result);
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 base::ObserverList<Observer> observer_list_; 113 base::ObserverList<Observer> observer_list_;
114 AgentHostMap workers_; 114 AgentHostMap workers_;
115 bool debug_service_worker_on_start_; 115 bool debug_service_worker_on_start_;
116 116
117 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerDevToolsManager); 117 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerDevToolsManager);
118 }; 118 };
119 119
120 } // namespace content 120 } // namespace content
121 121
122 #endif // CONTENT_BROWSER_DEVTOOLS_SERVICE_WORKER_DEVTOOLS_MANAGER_H_ 122 #endif // CONTENT_BROWSER_DEVTOOLS_SERVICE_WORKER_DEVTOOLS_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698