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

Side by Side Diff: content/child/service_worker/service_worker_registration_handle_reference.h

Issue 2968123002: Introduce ServiceWorkerRegistrationOptions struct for service worker options (Closed)
Patch Set: address more comments Created 3 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_CHILD_SERVICE_WORKER_SERVICE_WORKER_REGISTRATION_HANDLE_REFERENC E_H_ 5 #ifndef CONTENT_CHILD_SERVICE_WORKER_SERVICE_WORKER_REGISTRATION_HANDLE_REFERENC E_H_
6 #define CONTENT_CHILD_SERVICE_WORKER_SERVICE_WORKER_REGISTRATION_HANDLE_REFERENC E_H_ 6 #define CONTENT_CHILD_SERVICE_WORKER_SERVICE_WORKER_REGISTRATION_HANDLE_REFERENC E_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 22 matching lines...) Expand all
33 // Creates a new ServiceWorkerRegistrationHandleReference by adopting a 33 // Creates a new ServiceWorkerRegistrationHandleReference by adopting a
34 // ref-count. 34 // ref-count.
35 static std::unique_ptr<ServiceWorkerRegistrationHandleReference> Adopt( 35 static std::unique_ptr<ServiceWorkerRegistrationHandleReference> Adopt(
36 const ServiceWorkerRegistrationObjectInfo& info, 36 const ServiceWorkerRegistrationObjectInfo& info,
37 ThreadSafeSender* sender); 37 ThreadSafeSender* sender);
38 38
39 ~ServiceWorkerRegistrationHandleReference(); 39 ~ServiceWorkerRegistrationHandleReference();
40 40
41 const ServiceWorkerRegistrationObjectInfo& info() const { return info_; } 41 const ServiceWorkerRegistrationObjectInfo& info() const { return info_; }
42 int handle_id() const { return info_.handle_id; } 42 int handle_id() const { return info_.handle_id; }
43 GURL scope() const { return info_.scope; } 43 GURL scope() const { return info_.options.scope; }
44 int64_t registration_id() const { return info_.registration_id; } 44 int64_t registration_id() const { return info_.registration_id; }
45 45
46 private: 46 private:
47 ServiceWorkerRegistrationHandleReference( 47 ServiceWorkerRegistrationHandleReference(
48 const ServiceWorkerRegistrationObjectInfo& info, 48 const ServiceWorkerRegistrationObjectInfo& info,
49 ThreadSafeSender* sender, 49 ThreadSafeSender* sender,
50 bool increment_ref_in_ctor); 50 bool increment_ref_in_ctor);
51 51
52 ServiceWorkerRegistrationObjectInfo info_; 52 ServiceWorkerRegistrationObjectInfo info_;
53 scoped_refptr<ThreadSafeSender> sender_; 53 scoped_refptr<ThreadSafeSender> sender_;
54 54
55 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerRegistrationHandleReference); 55 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerRegistrationHandleReference);
56 }; 56 };
57 57
58 } // namespace content 58 } // namespace content
59 59
60 #endif // CONTENT_CHILD_SERVICE_WORKER_SERVICE_WORKER_REGISTRATION_HANDLE_REFER ENCE_H_ 60 #endif // CONTENT_CHILD_SERVICE_WORKER_SERVICE_WORKER_REGISTRATION_HANDLE_REFER ENCE_H_
OLDNEW
« no previous file with comments | « content/child/service_worker/service_worker_dispatcher.cc ('k') | content/common/service_worker/service_worker_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698