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

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

Issue 992353003: Decouple Cache Storage messaging from Service Worker/Embedded Worker (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 5 years, 9 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_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 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
429 428
430 template <typename IDMAP> 429 template <typename IDMAP>
431 void RemoveCallbackAndStopIfDoomed(IDMAP* callbacks, int request_id); 430 void RemoveCallbackAndStopIfDoomed(IDMAP* callbacks, int request_id);
432 431
433 const int64 version_id_; 432 const int64 version_id_;
434 int64 registration_id_; 433 int64 registration_id_;
435 GURL script_url_; 434 GURL script_url_;
436 GURL scope_; 435 GURL scope_;
437 Status status_; 436 Status status_;
438 scoped_ptr<EmbeddedWorkerInstance> embedded_worker_; 437 scoped_ptr<EmbeddedWorkerInstance> embedded_worker_;
439 scoped_ptr<ServiceWorkerCacheListener> cache_listener_;
440 std::vector<StatusCallback> start_callbacks_; 438 std::vector<StatusCallback> start_callbacks_;
441 std::vector<StatusCallback> stop_callbacks_; 439 std::vector<StatusCallback> stop_callbacks_;
442 std::vector<base::Closure> status_change_callbacks_; 440 std::vector<base::Closure> status_change_callbacks_;
443 441
444 // Message callbacks. (Update HasInflightRequests() too when you update this 442 // Message callbacks. (Update HasInflightRequests() too when you update this
445 // list.) 443 // list.)
446 IDMap<StatusCallback, IDMapOwnPointer> activate_callbacks_; 444 IDMap<StatusCallback, IDMapOwnPointer> activate_callbacks_;
447 IDMap<StatusCallback, IDMapOwnPointer> install_callbacks_; 445 IDMap<StatusCallback, IDMapOwnPointer> install_callbacks_;
448 IDMap<FetchCallback, IDMapOwnPointer> fetch_callbacks_; 446 IDMap<FetchCallback, IDMapOwnPointer> fetch_callbacks_;
449 IDMap<StatusCallback, IDMapOwnPointer> sync_callbacks_; 447 IDMap<StatusCallback, IDMapOwnPointer> sync_callbacks_;
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
481 scoped_ptr<net::HttpResponseInfo> main_script_http_info_; 479 scoped_ptr<net::HttpResponseInfo> main_script_http_info_;
482 480
483 base::WeakPtrFactory<ServiceWorkerVersion> weak_factory_; 481 base::WeakPtrFactory<ServiceWorkerVersion> weak_factory_;
484 482
485 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerVersion); 483 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerVersion);
486 }; 484 };
487 485
488 } // namespace content 486 } // namespace content
489 487
490 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_VERSION_H_ 488 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_VERSION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698