OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_RENDERER_SERVICE_WORKER_SERVICE_WORKER_SCRIPT_CONTEXT_H_ | 5 #ifndef CONTENT_RENDERER_SERVICE_WORKER_SERVICE_WORKER_SCRIPT_CONTEXT_H_ |
6 #define CONTENT_RENDERER_SERVICE_WORKER_SERVICE_WORKER_SCRIPT_CONTEXT_H_ | 6 #define CONTENT_RENDERER_SERVICE_WORKER_SERVICE_WORKER_SCRIPT_CONTEXT_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
13 #include "base/id_map.h" | 13 #include "base/id_map.h" |
14 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
15 #include "base/strings/string16.h" | 15 #include "base/strings/string16.h" |
16 #include "base/time/time.h" | 16 #include "base/time/time.h" |
17 #include "content/child/webmessageportchannel_impl.h" | 17 #include "content/child/webmessageportchannel_impl.h" |
18 #include "content/common/service_worker/service_worker_types.h" | 18 #include "content/common/service_worker/service_worker_types.h" |
19 #include "content/renderer/service_worker/service_worker_cache_storage_dispatche
r.h" | 19 #include "content/renderer/service_worker/service_worker_cache_storage_dispatche
r.h" |
| 20 #include "third_party/WebKit/public/platform/WebGeofencingEventType.h" |
20 #include "third_party/WebKit/public/platform/WebMessagePortChannel.h" | 21 #include "third_party/WebKit/public/platform/WebMessagePortChannel.h" |
21 #include "third_party/WebKit/public/platform/WebServiceWorkerClientsInfo.h" | 22 #include "third_party/WebKit/public/platform/WebServiceWorkerClientsInfo.h" |
22 #include "third_party/WebKit/public/platform/WebServiceWorkerEventResult.h" | 23 #include "third_party/WebKit/public/platform/WebServiceWorkerEventResult.h" |
23 | 24 |
24 namespace blink { | 25 namespace blink { |
| 26 struct WebCircularGeofencingRegion; |
25 class WebServiceWorkerContextProxy; | 27 class WebServiceWorkerContextProxy; |
26 } | 28 } |
27 | 29 |
28 namespace IPC { | 30 namespace IPC { |
29 class Message; | 31 class Message; |
30 } | 32 } |
31 | 33 |
32 namespace content { | 34 namespace content { |
33 | 35 |
34 class EmbeddedWorkerContextClient; | 36 class EmbeddedWorkerContextClient; |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 private: | 77 private: |
76 typedef IDMap<blink::WebServiceWorkerClientsCallbacks, IDMapOwnPointer> | 78 typedef IDMap<blink::WebServiceWorkerClientsCallbacks, IDMapOwnPointer> |
77 ClientsCallbacksMap; | 79 ClientsCallbacksMap; |
78 | 80 |
79 | 81 |
80 void OnActivateEvent(int request_id); | 82 void OnActivateEvent(int request_id); |
81 void OnInstallEvent(int request_id, int active_version_id); | 83 void OnInstallEvent(int request_id, int active_version_id); |
82 void OnFetchEvent(int request_id, const ServiceWorkerFetchRequest& request); | 84 void OnFetchEvent(int request_id, const ServiceWorkerFetchRequest& request); |
83 void OnSyncEvent(int request_id); | 85 void OnSyncEvent(int request_id); |
84 void OnPushEvent(int request_id, const std::string& data); | 86 void OnPushEvent(int request_id, const std::string& data); |
| 87 void OnGeofencingEvent(int request_id, |
| 88 blink::WebGeofencingEventType event_type, |
| 89 const std::string& region_id, |
| 90 const blink::WebCircularGeofencingRegion& region); |
85 void OnPostMessage(const base::string16& message, | 91 void OnPostMessage(const base::string16& message, |
86 const std::vector<int>& sent_message_port_ids, | 92 const std::vector<int>& sent_message_port_ids, |
87 const std::vector<int>& new_routing_ids); | 93 const std::vector<int>& new_routing_ids); |
88 void OnDidGetClientDocuments( | 94 void OnDidGetClientDocuments( |
89 int request_id, const std::vector<int>& client_ids); | 95 int request_id, const std::vector<int>& client_ids); |
90 | 96 |
91 scoped_ptr<ServiceWorkerCacheStorageDispatcher> cache_storage_dispatcher_; | 97 scoped_ptr<ServiceWorkerCacheStorageDispatcher> cache_storage_dispatcher_; |
92 | 98 |
93 // Not owned; embedded_context_ owns this. | 99 // Not owned; embedded_context_ owns this. |
94 EmbeddedWorkerContextClient* embedded_context_; | 100 EmbeddedWorkerContextClient* embedded_context_; |
(...skipping 13 matching lines...) Expand all Loading... |
108 std::map<int, base::TimeTicks> activate_start_timings_; | 114 std::map<int, base::TimeTicks> activate_start_timings_; |
109 std::map<int, base::TimeTicks> fetch_start_timings_; | 115 std::map<int, base::TimeTicks> fetch_start_timings_; |
110 std::map<int, base::TimeTicks> install_start_timings_; | 116 std::map<int, base::TimeTicks> install_start_timings_; |
111 | 117 |
112 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerScriptContext); | 118 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerScriptContext); |
113 }; | 119 }; |
114 | 120 |
115 } // namespace content | 121 } // namespace content |
116 | 122 |
117 #endif // CONTENT_RENDERER_SERVICE_WORKER_SERVICE_WORKER_SCRIPT_CONTEXT_H_ | 123 #endif // CONTENT_RENDERER_SERVICE_WORKER_SERVICE_WORKER_SCRIPT_CONTEXT_H_ |
OLD | NEW |