1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CONTENT_COMMON_GPU_DEVTOOLS_GPU_AGENT_H_
6 #define CONTENT_COMMON_GPU_DEVTOOLS_GPU_AGENT_H_
8 #include "base/memory/scoped_ptr.h"
9 #include "base/threading/non_thread_safe.h"
10 #include "base/time/time.h"
11 #include "content/common/gpu/devtools_gpu_instrumentation.h"
13 using base::TimeTicks
;
24 class DevToolsGpuAgent
: public base::NonThreadSafe
{
26 explicit DevToolsGpuAgent(GpuChannel
* gpu_channel
);
27 virtual ~DevToolsGpuAgent();
29 void ProcessEvent(TimeTicks timestamp
,
30 GpuEventsDispatcher::EventPhase
,
33 bool StartEventsRecording(int32 route_id
);
34 void StopEventsRecording();
37 typedef std::vector
<GpuTaskInfo
> GpuTaskInfoList
;
39 bool Send(IPC::Message
* msg
);
41 GpuChannel
* gpu_channel_
;
42 scoped_ptr
<GpuTaskInfoList
> tasks_
;
43 TimeTicks last_flush_time_
;
46 DISALLOW_COPY_AND_ASSIGN(DevToolsGpuAgent
);
49 } // namespace content
51 #endif // CONTENT_COMMON_GPU_DEVTOOLS_GPU_AGENT_H_