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

Unified Diff: content/renderer/render_frame_impl.cc

Issue 1320633002: Optimize for TouchStart responsiveness (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Try set OnPageLoadStarted in RenderFrameImpl::OnNavigate Created 5 years, 3 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
« no previous file with comments | « components/scheduler/scheduler.gypi ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_frame_impl.cc
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index f5d90c62c10cfa3267f72f938a5122b6eb5c275a..a9f9a7f1c42a9327fc5197257706095d83376a10 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -20,6 +20,7 @@
#include "base/thread_task_runner_handle.h"
#include "base/time/time.h"
#include "cc/base/switches.h"
+#include "components/scheduler/renderer/renderer_scheduler.h"
#include "content/child/appcache/appcache_dispatcher.h"
#include "content/child/permissions/permission_dispatcher.h"
#include "content/child/plugin_messages.h"
@@ -1144,6 +1145,10 @@ void RenderFrameImpl::OnNavigate(
const CommonNavigationParams& common_params,
const StartNavigationParams& start_params,
const RequestNavigationParams& request_params) {
+ RenderThreadImpl* render_thread_impl = RenderThreadImpl::current();
+ // Can be NULL in tests.
+ if (render_thread_impl)
+ render_thread_impl->GetRendererScheduler()->OnPageLoadStarted();
DCHECK(!base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnableBrowserSideNavigation));
TRACE_EVENT2("navigation", "RenderFrameImpl::OnNavigate", "id", routing_id_,
@@ -2795,6 +2800,7 @@ void RenderFrameImpl::didCommitProvisionalLoad(
render_thread_impl->histogram_customizer()->
RenderViewNavigatedToHost(GURL(GetLoadingUrl()).host(),
RenderView::GetRenderViewCount());
+ render_thread_impl->GetRendererScheduler()->OnPageLoadStarted();
}
}
« no previous file with comments | « components/scheduler/scheduler.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698