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

Unified Diff: chrome/browser/gpu_process_host_ui_shim.cc

Issue 6551019: Trace_event upgrades (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More gooder js thanks to arv. Created 9 years, 10 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: 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)

Powered by Google App Engine
This is Rietveld 408576698