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

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

Issue 70533005: More scaffolding, add class ServiceWorkerProviderHost. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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 | Annotate | Revision Log
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_
6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_
7
8 #include "base/memory/ref_counted.h"
9
10 namespace content {
11
12 class ServiceWorkerVersion;
13
14 // This class is the browser-process representation of a serice worker
15 // provider. There is a provider per document and the lifetime of this
16 // object is tied to the lifetime of its document in the renderer process.
17 // This class holds service worker state this is scoped to an individual
18 // document.
19 class ServiceWorkerProviderHost {
20 public:
21 ServiceWorkerProviderHost(int process_id,
22 int provider_id);
23 ~ServiceWorkerProviderHost();
24
25 int process_id() const { return process_id_; }
26 int provider_id() const { return provider_id_; }
27
28 // The service worker version that corresponds with navigator.serviceWorker
29 // for our document.
30 ServiceWorkerVersion* associated_version() const {
31 return associated_version_.get();
32 }
33
34 private:
35 const int process_id_;
36 const int provider_id_;
37 scoped_refptr<ServiceWorkerVersion> associated_version_;
38 };
39
40 } // namespace content
41
42 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698