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/render_frame_impl.h" | 5 #include "content/renderer/render_frame_impl.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
(...skipping 863 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
874 data = reinterpret_cast<const char*>( | 874 data = reinterpret_cast<const char*>( |
875 ¶ms.browser_initiated_post_data.front()); | 875 ¶ms.browser_initiated_post_data.front()); |
876 } | 876 } |
877 http_body.appendData( | 877 http_body.appendData( |
878 WebData(data, params.browser_initiated_post_data.size())); | 878 WebData(data, params.browser_initiated_post_data.size())); |
879 request.setHTTPBody(http_body); | 879 request.setHTTPBody(http_body); |
880 } | 880 } |
881 | 881 |
882 frame->loadRequest(request); | 882 frame->loadRequest(request); |
883 | 883 |
884 // If this is a cross-process navigation, the browser process will send | 884 // If this is a cross-process navigation or a navigation in a new tab, the |
885 // along the proper navigation start value. | 885 // browser process will send along the proper navigation start value. |
886 if (!params.browser_navigation_start.is_null() && | 886 if (!params.browser_navigation_start.is_null() && |
887 frame->provisionalDataSource()) { | 887 frame->provisionalDataSource()) { |
888 // browser_navigation_start is likely before this process existed, so we | 888 // browser_navigation_start is likely before this process existed, so we |
889 // can't use InterProcessTimeTicksConverter. Instead, the best we can do | 889 // can't use InterProcessTimeTicksConverter. Instead, the best we can do |
890 // is just ensure we don't report a bogus value in the future. | 890 // is just ensure we don't report a bogus value in the future. |
891 base::TimeTicks navigation_start = std::min( | 891 base::TimeTicks navigation_start = std::min( |
892 base::TimeTicks::Now(), params.browser_navigation_start); | 892 base::TimeTicks::Now(), params.browser_navigation_start); |
893 double navigation_start_seconds = | 893 double navigation_start_seconds = |
894 (navigation_start - base::TimeTicks()).InSecondsF(); | 894 (navigation_start - base::TimeTicks()).InSecondsF(); |
895 frame->provisionalDataSource()->setNavigationStartTime( | 895 frame->provisionalDataSource()->setNavigationStartTime( |
(...skipping 2671 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3567 | 3567 |
3568 #if defined(ENABLE_BROWSER_CDMS) | 3568 #if defined(ENABLE_BROWSER_CDMS) |
3569 RendererCdmManager* RenderFrameImpl::GetCdmManager() { | 3569 RendererCdmManager* RenderFrameImpl::GetCdmManager() { |
3570 if (!cdm_manager_) | 3570 if (!cdm_manager_) |
3571 cdm_manager_ = new RendererCdmManager(this); | 3571 cdm_manager_ = new RendererCdmManager(this); |
3572 return cdm_manager_; | 3572 return cdm_manager_; |
3573 } | 3573 } |
3574 #endif // defined(ENABLE_BROWSER_CDMS) | 3574 #endif // defined(ENABLE_BROWSER_CDMS) |
3575 | 3575 |
3576 } // namespace content | 3576 } // namespace content |
OLD | NEW |