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

Side by Side Diff: content/browser/service_worker/service_worker_context_wrapper.h

Issue 2166523003: Add ref count to service workers for extension API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sync@tott Created 4 years, 2 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_WRAPPER_H_ 5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_WRAPPER_H_
6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_WRAPPER_H_ 6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_WRAPPER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 const ResultCallback& continuation) override; 98 const ResultCallback& continuation) override;
99 void UnregisterServiceWorker(const GURL& pattern, 99 void UnregisterServiceWorker(const GURL& pattern,
100 const ResultCallback& continuation) override; 100 const ResultCallback& continuation) override;
101 void GetAllOriginsInfo(const GetUsageInfoCallback& callback) override; 101 void GetAllOriginsInfo(const GetUsageInfoCallback& callback) override;
102 void DeleteForOrigin(const GURL& origin, 102 void DeleteForOrigin(const GURL& origin,
103 const ResultCallback& callback) override; 103 const ResultCallback& callback) override;
104 void CheckHasServiceWorker( 104 void CheckHasServiceWorker(
105 const GURL& url, 105 const GURL& url,
106 const GURL& other_url, 106 const GURL& other_url,
107 const CheckHasServiceWorkerCallback& callback) override; 107 const CheckHasServiceWorkerCallback& callback) override;
108 void CountExternalRequestsForTest(
109 const GURL& url,
110 const CountExternalRequestsCallback& callback) override;
108 void StopAllServiceWorkersForOrigin(const GURL& origin) override; 111 void StopAllServiceWorkersForOrigin(const GURL& origin) override;
109 void ClearAllServiceWorkersForTest(const base::Closure& callback) override; 112 void ClearAllServiceWorkersForTest(const base::Closure& callback) override;
110 void StartServiceWorkerForNavigationHint( 113 void StartServiceWorkerForNavigationHint(
111 const GURL& document_url, 114 const GURL& document_url,
112 blink::WebNavigationHintType type, 115 blink::WebNavigationHintType type,
113 int render_process_id, 116 int render_process_id,
114 const ResultCallback& callback) override; 117 const ResultCallback& callback) override;
118 bool StartingExternalRequest(int64_t service_worker_version_id,
119 const std::string& request_uuid) override;
120 bool FinishedExternalRequest(int64_t service_worker_version_id,
121 const std::string& request_uuid) override;
115 122
116 // These methods must only be called from the IO thread. 123 // These methods must only be called from the IO thread.
117 ServiceWorkerRegistration* GetLiveRegistration(int64_t registration_id); 124 ServiceWorkerRegistration* GetLiveRegistration(int64_t registration_id);
118 ServiceWorkerVersion* GetLiveVersion(int64_t version_id); 125 ServiceWorkerVersion* GetLiveVersion(int64_t version_id);
119 std::vector<ServiceWorkerRegistrationInfo> GetAllLiveRegistrationInfo(); 126 std::vector<ServiceWorkerRegistrationInfo> GetAllLiveRegistrationInfo();
120 std::vector<ServiceWorkerVersionInfo> GetAllLiveVersionInfo(); 127 std::vector<ServiceWorkerVersionInfo> GetAllLiveVersionInfo();
121 128
122 // Must be called from the IO thread. 129 // Must be called from the IO thread.
123 void HasMainFrameProviderHost(const GURL& origin, 130 void HasMainFrameProviderHost(const GURL& origin,
124 const BoolCallback& callback) const; 131 const BoolCallback& callback) const;
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 285
279 // Must be touched on the UI thread. 286 // Must be touched on the UI thread.
280 std::map<int, int> navigation_hint_task_count_per_process_; 287 std::map<int, int> navigation_hint_task_count_per_process_;
281 288
282 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerContextWrapper); 289 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerContextWrapper);
283 }; 290 };
284 291
285 } // namespace content 292 } // namespace content
286 293
287 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_WRAPPER_H_ 294 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_WRAPPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698