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

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 comment 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 014d608979a3eadfd5362315aa1d85b68045882f..64d09f032f69c3d7dee563af0f00a413cbc65db1 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"
@@ -2086,7 +2088,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