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

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

Issue 1149383004: [3/5 chromium] Shows the clients which are controlled by ServiceWorker in DevTools. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: incorporated dcheng's comment Created 5 years, 6 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_NETWORK_PROVIDER_H_ 5 #ifndef CONTENT_CHILD_SERVICE_WORKER_SERVICE_WORKER_NETWORK_PROVIDER_H_
6 #define CONTENT_CHILD_SERVICE_WORKER_SERVICE_WORKER_NETWORK_PROVIDER_H_ 6 #define CONTENT_CHILD_SERVICE_WORKER_SERVICE_WORKER_NETWORK_PROVIDER_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 19 matching lines...) Expand all
30 : public base::SupportsUserData::Data { 30 : public base::SupportsUserData::Data {
31 public: 31 public:
32 // Ownership is transferred to the DocumentState. 32 // Ownership is transferred to the DocumentState.
33 static void AttachToDocumentState( 33 static void AttachToDocumentState(
34 base::SupportsUserData* document_state, 34 base::SupportsUserData* document_state,
35 scoped_ptr<ServiceWorkerNetworkProvider> network_provider); 35 scoped_ptr<ServiceWorkerNetworkProvider> network_provider);
36 36
37 static ServiceWorkerNetworkProvider* FromDocumentState( 37 static ServiceWorkerNetworkProvider* FromDocumentState(
38 base::SupportsUserData* document_state); 38 base::SupportsUserData* document_state);
39 39
40 ServiceWorkerNetworkProvider(int render_frame_id, 40 ServiceWorkerNetworkProvider(int route_id, ServiceWorkerProviderType type);
41 ServiceWorkerProviderType type);
42 ~ServiceWorkerNetworkProvider() override; 41 ~ServiceWorkerNetworkProvider() override;
43 42
44 int provider_id() const { return provider_id_; } 43 int provider_id() const { return provider_id_; }
45 ServiceWorkerProviderContext* context() { return context_.get(); } 44 ServiceWorkerProviderContext* context() { return context_.get(); }
46 45
47 // This method is called for a provider that's associated with a 46 // This method is called for a provider that's associated with a
48 // running service worker script. The version_id indicates which 47 // running service worker script. The version_id indicates which
49 // ServiceWorkerVersion should be used. 48 // ServiceWorkerVersion should be used.
50 void SetServiceWorkerVersionId(int64 version_id); 49 void SetServiceWorkerVersionId(int64 version_id);
51 50
52 private: 51 private:
53 const int provider_id_; 52 const int provider_id_;
54 scoped_refptr<ServiceWorkerProviderContext> context_; 53 scoped_refptr<ServiceWorkerProviderContext> context_;
55 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerNetworkProvider); 54 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerNetworkProvider);
56 }; 55 };
57 56
58 } // namespace content 57 } // namespace content
59 58
60 #endif // CONTENT_CHILD_SERVICE_WORKER_SERVICE_WORKER_NETWORK_PROVIDER_H_ 59 #endif // CONTENT_CHILD_SERVICE_WORKER_SERVICE_WORKER_NETWORK_PROVIDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698