| OLD | NEW |
| 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 #include "content/renderer/stats_collection_controller.h" | 5 #include "content/renderer/stats_collection_controller.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/json/json_writer.h" | 9 #include "base/json/json_writer.h" |
| 10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
| 11 #include "base/metrics/statistics_recorder.h" | 11 #include "base/metrics/statistics_recorder.h" |
| 12 #include "base/strings/string_util.h" | 12 #include "base/strings/string_util.h" |
| 13 #include "content/common/child_process_messages.h" | 13 #include "content/common/child_process_messages.h" |
| 14 #include "content/renderer/render_view_impl.h" | 14 #include "content/renderer/render_view_impl.h" |
| 15 #include "third_party/WebKit/public/web/WebFrame.h" | 15 #include "third_party/WebKit/public/web/WebFrame.h" |
| 16 #include "third_party/WebKit/public/web/WebView.h" | 16 #include "third_party/WebKit/public/web/WebView.h" |
| 17 | 17 |
| 18 using webkit_glue::CppArgumentList; | |
| 19 using webkit_glue::CppVariant; | |
| 20 | |
| 21 namespace content { | 18 namespace content { |
| 22 | 19 |
| 23 namespace { | 20 namespace { |
| 24 | 21 |
| 25 bool CurrentRenderViewImpl(RenderViewImpl** out) { | 22 bool CurrentRenderViewImpl(RenderViewImpl** out) { |
| 26 WebKit::WebFrame* web_frame = WebKit::WebFrame::frameForCurrentContext(); | 23 WebKit::WebFrame* web_frame = WebKit::WebFrame::frameForCurrentContext(); |
| 27 if (!web_frame) | 24 if (!web_frame) |
| 28 return false; | 25 return false; |
| 29 | 26 |
| 30 WebKit::WebView* web_view = web_frame->view(); | 27 WebKit::WebView* web_view = web_frame->view(); |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 } | 147 } |
| 151 | 148 |
| 152 std::string tab_timing_json; | 149 std::string tab_timing_json; |
| 153 ConvertLoadTimeToJSON( | 150 ConvertLoadTimeToJSON( |
| 154 observer->load_start_time(), observer->load_stop_time(), | 151 observer->load_start_time(), observer->load_stop_time(), |
| 155 &tab_timing_json); | 152 &tab_timing_json); |
| 156 result->Set(tab_timing_json); | 153 result->Set(tab_timing_json); |
| 157 } | 154 } |
| 158 | 155 |
| 159 } // namespace content | 156 } // namespace content |
| OLD | NEW |