From f70030adabdeeebe1fa2a831d2732e78082785fd Mon Sep 17 00:00:00 2001 From: Marshall Greenblatt Date: Thu, 4 Apr 2013 18:10:17 +0000 Subject: [PATCH] Add support for the V8 LoadTimes extension (issue #917). git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1177 5089003a-bbd8-11dd-ad1f-f1f9622dbc98 --- cef.gyp | 3 +++ libcef/renderer/content_renderer_client.cc | 2 ++ 2 files changed, 5 insertions(+) diff --git a/cef.gyp b/cef.gyp index 3dad3e38f..ede1df185 100644 --- a/cef.gyp +++ b/cef.gyp @@ -1010,6 +1010,9 @@ '<(DEPTH)/chrome/browser/prefs/proxy_prefs.h', '<(DEPTH)/chrome/common/pref_names.cc', '<(DEPTH)/chrome/common/pref_names.h', + # Include sources for the loadtimes V8 extension. + '<(DEPTH)/chrome/renderer/loadtimes_extension_bindings.h', + '<(DEPTH)/chrome/renderer/loadtimes_extension_bindings.cc', ], 'conditions': [ ['OS=="win"', { diff --git a/libcef/renderer/content_renderer_client.cc b/libcef/renderer/content_renderer_client.cc index 4fd2521e6..280f5d9d6 100644 --- a/libcef/renderer/content_renderer_client.cc +++ b/libcef/renderer/content_renderer_client.cc @@ -30,6 +30,7 @@ MSVC_POP_WARNING(); #include "base/command_line.h" #include "base/path_service.h" #include "base/string_number_conversions.h" +#include "chrome/renderer/loadtimes_extension_bindings.h" #include "content/common/child_thread.h" #include "content/public/browser/browser_thread.h" #include "content/public/browser/render_process_host.h" @@ -457,6 +458,7 @@ void CefContentRendererClient::RenderThreadStarted() { content::RenderThread* thread = content::RenderThread::Get(); thread->AddObserver(observer_.get()); thread->GetChannel()->AddFilter(new CefRenderMessageFilter); + thread->RegisterExtension(extensions_v8::LoadTimesExtension::Get()); if (content::RenderProcessHost::run_renderer_in_process()) { // When running in single-process mode register as a destruction observer