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

Side by Side Diff: content/browser/service_worker/service_worker_provider_host.h

Issue 1141813002: ServiceWorker: Introduce ServiceWorkerMessageEvent to replace MessageEvent (2/3). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_ 5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_
6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_ 6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_
7 7
8 #include <set> 8 #include <set>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 // new registration association while a navigation is occurring and 148 // new registration association while a navigation is occurring and
149 // an existing registration is being looked for. 149 // an existing registration is being looked for.
150 void SetAllowAssociation(bool allow) { allow_association_ = allow; } 150 void SetAllowAssociation(bool allow) { allow_association_ = allow; }
151 151
152 // Returns true if the context referred to by this host (i.e. |context_|) is 152 // Returns true if the context referred to by this host (i.e. |context_|) is
153 // still alive. 153 // still alive.
154 bool IsContextAlive(); 154 bool IsContextAlive();
155 155
156 // Dispatches message event to the document. 156 // Dispatches message event to the document.
157 void PostMessage( 157 void PostMessage(
158 ServiceWorkerVersion* version,
158 const base::string16& message, 159 const base::string16& message,
159 const std::vector<TransferredMessagePort>& sent_message_ports); 160 const std::vector<TransferredMessagePort>& sent_message_ports);
160 161
161 // Activates the WebContents associated with 162 // Activates the WebContents associated with
162 // { render_process_id_, render_frame_id_ }. 163 // { render_process_id_, render_frame_id_ }.
163 // Runs the |callback| with the updated ServiceWorkerClientInfo in parameter. 164 // Runs the |callback| with the updated ServiceWorkerClientInfo in parameter.
164 void Focus(const GetClientInfoCallback& callback); 165 void Focus(const GetClientInfoCallback& callback);
165 166
166 // Asks the renderer to send back the document information. 167 // Asks the renderer to send back the document information.
167 void GetWindowClientInfo(const GetClientInfoCallback& callback) const; 168 void GetWindowClientInfo(const GetClientInfoCallback& callback) const;
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 bool allow_association_; 296 bool allow_association_;
296 297
297 std::vector<base::Closure> queued_events_; 298 std::vector<base::Closure> queued_events_;
298 299
299 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerProviderHost); 300 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerProviderHost);
300 }; 301 };
301 302
302 } // namespace content 303 } // namespace content
303 304
304 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_ 305 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698