| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010-2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2010-2011 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 289 if (frame->frameWidget()) | 289 if (frame->frameWidget()) |
| 290 agent->layerTreeViewChanged(toWebFrameWidgetImpl(frame->frameWidget(
))->layerTreeView()); | 290 agent->layerTreeViewChanged(toWebFrameWidgetImpl(frame->frameWidget(
))->layerTreeView()); |
| 291 return adoptPtrWillBeNoop(agent); | 291 return adoptPtrWillBeNoop(agent); |
| 292 } | 292 } |
| 293 | 293 |
| 294 WebDevToolsAgentImpl* agent = new WebDevToolsAgentImpl(frame, client, Inspec
torOverlay::create(view)); | 294 WebDevToolsAgentImpl* agent = new WebDevToolsAgentImpl(frame, client, Inspec
torOverlay::create(view)); |
| 295 // TODO(dgozman): we should actually pass the view instead of frame, but dur
ing | 295 // TODO(dgozman): we should actually pass the view instead of frame, but dur
ing |
| 296 // remote->local transition we cannot access mainFrameImpl() yet, so we have
to store the | 296 // remote->local transition we cannot access mainFrameImpl() yet, so we have
to store the |
| 297 // frame which will become the main frame later. | 297 // frame which will become the main frame later. |
| 298 agent->registerAgent(InspectorRenderingAgent::create(frame)); | 298 agent->registerAgent(InspectorRenderingAgent::create(frame)); |
| 299 agent->registerAgent(InspectorEmulationAgent::create(frame)); | 299 agent->registerAgent(InspectorEmulationAgent::create(frame, agent)); |
| 300 // TODO(dgozman): migrate each of the following agents to frame once module
is ready. | 300 // TODO(dgozman): migrate each of the following agents to frame once module
is ready. |
| 301 agent->registerAgent(InspectorDatabaseAgent::create(view->page())); | 301 agent->registerAgent(InspectorDatabaseAgent::create(view->page())); |
| 302 agent->registerAgent(DeviceOrientationInspectorAgent::create(view->page())); | 302 agent->registerAgent(DeviceOrientationInspectorAgent::create(view->page())); |
| 303 agent->registerAgent(InspectorAccessibilityAgent::create(view->page())); | 303 agent->registerAgent(InspectorAccessibilityAgent::create(view->page())); |
| 304 agent->registerAgent(InspectorDOMStorageAgent::create(view->page())); | 304 agent->registerAgent(InspectorDOMStorageAgent::create(view->page())); |
| 305 agent->registerAgent(InspectorCacheStorageAgent::create()); | 305 agent->registerAgent(InspectorCacheStorageAgent::create()); |
| 306 agent->layerTreeViewChanged(view->layerTreeView()); | 306 agent->layerTreeViewChanged(view->layerTreeView()); |
| 307 return adoptPtrWillBeNoop(agent); | 307 return adoptPtrWillBeNoop(agent); |
| 308 } | 308 } |
| 309 | 309 |
| (...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 597 void WebDevToolsAgentImpl::enableTracing(const String& categoryFilter) | 597 void WebDevToolsAgentImpl::enableTracing(const String& categoryFilter) |
| 598 { | 598 { |
| 599 m_client->enableTracing(categoryFilter); | 599 m_client->enableTracing(categoryFilter); |
| 600 } | 600 } |
| 601 | 601 |
| 602 void WebDevToolsAgentImpl::disableTracing() | 602 void WebDevToolsAgentImpl::disableTracing() |
| 603 { | 603 { |
| 604 m_client->disableTracing(); | 604 m_client->disableTracing(); |
| 605 } | 605 } |
| 606 | 606 |
| 607 void WebDevToolsAgentImpl::setCPUThrottlingRate(double rate) |
| 608 { |
| 609 m_client->setCPUThrottlingRate(rate); |
| 610 } |
| 611 |
| 607 void WebDevToolsAgentImpl::dispatchOnInspectorBackend(int sessionId, const WebSt
ring& message) | 612 void WebDevToolsAgentImpl::dispatchOnInspectorBackend(int sessionId, const WebSt
ring& message) |
| 608 { | 613 { |
| 609 if (!m_attached) | 614 if (!m_attached) |
| 610 return; | 615 return; |
| 611 if (WebDevToolsAgent::shouldInterruptForMessage(message)) | 616 if (WebDevToolsAgent::shouldInterruptForMessage(message)) |
| 612 MainThreadDebugger::instance()->taskRunner()->runPendingTasks(); | 617 MainThreadDebugger::instance()->taskRunner()->runPendingTasks(); |
| 613 else | 618 else |
| 614 dispatchMessageFromFrontend(sessionId, message); | 619 dispatchMessageFromFrontend(sessionId, message); |
| 615 } | 620 } |
| 616 | 621 |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 723 if (!InspectorBackendDispatcher::getCommandName(message, &commandName)) | 728 if (!InspectorBackendDispatcher::getCommandName(message, &commandName)) |
| 724 return false; | 729 return false; |
| 725 return commandName == InspectorBackendDispatcher::commandName(InspectorBacke
ndDispatcher::kDebugger_pauseCmd) | 730 return commandName == InspectorBackendDispatcher::commandName(InspectorBacke
ndDispatcher::kDebugger_pauseCmd) |
| 726 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke
ndDispatcher::kDebugger_setBreakpointCmd) | 731 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke
ndDispatcher::kDebugger_setBreakpointCmd) |
| 727 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke
ndDispatcher::kDebugger_setBreakpointByUrlCmd) | 732 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke
ndDispatcher::kDebugger_setBreakpointByUrlCmd) |
| 728 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke
ndDispatcher::kDebugger_removeBreakpointCmd) | 733 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke
ndDispatcher::kDebugger_removeBreakpointCmd) |
| 729 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke
ndDispatcher::kDebugger_setBreakpointsActiveCmd); | 734 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke
ndDispatcher::kDebugger_setBreakpointsActiveCmd); |
| 730 } | 735 } |
| 731 | 736 |
| 732 } // namespace blink | 737 } // namespace blink |
| OLD | NEW |