| 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/benchmarking_messages.h" | 7 #include "chrome/common/benchmarking_messages.h" |
| 8 #include "content/public/renderer/render_thread.h" | 8 #include "content/public/renderer/render_thread.h" |
| 9 #include "third_party/WebKit/public/web/WebCache.h" | 9 #include "third_party/WebKit/public/web/WebCache.h" |
| 10 #include "v8/include/v8.h" | 10 #include "v8/include/v8.h" |
| 11 | 11 |
| 12 using WebKit::WebCache; | 12 using blink::WebCache; |
| 13 | 13 |
| 14 const char kNetBenchmarkingExtensionName[] = "v8/NetBenchmarking"; | 14 const char kNetBenchmarkingExtensionName[] = "v8/NetBenchmarking"; |
| 15 | 15 |
| 16 namespace extensions_v8 { | 16 namespace extensions_v8 { |
| 17 | 17 |
| 18 class NetBenchmarkingWrapper : public v8::Extension { | 18 class NetBenchmarkingWrapper : public v8::Extension { |
| 19 public: | 19 public: |
| 20 NetBenchmarkingWrapper() : | 20 NetBenchmarkingWrapper() : |
| 21 v8::Extension(kNetBenchmarkingExtensionName, | 21 v8::Extension(kNetBenchmarkingExtensionName, |
| 22 "if (typeof(chrome) == 'undefined') {" | 22 "if (typeof(chrome) == 'undefined') {" |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 content::RenderThread::Get()->Send(new ChromeViewHostMsg_EnableSpdy( | 97 content::RenderThread::Get()->Send(new ChromeViewHostMsg_EnableSpdy( |
| 98 args[0]->BooleanValue())); | 98 args[0]->BooleanValue())); |
| 99 } | 99 } |
| 100 }; | 100 }; |
| 101 | 101 |
| 102 v8::Extension* NetBenchmarkingExtension::Get() { | 102 v8::Extension* NetBenchmarkingExtension::Get() { |
| 103 return new NetBenchmarkingWrapper(); | 103 return new NetBenchmarkingWrapper(); |
| 104 } | 104 } |
| 105 | 105 |
| 106 } // namespace extensions_v8 | 106 } // namespace extensions_v8 |
| OLD | NEW |