| 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 <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| 11 #include <vector> | 11 #include <vector> |
| 12 | 12 |
| 13 #include "base/basictypes.h" | 13 #include "base/basictypes.h" |
| 14 #include "base/callback.h" | 14 #include "base/callback.h" |
| 15 #include "base/gtest_prod_util.h" | 15 #include "base/gtest_prod_util.h" |
| 16 #include "base/id_map.h" | 16 #include "base/id_map.h" |
| 17 #include "base/memory/ref_counted.h" | 17 #include "base/memory/ref_counted.h" |
| 18 #include "base/memory/scoped_ptr.h" | 18 #include "base/memory/scoped_ptr.h" |
| 19 #include "base/observer_list.h" | 19 #include "base/observer_list.h" |
| 20 #include "base/timer/timer.h" | 20 #include "base/timer/timer.h" |
| 21 #include "content/browser/service_worker/embedded_worker_instance.h" | 21 #include "content/browser/service_worker/embedded_worker_instance.h" |
| 22 #include "content/browser/service_worker/service_worker_cache_listener.h" | |
| 23 #include "content/browser/service_worker/service_worker_script_cache_map.h" | 22 #include "content/browser/service_worker/service_worker_script_cache_map.h" |
| 24 #include "content/common/content_export.h" | 23 #include "content/common/content_export.h" |
| 25 #include "content/common/service_worker/service_worker_status_code.h" | 24 #include "content/common/service_worker/service_worker_status_code.h" |
| 26 #include "content/common/service_worker/service_worker_types.h" | 25 #include "content/common/service_worker/service_worker_types.h" |
| 27 #include "third_party/WebKit/public/platform/WebGeofencingEventType.h" | 26 #include "third_party/WebKit/public/platform/WebGeofencingEventType.h" |
| 28 #include "third_party/WebKit/public/platform/WebServiceWorkerEventResult.h" | 27 #include "third_party/WebKit/public/platform/WebServiceWorkerEventResult.h" |
| 29 | 28 |
| 30 // Windows headers will redefine SendMessage. | 29 // Windows headers will redefine SendMessage. |
| 31 #ifdef SendMessage | 30 #ifdef SendMessage |
| 32 #undef SendMessage | 31 #undef SendMessage |
| (...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 423 | 422 |
| 424 template <typename IDMAP> | 423 template <typename IDMAP> |
| 425 void RemoveCallbackAndStopIfDoomed(IDMAP* callbacks, int request_id); | 424 void RemoveCallbackAndStopIfDoomed(IDMAP* callbacks, int request_id); |
| 426 | 425 |
| 427 const int64 version_id_; | 426 const int64 version_id_; |
| 428 int64 registration_id_; | 427 int64 registration_id_; |
| 429 GURL script_url_; | 428 GURL script_url_; |
| 430 GURL scope_; | 429 GURL scope_; |
| 431 Status status_; | 430 Status status_; |
| 432 scoped_ptr<EmbeddedWorkerInstance> embedded_worker_; | 431 scoped_ptr<EmbeddedWorkerInstance> embedded_worker_; |
| 433 scoped_ptr<ServiceWorkerCacheListener> cache_listener_; | |
| 434 std::vector<StatusCallback> start_callbacks_; | 432 std::vector<StatusCallback> start_callbacks_; |
| 435 std::vector<StatusCallback> stop_callbacks_; | 433 std::vector<StatusCallback> stop_callbacks_; |
| 436 std::vector<base::Closure> status_change_callbacks_; | 434 std::vector<base::Closure> status_change_callbacks_; |
| 437 | 435 |
| 438 // Message callbacks. (Update HasInflightRequests() too when you update this | 436 // Message callbacks. (Update HasInflightRequests() too when you update this |
| 439 // list.) | 437 // list.) |
| 440 IDMap<StatusCallback, IDMapOwnPointer> activate_callbacks_; | 438 IDMap<StatusCallback, IDMapOwnPointer> activate_callbacks_; |
| 441 IDMap<StatusCallback, IDMapOwnPointer> install_callbacks_; | 439 IDMap<StatusCallback, IDMapOwnPointer> install_callbacks_; |
| 442 IDMap<FetchCallback, IDMapOwnPointer> fetch_callbacks_; | 440 IDMap<FetchCallback, IDMapOwnPointer> fetch_callbacks_; |
| 443 IDMap<StatusCallback, IDMapOwnPointer> sync_callbacks_; | 441 IDMap<StatusCallback, IDMapOwnPointer> sync_callbacks_; |
| (...skipping 30 matching lines...) Expand all Loading... |
| 474 scoped_ptr<net::HttpResponseInfo> main_script_http_info_; | 472 scoped_ptr<net::HttpResponseInfo> main_script_http_info_; |
| 475 | 473 |
| 476 base::WeakPtrFactory<ServiceWorkerVersion> weak_factory_; | 474 base::WeakPtrFactory<ServiceWorkerVersion> weak_factory_; |
| 477 | 475 |
| 478 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerVersion); | 476 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerVersion); |
| 479 }; | 477 }; |
| 480 | 478 |
| 481 } // namespace content | 479 } // namespace content |
| 482 | 480 |
| 483 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_VERSION_H_ | 481 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_VERSION_H_ |
| OLD | NEW |