Index: chrome/browser/gpu_process_host_ui_shim.cc |
diff --git a/chrome/browser/gpu_process_host_ui_shim.cc b/chrome/browser/gpu_process_host_ui_shim.cc |
index ef3f9991901972146aa331c9f9e46ac5d42073f7..82dcf9ea6670d4ac45dcb3ba5ef5788340275ecc 100644 |
--- a/chrome/browser/gpu_process_host_ui_shim.cc |
+++ b/chrome/browser/gpu_process_host_ui_shim.cc |
@@ -7,6 +7,7 @@ |
#include "app/app_switches.h" |
#include "app/gfx/gl/gl_implementation.h" |
#include "base/command_line.h" |
+#include "base/debug/trace_event.h" |
#include "base/metrics/histogram.h" |
#include "chrome/browser/browser_thread.h" |
#include "chrome/browser/gpu_blacklist.h" |
@@ -262,6 +263,20 @@ void GpuProcessHostUIShim::CollectGraphicsInfoAsynchronously( |
Send(new GpuMsg_CollectGraphicsInfo(level)); |
} |
+void GpuProcessHostUIShim::OnTraceDataCollectedRemotely( |
+ const std::string& json_events) { |
+ base::debug::TraceLog::GetInstance()->AddRemotelyCollectedData(json_events); |
+} |
+ |
+void GpuProcessHostUIShim::SetTraceEnabled(bool enabled) { |
+ DCHECK(CalledOnValidThread()); |
+ |
+ BrowserThread::PostTask( |
+ BrowserThread::IO, |
+ FROM_HERE, |
+ new SendOnIOThreadTask(new GpuMsg_SetTraceEnabled(enabled))); |
+} |
+ |
void GpuProcessHostUIShim::SendAboutGpuCrash() { |
DCHECK(CalledOnValidThread()); |
Send(new GpuMsg_Crash()); |
@@ -300,6 +315,8 @@ bool GpuProcessHostUIShim::OnControlMessageReceived( |
OnLogMessage) |
IPC_MESSAGE_HANDLER(GpuHostMsg_SynchronizeReply, |
OnSynchronizeReply) |
+ IPC_MESSAGE_HANDLER(GpuHostMsg_TraceDataCollectedRemotely, |
+ OnTraceDataCollectedRemotely) |
#if defined(OS_LINUX) |
IPC_MESSAGE_HANDLER_DELAY_REPLY(GpuHostMsg_ResizeXID, OnResizeXID) |
#elif defined(OS_MACOSX) |