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

Side by Side Diff: content/renderer/shared_worker/shared_worker_repository.h

Issue 2881073003: Support DataSaver for SharedWorker (Closed)
Patch Set: fix #include "public/web/WebDataSaverFlag.h" Created 3 years, 7 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_RENDERER_SHARED_WORKER_SHARED_WORKER_REPOSITORY_H_ 5 #ifndef CONTENT_RENDERER_SHARED_WORKER_SHARED_WORKER_REPOSITORY_H_
6 #define CONTENT_RENDERER_SHARED_WORKER_SHARED_WORKER_REPOSITORY_H_ 6 #define CONTENT_RENDERER_SHARED_WORKER_SHARED_WORKER_REPOSITORY_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <set> 9 #include <set>
10 10
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "third_party/WebKit/public/platform/WebAddressSpace.h" 12 #include "third_party/WebKit/public/platform/WebAddressSpace.h"
13 #include "third_party/WebKit/public/platform/WebContentSecurityPolicy.h" 13 #include "third_party/WebKit/public/platform/WebContentSecurityPolicy.h"
14 #include "third_party/WebKit/public/web/WebDataSaverFlag.h"
14 #include "third_party/WebKit/public/web/WebSharedWorkerCreationContextType.h" 15 #include "third_party/WebKit/public/web/WebSharedWorkerCreationContextType.h"
15 #include "third_party/WebKit/public/web/WebSharedWorkerRepositoryClient.h" 16 #include "third_party/WebKit/public/web/WebSharedWorkerRepositoryClient.h"
16 17
17 namespace content { 18 namespace content {
18 19
19 class RenderFrameImpl; 20 class RenderFrameImpl;
20 21
21 class SharedWorkerRepository final 22 class SharedWorkerRepository final
22 : public blink::WebSharedWorkerRepositoryClient { 23 : public blink::WebSharedWorkerRepositoryClient {
23 public: 24 public:
24 explicit SharedWorkerRepository(RenderFrameImpl* render_frame); 25 explicit SharedWorkerRepository(RenderFrameImpl* render_frame);
25 ~SharedWorkerRepository(); 26 ~SharedWorkerRepository();
26 27
27 // WebSharedWorkerRepositoryClient overrides. 28 // WebSharedWorkerRepositoryClient overrides.
28 void Connect( 29 void Connect(
29 const blink::WebURL& url, 30 const blink::WebURL& url,
30 const blink::WebString& name, 31 const blink::WebString& name,
31 DocumentID document_id, 32 DocumentID document_id,
32 const blink::WebString& content_security_policy, 33 const blink::WebString& content_security_policy,
33 blink::WebContentSecurityPolicyType, 34 blink::WebContentSecurityPolicyType,
34 blink::WebAddressSpace, 35 blink::WebAddressSpace,
35 blink::WebSharedWorkerCreationContextType, 36 blink::WebSharedWorkerCreationContextType,
37 blink::WebDataSaverFlag,
36 std::unique_ptr<blink::WebMessagePortChannel> channel, 38 std::unique_ptr<blink::WebMessagePortChannel> channel,
37 std::unique_ptr<blink::WebSharedWorkerConnectListener> listener) override; 39 std::unique_ptr<blink::WebSharedWorkerConnectListener> listener) override;
38 void DocumentDetached(DocumentID document_id) override; 40 void DocumentDetached(DocumentID document_id) override;
39 41
40 private: 42 private:
41 RenderFrameImpl* render_frame_; 43 RenderFrameImpl* render_frame_;
42 std::set<DocumentID> documents_with_workers_; 44 std::set<DocumentID> documents_with_workers_;
43 45
44 DISALLOW_COPY_AND_ASSIGN(SharedWorkerRepository); 46 DISALLOW_COPY_AND_ASSIGN(SharedWorkerRepository);
45 }; 47 };
46 48
47 } // namespace content 49 } // namespace content
48 50
49 #endif // CONTENT_RENDERER_SHARED_WORKER_SHARED_WORKER_REPOSITORY_H_ 51 #endif // CONTENT_RENDERER_SHARED_WORKER_SHARED_WORKER_REPOSITORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698