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

Side by Side Diff: content/renderer/service_worker/embedded_worker_instance_client_impl.h

Issue 2936623002: Implement dumb URLLoader{Factory} for ServiceWorker script loading (for try)
Patch Set: . Created 3 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 (c) 2016 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2016 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_SERVICE_WORKER_EMBEDDED_WORKER_INSTANCE_CLIENT_IMPL_H_ 5 #ifndef CONTENT_RENDERER_SERVICE_WORKER_EMBEDDED_WORKER_INSTANCE_CLIENT_IMPL_H_
6 #define CONTENT_RENDERER_SERVICE_WORKER_EMBEDDED_WORKER_INSTANCE_CLIENT_IMPL_H_ 6 #define CONTENT_RENDERER_SERVICE_WORKER_EMBEDDED_WORKER_INSTANCE_CLIENT_IMPL_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/id_map.h" 10 #include "base/id_map.h"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 std::unique_ptr<EmbeddedWorkerDevToolsAgent> devtools_agent_; 64 std::unique_ptr<EmbeddedWorkerDevToolsAgent> devtools_agent_;
65 }; 65 };
66 66
67 EmbeddedWorkerInstanceClientImpl( 67 EmbeddedWorkerInstanceClientImpl(
68 mojo::InterfaceRequest<mojom::EmbeddedWorkerInstanceClient> request); 68 mojo::InterfaceRequest<mojom::EmbeddedWorkerInstanceClient> request);
69 69
70 // mojom::EmbeddedWorkerInstanceClient implementation 70 // mojom::EmbeddedWorkerInstanceClient implementation
71 void StartWorker( 71 void StartWorker(
72 const EmbeddedWorkerStartParams& params, 72 const EmbeddedWorkerStartParams& params,
73 mojom::ServiceWorkerEventDispatcherRequest dispatcher_request, 73 mojom::ServiceWorkerEventDispatcherRequest dispatcher_request,
74 mojom::EmbeddedWorkerInstanceHostAssociatedPtrInfo instance_host) 74 mojom::EmbeddedWorkerInstanceHostAssociatedPtrInfo instance_host,
75 override; 75 mojom::ServiceWorkerProviderClientInfoPtr provider_client_info) override;
76 void StopWorker() override; 76 void StopWorker() override;
77 void ResumeAfterDownload() override; 77 void ResumeAfterDownload() override;
78 void AddMessageToConsole(blink::WebConsoleMessage::Level level, 78 void AddMessageToConsole(blink::WebConsoleMessage::Level level,
79 const std::string& message) override; 79 const std::string& message) override;
80 80
81 // Handler of connection error bound to |binding_| 81 // Handler of connection error bound to |binding_|
82 void OnError(); 82 void OnError();
83 83
84 std::unique_ptr<WorkerWrapper> StartWorkerContext( 84 std::unique_ptr<WorkerWrapper> StartWorkerContext(
85 const EmbeddedWorkerStartParams& params, 85 const EmbeddedWorkerStartParams& params,
86 std::unique_ptr<ServiceWorkerContextClient> context_client); 86 std::unique_ptr<ServiceWorkerContextClient> context_client);
87 87
88 mojo::Binding<mojom::EmbeddedWorkerInstanceClient> binding_; 88 mojo::Binding<mojom::EmbeddedWorkerInstanceClient> binding_;
89 89
90 // This is valid before StartWorker is called. After that, this object 90 // This is valid before StartWorker is called. After that, this object
91 // will be passed to ServiceWorkerContextClient. 91 // will be passed to ServiceWorkerContextClient.
92 std::unique_ptr<EmbeddedWorkerInstanceClientImpl> temporal_self_; 92 std::unique_ptr<EmbeddedWorkerInstanceClientImpl> temporal_self_;
93 93
94 // nullptr means the worker is not running. 94 // nullptr means the worker is not running.
95 std::unique_ptr<WorkerWrapper> wrapper_; 95 std::unique_ptr<WorkerWrapper> wrapper_;
96 96
97 DISALLOW_COPY_AND_ASSIGN(EmbeddedWorkerInstanceClientImpl); 97 DISALLOW_COPY_AND_ASSIGN(EmbeddedWorkerInstanceClientImpl);
98 }; 98 };
99 99
100 } // namespace content 100 } // namespace content
101 101
102 #endif // CONTENT_RENDERER_SERVICE_WORKER_EMBEDDED_WORKER_INSTANCE_CLIENT_IMPL_ H_ 102 #endif // CONTENT_RENDERER_SERVICE_WORKER_EMBEDDED_WORKER_INSTANCE_CLIENT_IMPL_ H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698