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

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

Issue 2847983002: Use unique_ptr for Create{ServiceWorkerNetworkProvider,ApplicationCacheHost} (Closed)
Patch Set: addressed comments 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 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_RENDERER_SHARED_WORKER_EMBEDDED_SHARED_WORKER_STUB_H_ 5 #ifndef CONTENT_RENDERER_SHARED_WORKER_EMBEDDED_SHARED_WORKER_STUB_H_
6 #define CONTENT_RENDERER_SHARED_WORKER_EMBEDDED_SHARED_WORKER_STUB_H_ 6 #define CONTENT_RENDERER_SHARED_WORKER_EMBEDDED_SHARED_WORKER_STUB_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 61
62 // blink::WebSharedWorkerClient implementation. 62 // blink::WebSharedWorkerClient implementation.
63 void CountFeature(uint32_t feature) override; 63 void CountFeature(uint32_t feature) override;
64 void WorkerContextClosed() override; 64 void WorkerContextClosed() override;
65 void WorkerContextDestroyed() override; 65 void WorkerContextDestroyed() override;
66 void WorkerReadyForInspection() override; 66 void WorkerReadyForInspection() override;
67 void WorkerScriptLoaded() override; 67 void WorkerScriptLoaded() override;
68 void WorkerScriptLoadFailed() override; 68 void WorkerScriptLoadFailed() override;
69 void SelectAppCacheID(long long) override; 69 void SelectAppCacheID(long long) override;
70 blink::WebNotificationPresenter* NotificationPresenter() override; 70 blink::WebNotificationPresenter* NotificationPresenter() override;
71 blink::WebApplicationCacheHost* CreateApplicationCacheHost( 71 std::unique_ptr<blink::WebApplicationCacheHost> CreateApplicationCacheHost(
72 blink::WebApplicationCacheHostClient*) override; 72 blink::WebApplicationCacheHostClient*) override;
73 blink::WebWorkerContentSettingsClientProxy* 73 blink::WebWorkerContentSettingsClientProxy*
74 CreateWorkerContentSettingsClientProxy( 74 CreateWorkerContentSettingsClientProxy(
75 const blink::WebSecurityOrigin& origin) override; 75 const blink::WebSecurityOrigin& origin) override;
76 blink::WebServiceWorkerNetworkProvider* CreateServiceWorkerNetworkProvider() 76 std::unique_ptr<blink::WebServiceWorkerNetworkProvider>
77 override; 77 CreateServiceWorkerNetworkProvider() override;
78 void SendDevToolsMessage(int session_id, 78 void SendDevToolsMessage(int session_id,
79 int call_id, 79 int call_id,
80 const blink::WebString& message, 80 const blink::WebString& message,
81 const blink::WebString& state) override; 81 const blink::WebString& state) override;
82 blink::WebDevToolsAgentClient::WebKitClientMessageLoop* 82 blink::WebDevToolsAgentClient::WebKitClientMessageLoop*
83 CreateDevToolsMessageLoop() override; 83 CreateDevToolsMessageLoop() override;
84 std::unique_ptr<blink::WebWorkerFetchContext> CreateWorkerFetchContext( 84 std::unique_ptr<blink::WebWorkerFetchContext> CreateWorkerFetchContext(
85 blink::WebServiceWorkerNetworkProvider*) override; 85 blink::WebServiceWorkerNetworkProvider*) override;
86 86
87 private: 87 private:
(...skipping 15 matching lines...) Expand all
103 bool running_ = false; 103 bool running_ = false;
104 GURL url_; 104 GURL url_;
105 blink::WebSharedWorker* impl_ = nullptr; 105 blink::WebSharedWorker* impl_ = nullptr;
106 std::unique_ptr<SharedWorkerDevToolsAgent> worker_devtools_agent_; 106 std::unique_ptr<SharedWorkerDevToolsAgent> worker_devtools_agent_;
107 107
108 using PendingChannel = std::pair<int /* connection_request_id */, 108 using PendingChannel = std::pair<int /* connection_request_id */,
109 std::unique_ptr<WebMessagePortChannelImpl>>; 109 std::unique_ptr<WebMessagePortChannelImpl>>;
110 std::vector<PendingChannel> pending_channels_; 110 std::vector<PendingChannel> pending_channels_;
111 111
112 ScopedChildProcessReference process_ref_; 112 ScopedChildProcessReference process_ref_;
113 WebApplicationCacheHostImpl* app_cache_host_ = nullptr; 113 WebApplicationCacheHostImpl* app_cache_host_ = nullptr; // Not owned.
114 DISALLOW_COPY_AND_ASSIGN(EmbeddedSharedWorkerStub); 114 DISALLOW_COPY_AND_ASSIGN(EmbeddedSharedWorkerStub);
115 }; 115 };
116 116
117 } // namespace content 117 } // namespace content
118 118
119 #endif // CONTENT_RENDERER_SHARED_WORKER_EMBEDDED_SHARED_WORKER_STUB_H_ 119 #endif // CONTENT_RENDERER_SHARED_WORKER_EMBEDDED_SHARED_WORKER_STUB_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698