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; | 18 using webkit_glue::CppArgumentList; |
19 using webkit_glue::CppVariant; | 19 using webkit_glue::CppVariant; |
20 | 20 |
21 namespace content { | 21 namespace content { |
22 | 22 |
23 namespace { | 23 namespace { |
24 | 24 |
25 bool CurrentRenderViewImpl(RenderViewImpl** out) { | 25 bool CurrentRenderViewImpl(RenderViewImpl** out) { |
26 WebKit::WebFrame* web_frame = WebKit::WebFrame::frameForCurrentContext(); | 26 blink::WebFrame* web_frame = blink::WebFrame::frameForCurrentContext(); |
27 if (!web_frame) | 27 if (!web_frame) |
28 return false; | 28 return false; |
29 | 29 |
30 WebKit::WebView* web_view = web_frame->view(); | 30 blink::WebView* web_view = web_frame->view(); |
31 if (!web_view) | 31 if (!web_view) |
32 return false; | 32 return false; |
33 | 33 |
34 RenderViewImpl* render_view_impl = | 34 RenderViewImpl* render_view_impl = |
35 RenderViewImpl::FromWebView(web_view); | 35 RenderViewImpl::FromWebView(web_view); |
36 if (!render_view_impl) | 36 if (!render_view_impl) |
37 return false; | 37 return false; |
38 | 38 |
39 *out = render_view_impl; | 39 *out = render_view_impl; |
40 return true; | 40 return true; |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 } | 150 } |
151 | 151 |
152 std::string tab_timing_json; | 152 std::string tab_timing_json; |
153 ConvertLoadTimeToJSON( | 153 ConvertLoadTimeToJSON( |
154 observer->load_start_time(), observer->load_stop_time(), | 154 observer->load_start_time(), observer->load_stop_time(), |
155 &tab_timing_json); | 155 &tab_timing_json); |
156 result->Set(tab_timing_json); | 156 result->Set(tab_timing_json); |
157 } | 157 } |
158 | 158 |
159 } // namespace content | 159 } // namespace content |
OLD | NEW |