Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: content/renderer/render_thread_impl.cc

Issue 2863973003: Expose RTT and downlink bandwidth using experimental Javascript API (Closed)
Patch Set: ps Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_thread_impl.h" 5 #include "content/renderer/render_thread_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <map> 9 #include <map>
10 #include <utility> 10 #include <utility>
(...skipping 2107 matching lines...) Expand 10 before | Expand all | Expand 10 after
2118 observer.NetworkStateChanged(online); 2118 observer.NetworkStateChanged(online);
2119 WebNetworkStateNotifier::SetWebConnection( 2119 WebNetworkStateNotifier::SetWebConnection(
2120 NetConnectionTypeToWebConnectionType(type), max_bandwidth_mbps); 2120 NetConnectionTypeToWebConnectionType(type), max_bandwidth_mbps);
2121 } 2121 }
2122 2122
2123 void RenderThreadImpl::OnNetworkQualityChanged( 2123 void RenderThreadImpl::OnNetworkQualityChanged(
2124 double http_rtt_msec, 2124 double http_rtt_msec,
2125 double transport_rtt_msec, 2125 double transport_rtt_msec,
2126 double downlink_throughput_kbps) { 2126 double downlink_throughput_kbps) {
2127 UMA_HISTOGRAM_BOOLEAN("NQE.RenderThreadNotified", true); 2127 UMA_HISTOGRAM_BOOLEAN("NQE.RenderThreadNotified", true);
2128 // TODO(tbansal): https://crbug.com/719108. Notify WebNetworkStateNotifier of 2128 WebNetworkStateNotifier::SetNetworkQuality(http_rtt_msec, transport_rtt_msec,
2129 // the change in the network quality. 2129 downlink_throughput_kbps);
2130 } 2130 }
2131 2131
2132 void RenderThreadImpl::SetWebKitSharedTimersSuspended(bool suspend) { 2132 void RenderThreadImpl::SetWebKitSharedTimersSuspended(bool suspend) {
2133 #if defined(OS_ANDROID) 2133 #if defined(OS_ANDROID)
2134 if (suspend) { 2134 if (suspend) {
2135 renderer_scheduler_->SuspendTimerQueue(); 2135 renderer_scheduler_->SuspendTimerQueue();
2136 } else { 2136 } else {
2137 renderer_scheduler_->ResumeTimerQueue(); 2137 renderer_scheduler_->ResumeTimerQueue();
2138 } 2138 }
2139 webkit_shared_timer_suspended_ = suspend; 2139 webkit_shared_timer_suspended_ = suspend;
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
2441 } 2441 }
2442 } 2442 }
2443 2443
2444 void RenderThreadImpl::OnRendererInterfaceRequest( 2444 void RenderThreadImpl::OnRendererInterfaceRequest(
2445 mojom::RendererAssociatedRequest request) { 2445 mojom::RendererAssociatedRequest request) {
2446 DCHECK(!renderer_binding_.is_bound()); 2446 DCHECK(!renderer_binding_.is_bound());
2447 renderer_binding_.Bind(std::move(request)); 2447 renderer_binding_.Bind(std::move(request));
2448 } 2448 }
2449 2449
2450 } // namespace content 2450 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698