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

Unified Diff: content/browser/renderer_host/render_widget_host_impl.cc

Issue 2211783003: Track input latency while starting a ServiceWorker for a navigation hint. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add test Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/renderer_host/render_widget_host_impl.cc
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
index 3c8beb951081f1de4334db72bea9242866da30f6..cd7f328754b193fa4a850f9402d7c12503a59f4f 100644
--- a/content/browser/renderer_host/render_widget_host_impl.cc
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
@@ -49,6 +49,7 @@
#include "content/browser/renderer_host/render_widget_host_input_event_router.h"
#include "content/browser/renderer_host/render_widget_host_owner_delegate.h"
#include "content/browser/renderer_host/render_widget_host_view_base.h"
+#include "content/browser/service_worker/service_worker_context_wrapper.h"
#include "content/common/content_constants_internal.h"
#include "content/common/content_switches_internal.h"
#include "content/common/cursors/webcursor.h"
@@ -62,6 +63,7 @@
#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_types.h"
#include "content/public/browser/render_widget_host_iterator.h"
+#include "content/public/browser/storage_partition.h"
#include "content/public/common/content_constants.h"
#include "content/public/common/content_switches.h"
#include "content/public/common/result_codes.h"
@@ -2085,7 +2087,12 @@ void RenderWidgetHostImpl::FrameSwapped(const ui::LatencyInfo& latency_info) {
#endif
}
- latency_tracker_.OnFrameSwapped(latency_info);
+ const bool is_running_navigation_hint_task =
+ static_cast<ServiceWorkerContextWrapper*>(
+ GetProcess()->GetStoragePartition()->GetServiceWorkerContext())
+ ->IsRunningNavigationHintTask(GetProcess()->GetID());
+ latency_tracker_.OnFrameSwapped(latency_info,
+ is_running_navigation_hint_task);
}
void RenderWidgetHostImpl::DidReceiveRendererFrame() {

Powered by Google App Engine
This is Rietveld 408576698