| 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 393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 426 | 425 |
| 427 template <typename IDMAP> | 426 template <typename IDMAP> |
| 428 void RemoveCallbackAndStopIfDoomed(IDMAP* callbacks, int request_id); | 427 void RemoveCallbackAndStopIfDoomed(IDMAP* callbacks, int request_id); |
| 429 | 428 |
| 430 const int64 version_id_; | 429 const int64 version_id_; |
| 431 int64 registration_id_; | 430 int64 registration_id_; |
| 432 GURL script_url_; | 431 GURL script_url_; |
| 433 GURL scope_; | 432 GURL scope_; |
| 434 Status status_; | 433 Status status_; |
| 435 scoped_ptr<EmbeddedWorkerInstance> embedded_worker_; | 434 scoped_ptr<EmbeddedWorkerInstance> embedded_worker_; |
| 436 scoped_ptr<ServiceWorkerCacheListener> cache_listener_; | |
| 437 std::vector<StatusCallback> start_callbacks_; | 435 std::vector<StatusCallback> start_callbacks_; |
| 438 std::vector<StatusCallback> stop_callbacks_; | 436 std::vector<StatusCallback> stop_callbacks_; |
| 439 std::vector<base::Closure> status_change_callbacks_; | 437 std::vector<base::Closure> status_change_callbacks_; |
| 440 | 438 |
| 441 // Message callbacks. (Update HasInflightRequests() too when you update this | 439 // Message callbacks. (Update HasInflightRequests() too when you update this |
| 442 // list.) | 440 // list.) |
| 443 IDMap<StatusCallback, IDMapOwnPointer> activate_callbacks_; | 441 IDMap<StatusCallback, IDMapOwnPointer> activate_callbacks_; |
| 444 IDMap<StatusCallback, IDMapOwnPointer> install_callbacks_; | 442 IDMap<StatusCallback, IDMapOwnPointer> install_callbacks_; |
| 445 IDMap<FetchCallback, IDMapOwnPointer> fetch_callbacks_; | 443 IDMap<FetchCallback, IDMapOwnPointer> fetch_callbacks_; |
| 446 IDMap<StatusCallback, IDMapOwnPointer> sync_callbacks_; | 444 IDMap<StatusCallback, IDMapOwnPointer> sync_callbacks_; |
| (...skipping 29 matching lines...) Expand all Loading... |
| 476 scoped_ptr<net::HttpResponseInfo> main_script_http_info_; | 474 scoped_ptr<net::HttpResponseInfo> main_script_http_info_; |
| 477 | 475 |
| 478 base::WeakPtrFactory<ServiceWorkerVersion> weak_factory_; | 476 base::WeakPtrFactory<ServiceWorkerVersion> weak_factory_; |
| 479 | 477 |
| 480 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerVersion); | 478 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerVersion); |
| 481 }; | 479 }; |
| 482 | 480 |
| 483 } // namespace content | 481 } // namespace content |
| 484 | 482 |
| 485 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_VERSION_H_ | 483 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_VERSION_H_ |
| OLD | NEW |