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

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

Issue 70683002: Stub out ServiceWorkerRegistration and Version classes (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 (c) 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_VERSION_H_
6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_VERSION_H_
7
8 #include "base/basictypes.h"
9 #include "base/gtest_prod_util.h"
10 #include "base/memory/ref_counted.h"
11 #include "content/common/content_export.h"
12
13 class GURL;
14
15 namespace content {
16
17 class ServiceWorkerRegistration;
18
19 // This class acts as a persistent instance
20 class CONTENT_EXPORT ServiceWorkerVersion
21 : NON_EXPORTED_BASE(public base::RefCounted<ServiceWorkerVersion>) {
22 public:
23 explicit ServiceWorkerVersion(
24 scoped_refptr<ServiceWorkerRegistration> registration);
25
26 void Shutdown();
27
28 private:
29 ~ServiceWorkerVersion();
30 friend class base::RefCounted<ServiceWorkerVersion>;
31 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerRegistrationTest, Shutdown);
32 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerRegistrationTest, ActivateFirst);
33 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerRegistrationTest, ActivateInWaiting);
34 bool IsShutdown() const { return is_shutdown_; }
35
36 bool is_shutdown_;
37 scoped_refptr<ServiceWorkerRegistration> registration_;
38
39 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerVersion);
40 };
41 } // namespace content
42 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_VERSION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698