| OLD | NEW | 
|---|
| 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_VERSION_H_ | 5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_VERSION_H_ | 
| 6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_VERSION_H_ | 6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_VERSION_H_ | 
| 7 | 7 | 
| 8 #include <map> | 8 #include <map> | 
| 9 #include <string> | 9 #include <string> | 
| 10 #include <vector> | 10 #include <vector> | 
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 233       const blink::WebCircularGeofencingRegion& region); | 233       const blink::WebCircularGeofencingRegion& region); | 
| 234 | 234 | 
| 235   // Sends a cross origin connect event to the associated embedded worker and | 235   // Sends a cross origin connect event to the associated embedded worker and | 
| 236   // asynchronously calls |callback| with the response from the worker. | 236   // asynchronously calls |callback| with the response from the worker. | 
| 237   // | 237   // | 
| 238   // This must be called when the status() is ACTIVATED. | 238   // This must be called when the status() is ACTIVATED. | 
| 239   void DispatchCrossOriginConnectEvent( | 239   void DispatchCrossOriginConnectEvent( | 
| 240       const CrossOriginConnectCallback& callback, | 240       const CrossOriginConnectCallback& callback, | 
| 241       const CrossOriginServiceWorkerClient& client); | 241       const CrossOriginServiceWorkerClient& client); | 
| 242 | 242 | 
|  | 243   // Sends a cross origin message event to the associated embedded worker and | 
|  | 244   // asynchronously calls |callback| when the message was sent (or failed to | 
|  | 245   // sent). | 
|  | 246   // It is the responsibility of the code calling this method to make sure that | 
|  | 247   // any transferred message ports are put on hold while potentially a process | 
|  | 248   // for the service worker is spun up. | 
|  | 249   // | 
|  | 250   // This must be called when the status() is ACTIVATED. | 
|  | 251   void DispatchCrossOriginMessageEvent( | 
|  | 252       const CrossOriginServiceWorkerClient& client, | 
|  | 253       const base::string16& message, | 
|  | 254       const std::vector<int>& sent_message_port_ids, | 
|  | 255       const StatusCallback& callback); | 
|  | 256 | 
| 243   // Adds and removes |provider_host| as a controllee of this ServiceWorker. | 257   // Adds and removes |provider_host| as a controllee of this ServiceWorker. | 
| 244   // A potential controllee is a host having the version as its .installing | 258   // A potential controllee is a host having the version as its .installing | 
| 245   // or .waiting version. | 259   // or .waiting version. | 
| 246   void AddControllee(ServiceWorkerProviderHost* provider_host); | 260   void AddControllee(ServiceWorkerProviderHost* provider_host); | 
| 247   void RemoveControllee(ServiceWorkerProviderHost* provider_host); | 261   void RemoveControllee(ServiceWorkerProviderHost* provider_host); | 
| 248 | 262 | 
| 249   // Returns if it has controllee. | 263   // Returns if it has controllee. | 
| 250   bool HasControllee() const { return !controllee_map_.empty(); } | 264   bool HasControllee() const { return !controllee_map_.empty(); } | 
| 251 | 265 | 
| 252   // Adds and removes Listeners. | 266   // Adds and removes Listeners. | 
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 376   bool skip_waiting_; | 390   bool skip_waiting_; | 
| 377 | 391 | 
| 378   base::WeakPtrFactory<ServiceWorkerVersion> weak_factory_; | 392   base::WeakPtrFactory<ServiceWorkerVersion> weak_factory_; | 
| 379 | 393 | 
| 380   DISALLOW_COPY_AND_ASSIGN(ServiceWorkerVersion); | 394   DISALLOW_COPY_AND_ASSIGN(ServiceWorkerVersion); | 
| 381 }; | 395 }; | 
| 382 | 396 | 
| 383 }  // namespace content | 397 }  // namespace content | 
| 384 | 398 | 
| 385 #endif  // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_VERSION_H_ | 399 #endif  // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_VERSION_H_ | 
| OLD | NEW | 
|---|