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

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

Issue 2118243002: [proof-of-concept] SW thread independent of the main thread Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 3 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>
11 #include <string> 11 #include <string>
12 #include <vector> 12 #include <vector>
13 13
14 #include "base/files/file_path.h" 14 #include "base/files/file_path.h"
15 #include "base/macros.h" 15 #include "base/macros.h"
16 #include "base/memory/ref_counted.h" 16 #include "base/memory/ref_counted.h"
17 #include "content/browser/service_worker/service_worker_context_core.h" 17 #include "content/browser/service_worker/service_worker_context_core.h"
18 #include "content/common/content_export.h" 18 #include "content/common/content_export.h"
19 #include "content/public/browser/service_worker_context.h" 19 #include "content/public/browser/service_worker_context.h"
20 #include "net/url_request/url_request_context_getter_observer.h"
21 #include "third_party/WebKit/public/platform/modules/serviceworker/service_worke r.mojom.h"
20 22
21 namespace base { 23 namespace base {
22 class FilePath; 24 class FilePath;
23 class SequencedTaskRunner; 25 class SequencedTaskRunner;
24 class SingleThreadTaskRunner; 26 class SingleThreadTaskRunner;
25 } 27 }
26 28
27 namespace blink { 29 namespace blink {
28 enum class WebNavigationHintType; 30 enum class WebNavigationHintType;
29 } 31 }
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 void RemoveObserver(ServiceWorkerContextObserver* observer); 186 void RemoveObserver(ServiceWorkerContextObserver* observer);
185 187
186 bool is_incognito() const { return is_incognito_; } 188 bool is_incognito() const { return is_incognito_; }
187 189
188 // Must be called from the IO thread. 190 // Must be called from the IO thread.
189 bool OriginHasForeignFetchRegistrations(const GURL& origin); 191 bool OriginHasForeignFetchRegistrations(const GURL& origin);
190 192
191 // Must be called from the UI thread. 193 // Must be called from the UI thread.
192 bool IsRunningNavigationHintTask(int render_process_id) const; 194 bool IsRunningNavigationHintTask(int render_process_id) const;
193 195
196 // Create a ServiceWorkerServiceImpl that is owned by this.
197 void CreateService(
198 mojo::InterfaceRequest<blink::mojom::ServiceWorkerService> request);
199
194 private: 200 private:
195 friend class BackgroundSyncManagerTest; 201 friend class BackgroundSyncManagerTest;
196 friend class base::RefCountedThreadSafe<ServiceWorkerContextWrapper>; 202 friend class base::RefCountedThreadSafe<ServiceWorkerContextWrapper>;
197 friend class EmbeddedWorkerTestHelper; 203 friend class EmbeddedWorkerTestHelper;
198 friend class EmbeddedWorkerBrowserTest; 204 friend class EmbeddedWorkerBrowserTest;
199 friend class ServiceWorkerDispatcherHost; 205 friend class ServiceWorkerDispatcherHost;
200 friend class ServiceWorkerInternalsUI; 206 friend class ServiceWorkerInternalsUI;
201 friend class ServiceWorkerNavigationHandleCore; 207 friend class ServiceWorkerNavigationHandleCore;
202 friend class ServiceWorkerProcessManager; 208 friend class ServiceWorkerProcessManager;
203 friend class ServiceWorkerRequestHandler; 209 friend class ServiceWorkerRequestHandler;
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 284
279 // Must be touched on the UI thread. 285 // Must be touched on the UI thread.
280 std::map<int, int> navigation_hint_task_count_per_process_; 286 std::map<int, int> navigation_hint_task_count_per_process_;
281 287
282 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerContextWrapper); 288 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerContextWrapper);
283 }; 289 };
284 290
285 } // namespace content 291 } // namespace content
286 292
287 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_WRAPPER_H_ 293 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_WRAPPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698