| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "content/renderer/devtools/devtools_agent.h" | 5 #include "content/renderer/devtools/devtools_agent.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 | 8 |
| 9 #include "base/debug/trace_event.h" | 9 #include "base/debug/trace_event.h" |
| 10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
| (...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 gpu_channel_host->RemoveRoute(gpu_route_id_); | 198 gpu_channel_host->RemoveRoute(gpu_route_id_); |
| 199 gpu_route_id_ = MSG_ROUTING_NONE; | 199 gpu_route_id_ = MSG_ROUTING_NONE; |
| 200 } | 200 } |
| 201 | 201 |
| 202 void DevToolsAgent::OnGpuTasksChunk(const std::vector<GpuTaskInfo>& tasks) { | 202 void DevToolsAgent::OnGpuTasksChunk(const std::vector<GpuTaskInfo>& tasks) { |
| 203 WebDevToolsAgent* web_agent = GetWebAgent(); | 203 WebDevToolsAgent* web_agent = GetWebAgent(); |
| 204 if (!web_agent) | 204 if (!web_agent) |
| 205 return; | 205 return; |
| 206 for (size_t i = 0; i < tasks.size(); i++) { | 206 for (size_t i = 0; i < tasks.size(); i++) { |
| 207 const GpuTaskInfo& task = tasks[i]; | 207 const GpuTaskInfo& task = tasks[i]; |
| 208 web_agent->processGPUEvent(task.timestamp, task.phase, task.owner_pid); | 208 web_agent->processGPUEvent(task.timestamp, task.phase, task.foreign); |
| 209 } | 209 } |
| 210 } | 210 } |
| 211 | 211 |
| 212 void DevToolsAgent::enableDeviceEmulation( | 212 void DevToolsAgent::enableDeviceEmulation( |
| 213 const blink::WebRect& device_rect, | 213 const blink::WebRect& device_rect, |
| 214 const blink::WebRect& view_rect, | 214 const blink::WebRect& view_rect, |
| 215 float device_scale_factor, | 215 float device_scale_factor, |
| 216 bool fit_to_view) { | 216 bool fit_to_view) { |
| 217 RenderViewImpl* impl = static_cast<RenderViewImpl*>(render_view()); | 217 RenderViewImpl* impl = static_cast<RenderViewImpl*>(render_view()); |
| 218 impl->webview()->settings()->setForceCompositingMode(true); | 218 impl->webview()->settings()->setForceCompositingMode(true); |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 337 if (!web_view) | 337 if (!web_view) |
| 338 return NULL; | 338 return NULL; |
| 339 return web_view->devToolsAgent(); | 339 return web_view->devToolsAgent(); |
| 340 } | 340 } |
| 341 | 341 |
| 342 bool DevToolsAgent::IsAttached() { | 342 bool DevToolsAgent::IsAttached() { |
| 343 return is_attached_; | 343 return is_attached_; |
| 344 } | 344 } |
| 345 | 345 |
| 346 } // namespace content | 346 } // namespace content |
| OLD | NEW |