| 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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 #include "platform/graphics/GraphicsContext.h" | 86 #include "platform/graphics/GraphicsContext.h" |
| 87 #include "platform/graphics/paint/DisplayItemList.h" | 87 #include "platform/graphics/paint/DisplayItemList.h" |
| 88 #include "public/platform/Platform.h" | 88 #include "public/platform/Platform.h" |
| 89 #include "public/platform/WebLayerTreeView.h" | 89 #include "public/platform/WebLayerTreeView.h" |
| 90 #include "public/platform/WebRect.h" | 90 #include "public/platform/WebRect.h" |
| 91 #include "public/platform/WebString.h" | 91 #include "public/platform/WebString.h" |
| 92 #include "public/web/WebDevToolsAgentClient.h" | 92 #include "public/web/WebDevToolsAgentClient.h" |
| 93 #include "public/web/WebSettings.h" | 93 #include "public/web/WebSettings.h" |
| 94 #include "web/DevToolsEmulator.h" | 94 #include "web/DevToolsEmulator.h" |
| 95 #include "web/InspectorEmulationAgent.h" | 95 #include "web/InspectorEmulationAgent.h" |
| 96 #include "web/InspectorOverlayImpl.h" | 96 #include "web/InspectorOverlay.h" |
| 97 #include "web/InspectorRenderingAgent.h" | 97 #include "web/InspectorRenderingAgent.h" |
| 98 #include "web/WebFrameWidgetImpl.h" | 98 #include "web/WebFrameWidgetImpl.h" |
| 99 #include "web/WebInputEventConversion.h" | 99 #include "web/WebInputEventConversion.h" |
| 100 #include "web/WebLocalFrameImpl.h" | 100 #include "web/WebLocalFrameImpl.h" |
| 101 #include "web/WebSettingsImpl.h" | 101 #include "web/WebSettingsImpl.h" |
| 102 #include "web/WebViewImpl.h" | 102 #include "web/WebViewImpl.h" |
| 103 #include "wtf/MathExtras.h" | 103 #include "wtf/MathExtras.h" |
| 104 #include "wtf/Noncopyable.h" | 104 #include "wtf/Noncopyable.h" |
| 105 #include "wtf/text/WTFString.h" | 105 #include "wtf/text/WTFString.h" |
| 106 | 106 |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 282 // TODO(dgozman): sometimes view->mainFrameImpl() does return null, even tho
ugh |frame| is meant to be main frame. | 282 // TODO(dgozman): sometimes view->mainFrameImpl() does return null, even tho
ugh |frame| is meant to be main frame. |
| 283 // See http://crbug.com/526162. | 283 // See http://crbug.com/526162. |
| 284 bool isMainFrame = view && !frame->parent(); | 284 bool isMainFrame = view && !frame->parent(); |
| 285 if (!isMainFrame) { | 285 if (!isMainFrame) { |
| 286 WebDevToolsAgentImpl* agent = new WebDevToolsAgentImpl(frame, client, nu
llptr); | 286 WebDevToolsAgentImpl* agent = new WebDevToolsAgentImpl(frame, client, nu
llptr); |
| 287 if (frame->frameWidget()) | 287 if (frame->frameWidget()) |
| 288 agent->layerTreeViewChanged(toWebFrameWidgetImpl(frame->frameWidget(
))->layerTreeView()); | 288 agent->layerTreeViewChanged(toWebFrameWidgetImpl(frame->frameWidget(
))->layerTreeView()); |
| 289 return adoptPtrWillBeNoop(agent); | 289 return adoptPtrWillBeNoop(agent); |
| 290 } | 290 } |
| 291 | 291 |
| 292 WebDevToolsAgentImpl* agent = new WebDevToolsAgentImpl(frame, client, Inspec
torOverlayImpl::create(view)); | 292 WebDevToolsAgentImpl* agent = new WebDevToolsAgentImpl(frame, client, Inspec
torOverlay::create(view)); |
| 293 agent->registerAgent(InspectorRenderingAgent::create(view)); | 293 agent->registerAgent(InspectorRenderingAgent::create(view)); |
| 294 agent->registerAgent(InspectorEmulationAgent::create(view)); | 294 agent->registerAgent(InspectorEmulationAgent::create(view)); |
| 295 // TODO(dgozman): migrate each of the following agents to frame once module
is ready. | 295 // TODO(dgozman): migrate each of the following agents to frame once module
is ready. |
| 296 agent->registerAgent(InspectorDatabaseAgent::create(view->page())); | 296 agent->registerAgent(InspectorDatabaseAgent::create(view->page())); |
| 297 agent->registerAgent(DeviceOrientationInspectorAgent::create(view->page())); | 297 agent->registerAgent(DeviceOrientationInspectorAgent::create(view->page())); |
| 298 agent->registerAgent(InspectorFileSystemAgent::create(view->page())); | 298 agent->registerAgent(InspectorFileSystemAgent::create(view->page())); |
| 299 agent->registerAgent(InspectorIndexedDBAgent::create(view->page())); | 299 agent->registerAgent(InspectorIndexedDBAgent::create(view->page())); |
| 300 agent->registerAgent(InspectorAccessibilityAgent::create(view->page())); | 300 agent->registerAgent(InspectorAccessibilityAgent::create(view->page())); |
| 301 agent->registerAgent(InspectorDOMStorageAgent::create(view->page())); | 301 agent->registerAgent(InspectorDOMStorageAgent::create(view->page())); |
| 302 agent->registerAgent(InspectorCacheStorageAgent::create()); | 302 agent->registerAgent(InspectorCacheStorageAgent::create()); |
| 303 agent->layerTreeViewChanged(view->layerTreeView()); | 303 agent->layerTreeViewChanged(view->layerTreeView()); |
| 304 return adoptPtrWillBeNoop(agent); | 304 return adoptPtrWillBeNoop(agent); |
| 305 } | 305 } |
| 306 | 306 |
| 307 WebDevToolsAgentImpl::WebDevToolsAgentImpl( | 307 WebDevToolsAgentImpl::WebDevToolsAgentImpl( |
| 308 WebLocalFrameImpl* webLocalFrameImpl, | 308 WebLocalFrameImpl* webLocalFrameImpl, |
| 309 WebDevToolsAgentClient* client, | 309 WebDevToolsAgentClient* client, |
| 310 PassOwnPtrWillBeRawPtr<InspectorOverlayImpl> overlay) | 310 PassOwnPtrWillBeRawPtr<InspectorOverlay> overlay) |
| 311 : m_client(client) | 311 : m_client(client) |
| 312 , m_webLocalFrameImpl(webLocalFrameImpl) | 312 , m_webLocalFrameImpl(webLocalFrameImpl) |
| 313 , m_attached(false) | 313 , m_attached(false) |
| 314 #if ENABLE(ASSERT) | 314 #if ENABLE(ASSERT) |
| 315 , m_hasBeenDisposed(false) | 315 , m_hasBeenDisposed(false) |
| 316 #endif | 316 #endif |
| 317 , m_instrumentingAgents(m_webLocalFrameImpl->frame()->instrumentingAgents()) | 317 , m_instrumentingAgents(m_webLocalFrameImpl->frame()->instrumentingAgents()) |
| 318 , m_injectedScriptManager(InjectedScriptManager::createForPage()) | 318 , m_injectedScriptManager(InjectedScriptManager::createForPage()) |
| 319 , m_resourceContentLoader(InspectorResourceContentLoader::create(m_webLocalF
rameImpl->frame())) | 319 , m_resourceContentLoader(InspectorResourceContentLoader::create(m_webLocalF
rameImpl->frame())) |
| 320 , m_state(adoptPtrWillBeNoop(new InspectorCompositeState(this))) | 320 , m_state(adoptPtrWillBeNoop(new InspectorCompositeState(this))) |
| (...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 708 if (!InspectorBackendDispatcher::getCommandName(message, &commandName)) | 708 if (!InspectorBackendDispatcher::getCommandName(message, &commandName)) |
| 709 return false; | 709 return false; |
| 710 return commandName == InspectorBackendDispatcher::commandName(InspectorBacke
ndDispatcher::kDebugger_pauseCmd) | 710 return commandName == InspectorBackendDispatcher::commandName(InspectorBacke
ndDispatcher::kDebugger_pauseCmd) |
| 711 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke
ndDispatcher::kDebugger_setBreakpointCmd) | 711 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke
ndDispatcher::kDebugger_setBreakpointCmd) |
| 712 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke
ndDispatcher::kDebugger_setBreakpointByUrlCmd) | 712 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke
ndDispatcher::kDebugger_setBreakpointByUrlCmd) |
| 713 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke
ndDispatcher::kDebugger_removeBreakpointCmd) | 713 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke
ndDispatcher::kDebugger_removeBreakpointCmd) |
| 714 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke
ndDispatcher::kDebugger_setBreakpointsActiveCmd); | 714 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke
ndDispatcher::kDebugger_setBreakpointsActiveCmd); |
| 715 } | 715 } |
| 716 | 716 |
| 717 } // namespace blink | 717 } // namespace blink |
| OLD | NEW |