OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/render_view_impl.h" | 5 #include "content/renderer/render_view_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <cmath> | 8 #include <cmath> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/bind.h" | 12 #include "base/bind.h" |
13 #include "base/bind_helpers.h" | 13 #include "base/bind_helpers.h" |
14 #include "base/command_line.h" | 14 #include "base/command_line.h" |
15 #include "base/compiler_specific.h" | 15 #include "base/compiler_specific.h" |
| 16 #include "base/debug/trace_event.h" |
16 #include "base/json/json_writer.h" | 17 #include "base/json/json_writer.h" |
17 #include "base/lazy_instance.h" | 18 #include "base/lazy_instance.h" |
18 #include "base/message_loop_proxy.h" | 19 #include "base/message_loop_proxy.h" |
19 #include "base/metrics/histogram.h" | 20 #include "base/metrics/histogram.h" |
20 #include "base/path_service.h" | 21 #include "base/path_service.h" |
21 #include "base/process_util.h" | 22 #include "base/process_util.h" |
22 #include "base/string_number_conversions.h" | 23 #include "base/string_number_conversions.h" |
23 #include "base/string_piece.h" | 24 #include "base/string_piece.h" |
24 #include "base/string_split.h" | 25 #include "base/string_split.h" |
25 #include "base/string_util.h" | 26 #include "base/string_util.h" |
(...skipping 1130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1156 ¶ms.browser_initiated_post_data.front()), | 1157 ¶ms.browser_initiated_post_data.front()), |
1157 params.browser_initiated_post_data.size())); | 1158 params.browser_initiated_post_data.size())); |
1158 request.setHTTPBody(http_body); | 1159 request.setHTTPBody(http_body); |
1159 } | 1160 } |
1160 | 1161 |
1161 main_frame->loadRequest(request); | 1162 main_frame->loadRequest(request); |
1162 } | 1163 } |
1163 | 1164 |
1164 // In case LoadRequest failed before DidCreateDataSource was called. | 1165 // In case LoadRequest failed before DidCreateDataSource was called. |
1165 pending_navigation_params_.reset(); | 1166 pending_navigation_params_.reset(); |
| 1167 |
| 1168 UNSHIPPED_TRACE_EVENT_INSTANT0("test_tracing", "RenderViewImpl::OnNavigate"); |
1166 } | 1169 } |
1167 | 1170 |
1168 bool RenderViewImpl::IsBackForwardToStaleEntry( | 1171 bool RenderViewImpl::IsBackForwardToStaleEntry( |
1169 const ViewMsg_Navigate_Params& params, | 1172 const ViewMsg_Navigate_Params& params, |
1170 bool is_reload) { | 1173 bool is_reload) { |
1171 // Make sure this isn't a back/forward to an entry we have already cropped | 1174 // Make sure this isn't a back/forward to an entry we have already cropped |
1172 // or replaced from our history, before the browser knew about it. If so, | 1175 // or replaced from our history, before the browser knew about it. If so, |
1173 // a new navigation has committed in the mean time, and we can ignore this. | 1176 // a new navigation has committed in the mean time, and we can ignore this. |
1174 bool is_back_forward = !is_reload && !params.state.empty(); | 1177 bool is_back_forward = !is_reload && !params.state.empty(); |
1175 | 1178 |
(...skipping 4708 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5884 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { | 5887 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { |
5885 return !!RenderThreadImpl::current()->compositor_thread(); | 5888 return !!RenderThreadImpl::current()->compositor_thread(); |
5886 } | 5889 } |
5887 | 5890 |
5888 void RenderViewImpl::OnJavaBridgeInit() { | 5891 void RenderViewImpl::OnJavaBridgeInit() { |
5889 DCHECK(!java_bridge_dispatcher_); | 5892 DCHECK(!java_bridge_dispatcher_); |
5890 #if defined(ENABLE_JAVA_BRIDGE) | 5893 #if defined(ENABLE_JAVA_BRIDGE) |
5891 java_bridge_dispatcher_ = new JavaBridgeDispatcher(this); | 5894 java_bridge_dispatcher_ = new JavaBridgeDispatcher(this); |
5892 #endif | 5895 #endif |
5893 } | 5896 } |
OLD | NEW |