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 <string> | 9 #include <string> |
9 #include <vector> | 10 #include <vector> |
10 | 11 |
11 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
12 #include "base/id_map.h" | 13 #include "base/id_map.h" |
13 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
14 #include "base/strings/string16.h" | 15 #include "base/strings/string16.h" |
| 16 #include "base/time/time.h" |
15 #include "content/child/webmessageportchannel_impl.h" | 17 #include "content/child/webmessageportchannel_impl.h" |
16 #include "content/common/service_worker/service_worker_types.h" | 18 #include "content/common/service_worker/service_worker_types.h" |
17 #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" |
18 #include "third_party/WebKit/public/platform/WebMessagePortChannel.h" | 20 #include "third_party/WebKit/public/platform/WebMessagePortChannel.h" |
19 #include "third_party/WebKit/public/platform/WebServiceWorkerClientsInfo.h" | 21 #include "third_party/WebKit/public/platform/WebServiceWorkerClientsInfo.h" |
20 #include "third_party/WebKit/public/platform/WebServiceWorkerEventResult.h" | 22 #include "third_party/WebKit/public/platform/WebServiceWorkerEventResult.h" |
21 | 23 |
22 namespace blink { | 24 namespace blink { |
23 class WebServiceWorkerContextProxy; | 25 class WebServiceWorkerContextProxy; |
24 } | 26 } |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 blink::WebServiceWorkerContextProxy* proxy_; | 97 blink::WebServiceWorkerContextProxy* proxy_; |
96 | 98 |
97 // Used for incoming messages from the browser for which an outgoing response | 99 // Used for incoming messages from the browser for which an outgoing response |
98 // back to the browser is expected, the id must be sent back with the | 100 // back to the browser is expected, the id must be sent back with the |
99 // response. | 101 // response. |
100 int current_request_id_; | 102 int current_request_id_; |
101 | 103 |
102 // Pending callbacks for GetClientDocuments(). | 104 // Pending callbacks for GetClientDocuments(). |
103 ClientsCallbacksMap pending_clients_callbacks_; | 105 ClientsCallbacksMap pending_clients_callbacks_; |
104 | 106 |
| 107 // Capture timestamps for UMA |
| 108 std::map<int, base::TimeTicks> activate_start_timings_; |
| 109 std::map<int, base::TimeTicks> fetch_start_timings_; |
| 110 std::map<int, base::TimeTicks> install_start_timings_; |
| 111 |
105 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerScriptContext); | 112 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerScriptContext); |
106 }; | 113 }; |
107 | 114 |
108 } // namespace content | 115 } // namespace content |
109 | 116 |
110 #endif // CONTENT_RENDERER_SERVICE_WORKER_SERVICE_WORKER_SCRIPT_CONTEXT_H_ | 117 #endif // CONTENT_RENDERER_SERVICE_WORKER_SERVICE_WORKER_SCRIPT_CONTEXT_H_ |
OLD | NEW |