| 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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 #include "modules/filesystem/InspectorFileSystemAgent.h" | 75 #include "modules/filesystem/InspectorFileSystemAgent.h" |
| 76 #include "modules/indexeddb/InspectorIndexedDBAgent.h" | 76 #include "modules/indexeddb/InspectorIndexedDBAgent.h" |
| 77 #include "modules/storage/InspectorDOMStorageAgent.h" | 77 #include "modules/storage/InspectorDOMStorageAgent.h" |
| 78 #include "modules/webdatabase/InspectorDatabaseAgent.h" | 78 #include "modules/webdatabase/InspectorDatabaseAgent.h" |
| 79 #include "platform/JSONValues.h" | 79 #include "platform/JSONValues.h" |
| 80 #include "platform/RuntimeEnabledFeatures.h" | 80 #include "platform/RuntimeEnabledFeatures.h" |
| 81 #include "platform/TraceEvent.h" | 81 #include "platform/TraceEvent.h" |
| 82 #include "platform/graphics/GraphicsContext.h" | 82 #include "platform/graphics/GraphicsContext.h" |
| 83 #include "platform/graphics/paint/DisplayItemList.h" | 83 #include "platform/graphics/paint/DisplayItemList.h" |
| 84 #include "public/platform/Platform.h" | 84 #include "public/platform/Platform.h" |
| 85 #include "public/platform/WebLayerTreeView.h" |
| 85 #include "public/platform/WebRect.h" | 86 #include "public/platform/WebRect.h" |
| 86 #include "public/platform/WebString.h" | 87 #include "public/platform/WebString.h" |
| 87 #include "public/web/WebDevToolsAgentClient.h" | 88 #include "public/web/WebDevToolsAgentClient.h" |
| 88 #include "public/web/WebSettings.h" | 89 #include "public/web/WebSettings.h" |
| 89 #include "web/DevToolsEmulator.h" | 90 #include "web/DevToolsEmulator.h" |
| 90 #include "web/InspectorEmulationAgent.h" | 91 #include "web/InspectorEmulationAgent.h" |
| 91 #include "web/InspectorRenderingAgent.h" | 92 #include "web/InspectorRenderingAgent.h" |
| 92 #include "web/WebFrameWidgetImpl.h" | 93 #include "web/WebFrameWidgetImpl.h" |
| 93 #include "web/WebInputEventConversion.h" | 94 #include "web/WebInputEventConversion.h" |
| 94 #include "web/WebLocalFrameImpl.h" | 95 #include "web/WebLocalFrameImpl.h" |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 249 | 250 |
| 250 private: | 251 private: |
| 251 OwnPtr<WebDevToolsAgent::MessageDescriptor> m_descriptor; | 252 OwnPtr<WebDevToolsAgent::MessageDescriptor> m_descriptor; |
| 252 }; | 253 }; |
| 253 | 254 |
| 254 // static | 255 // static |
| 255 PassOwnPtrWillBeRawPtr<WebDevToolsAgentImpl> WebDevToolsAgentImpl::create(WebLoc
alFrameImpl* frame, WebDevToolsAgentClient* client) | 256 PassOwnPtrWillBeRawPtr<WebDevToolsAgentImpl> WebDevToolsAgentImpl::create(WebLoc
alFrameImpl* frame, WebDevToolsAgentClient* client) |
| 256 { | 257 { |
| 257 WebViewImpl* view = frame->viewImpl(); | 258 WebViewImpl* view = frame->viewImpl(); |
| 258 bool isMainFrame = view && view->mainFrameImpl() == frame; | 259 bool isMainFrame = view && view->mainFrameImpl() == frame; |
| 259 if (!isMainFrame) | 260 if (!isMainFrame) { |
| 260 return adoptPtrWillBeNoop(new WebDevToolsAgentImpl(frame, client, frame-
>inspectorOverlay())); | 261 WebDevToolsAgentImpl* agent = new WebDevToolsAgentImpl(frame, client, fr
ame->inspectorOverlay()); |
| 262 if (frame->frameWidget()) |
| 263 agent->layerTreeViewChanged(frame->frameWidget()->layerTreeView()); |
| 264 return adoptPtrWillBeNoop(agent); |
| 265 } |
| 261 | 266 |
| 262 WebDevToolsAgentImpl* agent = new WebDevToolsAgentImpl(frame, client, view->
inspectorOverlay()); | 267 WebDevToolsAgentImpl* agent = new WebDevToolsAgentImpl(frame, client, view->
inspectorOverlay()); |
| 263 agent->registerAgent(InspectorRenderingAgent::create(view)); | 268 agent->registerAgent(InspectorRenderingAgent::create(view)); |
| 264 agent->registerAgent(InspectorEmulationAgent::create(view)); | 269 agent->registerAgent(InspectorEmulationAgent::create(view)); |
| 265 // TODO(dgozman): migrate each of the following agents to frame once module
is ready. | 270 // TODO(dgozman): migrate each of the following agents to frame once module
is ready. |
| 266 agent->registerAgent(InspectorDatabaseAgent::create(view->page())); | 271 agent->registerAgent(InspectorDatabaseAgent::create(view->page())); |
| 267 agent->registerAgent(DeviceOrientationInspectorAgent::create(view->page())); | 272 agent->registerAgent(DeviceOrientationInspectorAgent::create(view->page())); |
| 268 agent->registerAgent(InspectorFileSystemAgent::create(view->page())); | 273 agent->registerAgent(InspectorFileSystemAgent::create(view->page())); |
| 269 agent->registerAgent(InspectorIndexedDBAgent::create(view->page())); | 274 agent->registerAgent(InspectorIndexedDBAgent::create(view->page())); |
| 270 agent->registerAgent(InspectorAccessibilityAgent::create(view->page())); | 275 agent->registerAgent(InspectorAccessibilityAgent::create(view->page())); |
| 271 agent->registerAgent(InspectorDOMStorageAgent::create(view->page())); | 276 agent->registerAgent(InspectorDOMStorageAgent::create(view->page())); |
| 272 agent->registerAgent(InspectorCacheStorageAgent::create()); | 277 agent->registerAgent(InspectorCacheStorageAgent::create()); |
| 278 agent->layerTreeViewChanged(view->layerTreeView()); |
| 273 return adoptPtrWillBeNoop(agent); | 279 return adoptPtrWillBeNoop(agent); |
| 274 } | 280 } |
| 275 | 281 |
| 276 WebDevToolsAgentImpl::WebDevToolsAgentImpl( | 282 WebDevToolsAgentImpl::WebDevToolsAgentImpl( |
| 277 WebLocalFrameImpl* webLocalFrameImpl, | 283 WebLocalFrameImpl* webLocalFrameImpl, |
| 278 WebDevToolsAgentClient* client, | 284 WebDevToolsAgentClient* client, |
| 279 InspectorOverlay* overlay) | 285 InspectorOverlay* overlay) |
| 280 : m_client(client) | 286 : m_client(client) |
| 281 , m_webLocalFrameImpl(webLocalFrameImpl) | 287 , m_webLocalFrameImpl(webLocalFrameImpl) |
| 282 , m_attached(false) | 288 , m_attached(false) |
| (...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 579 void WebDevToolsAgentImpl::willAddPageOverlay(const GraphicsLayer* layer) | 585 void WebDevToolsAgentImpl::willAddPageOverlay(const GraphicsLayer* layer) |
| 580 { | 586 { |
| 581 m_layerTreeAgent->willAddPageOverlay(layer); | 587 m_layerTreeAgent->willAddPageOverlay(layer); |
| 582 } | 588 } |
| 583 | 589 |
| 584 void WebDevToolsAgentImpl::didRemovePageOverlay(const GraphicsLayer* layer) | 590 void WebDevToolsAgentImpl::didRemovePageOverlay(const GraphicsLayer* layer) |
| 585 { | 591 { |
| 586 m_layerTreeAgent->didRemovePageOverlay(layer); | 592 m_layerTreeAgent->didRemovePageOverlay(layer); |
| 587 } | 593 } |
| 588 | 594 |
| 595 void WebDevToolsAgentImpl::layerTreeViewChanged(WebLayerTreeView* layerTreeView) |
| 596 { |
| 597 m_tracingAgent->setLayerTreeId(layerTreeView ? layerTreeView->layerTreeId()
: 0); |
| 598 } |
| 599 |
| 589 void WebDevToolsAgentImpl::enableTracing(const String& categoryFilter) | 600 void WebDevToolsAgentImpl::enableTracing(const String& categoryFilter) |
| 590 { | 601 { |
| 591 m_client->enableTracing(categoryFilter); | 602 m_client->enableTracing(categoryFilter); |
| 592 } | 603 } |
| 593 | 604 |
| 594 void WebDevToolsAgentImpl::disableTracing() | 605 void WebDevToolsAgentImpl::disableTracing() |
| 595 { | 606 { |
| 596 m_client->disableTracing(); | 607 m_client->disableTracing(); |
| 597 } | 608 } |
| 598 | 609 |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 714 if (!InspectorBackendDispatcher::getCommandName(message, &commandName)) | 725 if (!InspectorBackendDispatcher::getCommandName(message, &commandName)) |
| 715 return false; | 726 return false; |
| 716 return commandName == InspectorBackendDispatcher::commandName(InspectorBacke
ndDispatcher::kDebugger_pauseCmd) | 727 return commandName == InspectorBackendDispatcher::commandName(InspectorBacke
ndDispatcher::kDebugger_pauseCmd) |
| 717 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke
ndDispatcher::kDebugger_setBreakpointCmd) | 728 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke
ndDispatcher::kDebugger_setBreakpointCmd) |
| 718 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke
ndDispatcher::kDebugger_setBreakpointByUrlCmd) | 729 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke
ndDispatcher::kDebugger_setBreakpointByUrlCmd) |
| 719 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke
ndDispatcher::kDebugger_removeBreakpointCmd) | 730 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke
ndDispatcher::kDebugger_removeBreakpointCmd) |
| 720 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke
ndDispatcher::kDebugger_setBreakpointsActiveCmd); | 731 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke
ndDispatcher::kDebugger_setBreakpointsActiveCmd); |
| 721 } | 732 } |
| 722 | 733 |
| 723 } // namespace blink | 734 } // namespace blink |
| OLD | NEW |