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

Side by Side Diff: content/browser/shared_worker/shared_worker_service_impl.h

Issue 2604733002: SharedWorker: Make shared workers keyed by a pair of url and name (Closed)
Patch Set: clean up Created 3 years, 11 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_BROWSER_SHARED_WORKER_SHARED_WORKER_SERVICE_IMPL_H_ 5 #ifndef CONTENT_BROWSER_SHARED_WORKER_SHARED_WORKER_SERVICE_IMPL_H_
6 #define CONTENT_BROWSER_SHARED_WORKER_SHARED_WORKER_SERVICE_IMPL_H_ 6 #define CONTENT_BROWSER_SHARED_WORKER_SHARED_WORKER_SERVICE_IMPL_H_
7 7
8 #include <map> 8 #include <map>
9 #include <memory> 9 #include <memory>
10 #include <set> 10 #include <set>
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 SharedWorkerServiceImpl(); 119 SharedWorkerServiceImpl();
120 ~SharedWorkerServiceImpl() override; 120 ~SharedWorkerServiceImpl() override;
121 121
122 void ResetForTesting(); 122 void ResetForTesting();
123 123
124 // Reserves the render process to create Shared Worker. This reservation 124 // Reserves the render process to create Shared Worker. This reservation
125 // procedure will be executed on UI thread and 125 // procedure will be executed on UI thread and
126 // RenderProcessReservedCallback() or RenderProcessReserveFailedCallback() 126 // RenderProcessReservedCallback() or RenderProcessReserveFailedCallback()
127 // will be called on IO thread. Returns blink::WebWorkerCreationErrorNone or 127 // will be called on IO thread. Returns blink::WebWorkerCreationErrorNone or
128 // blink::WebWorkerCreationErrorSecureContextMismatch on success. 128 // blink::WebWorkerCreationErrorSecureContextMismatch on success.
129 // (SecureContextMismatch is used for UMA and should be handled as success. 129 // (SecureContextMismatch is used for UMA and should be handled as success.)
130 // See CreateWorkerErrorIsFatal() in shared_worker_message_filter.cc for
131 // details.)
132 blink::WebWorkerCreationError ReserveRenderProcessToCreateWorker( 130 blink::WebWorkerCreationError ReserveRenderProcessToCreateWorker(
133 std::unique_ptr<SharedWorkerPendingInstance> pending_instance); 131 std::unique_ptr<SharedWorkerPendingInstance> pending_instance);
134 132
135 // Called after the render process is reserved to create Shared Worker in it. 133 // Called after the render process is reserved to create Shared Worker in it.
136 void RenderProcessReservedCallback(int pending_instance_id, 134 void RenderProcessReservedCallback(int pending_instance_id,
137 int worker_process_id, 135 int worker_process_id,
138 int worker_route_id, 136 int worker_route_id,
139 bool is_new_worker, 137 bool is_new_worker,
140 bool pause_on_start); 138 bool pause_on_start);
141 139
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 int next_pending_instance_id_; 172 int next_pending_instance_id_;
175 173
176 base::ObserverList<WorkerServiceObserver> observers_; 174 base::ObserverList<WorkerServiceObserver> observers_;
177 175
178 DISALLOW_COPY_AND_ASSIGN(SharedWorkerServiceImpl); 176 DISALLOW_COPY_AND_ASSIGN(SharedWorkerServiceImpl);
179 }; 177 };
180 178
181 } // namespace content 179 } // namespace content
182 180
183 #endif // CONTENT_BROWSER_SHARED_WORKER_SHARED_WORKER_SERVICE_IMPL_H_ 181 #endif // CONTENT_BROWSER_SHARED_WORKER_SHARED_WORKER_SERVICE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698