OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 #include "chrome/renderer/net_benchmarking_extension.h" | 5 #include "chrome/renderer/net_benchmarking_extension.h" |
6 | 6 |
7 #include "chrome/common/net_benchmarking.mojom.h" | 7 #include "chrome/common/net_benchmarking.mojom.h" |
8 #include "content/public/renderer/render_thread.h" | 8 #include "content/public/renderer/render_thread.h" |
9 #include "services/service_manager/public/cpp/interface_provider.h" | 9 #include "services/service_manager/public/cpp/interface_provider.h" |
10 #include "third_party/WebKit/public/web/WebCache.h" | 10 #include "third_party/WebKit/public/platform/WebCache.h" |
11 #include "v8/include/v8.h" | 11 #include "v8/include/v8.h" |
12 | 12 |
13 using blink::WebCache; | 13 using blink::WebCache; |
14 | 14 |
15 const char kNetBenchmarkingExtensionName[] = "v8/NetBenchmarking"; | 15 const char kNetBenchmarkingExtensionName[] = "v8/NetBenchmarking"; |
16 | 16 |
17 namespace extensions_v8 { | 17 namespace extensions_v8 { |
18 | 18 |
19 class NetBenchmarkingWrapper : public v8::Extension { | 19 class NetBenchmarkingWrapper : public v8::Extension { |
20 public: | 20 public: |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 const v8::FunctionCallbackInfo<v8::Value>& args) { | 96 const v8::FunctionCallbackInfo<v8::Value>& args) { |
97 GetNetBenchmarking().CloseCurrentConnections(); | 97 GetNetBenchmarking().CloseCurrentConnections(); |
98 } | 98 } |
99 }; | 99 }; |
100 | 100 |
101 v8::Extension* NetBenchmarkingExtension::Get() { | 101 v8::Extension* NetBenchmarkingExtension::Get() { |
102 return new NetBenchmarkingWrapper(); | 102 return new NetBenchmarkingWrapper(); |
103 } | 103 } |
104 | 104 |
105 } // namespace extensions_v8 | 105 } // namespace extensions_v8 |
OLD | NEW |