| 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 #include "core/inspector/InspectorOverlay.h" | 58 #include "core/inspector/InspectorOverlay.h" |
| 59 #include "core/inspector/InspectorPageAgent.h" | 59 #include "core/inspector/InspectorPageAgent.h" |
| 60 #include "core/inspector/InspectorProfilerAgent.h" | 60 #include "core/inspector/InspectorProfilerAgent.h" |
| 61 #include "core/inspector/InspectorResourceAgent.h" | 61 #include "core/inspector/InspectorResourceAgent.h" |
| 62 #include "core/inspector/InspectorState.h" | 62 #include "core/inspector/InspectorState.h" |
| 63 #include "core/inspector/InspectorTaskRunner.h" | 63 #include "core/inspector/InspectorTaskRunner.h" |
| 64 #include "core/inspector/InspectorTimelineAgent.h" | 64 #include "core/inspector/InspectorTimelineAgent.h" |
| 65 #include "core/inspector/InspectorTracingAgent.h" | 65 #include "core/inspector/InspectorTracingAgent.h" |
| 66 #include "core/inspector/InspectorWorkerAgent.h" | 66 #include "core/inspector/InspectorWorkerAgent.h" |
| 67 #include "core/inspector/InstrumentingAgents.h" | 67 #include "core/inspector/InstrumentingAgents.h" |
| 68 #include "core/inspector/LayoutEditor.h" |
| 68 #include "core/inspector/PageConsoleAgent.h" | 69 #include "core/inspector/PageConsoleAgent.h" |
| 69 #include "core/inspector/PageDebuggerAgent.h" | 70 #include "core/inspector/PageDebuggerAgent.h" |
| 70 #include "core/inspector/PageRuntimeAgent.h" | 71 #include "core/inspector/PageRuntimeAgent.h" |
| 71 #include "core/layout/LayoutView.h" | 72 #include "core/layout/LayoutView.h" |
| 72 #include "core/page/FocusController.h" | 73 #include "core/page/FocusController.h" |
| 73 #include "core/page/Page.h" | 74 #include "core/page/Page.h" |
| 74 #include "modules/accessibility/InspectorAccessibilityAgent.h" | 75 #include "modules/accessibility/InspectorAccessibilityAgent.h" |
| 75 #include "modules/cachestorage/InspectorCacheStorageAgent.h" | 76 #include "modules/cachestorage/InspectorCacheStorageAgent.h" |
| 76 #include "modules/device_orientation/DeviceOrientationInspectorAgent.h" | 77 #include "modules/device_orientation/DeviceOrientationInspectorAgent.h" |
| 77 #include "modules/filesystem/InspectorFileSystemAgent.h" | 78 #include "modules/filesystem/InspectorFileSystemAgent.h" |
| (...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 483 void WebDevToolsAgentImpl::attach(const WebString& hostId) | 484 void WebDevToolsAgentImpl::attach(const WebString& hostId) |
| 484 { | 485 { |
| 485 if (m_attached) | 486 if (m_attached) |
| 486 return; | 487 return; |
| 487 | 488 |
| 488 // Set the attached bit first so that sync notifications were delivered. | 489 // Set the attached bit first so that sync notifications were delivered. |
| 489 m_attached = true; | 490 m_attached = true; |
| 490 | 491 |
| 491 initializeDeferredAgents(); | 492 initializeDeferredAgents(); |
| 492 m_resourceAgent->setHostId(hostId); | 493 m_resourceAgent->setHostId(hostId); |
| 494 m_overlay->setLayoutEditor(LayoutEditor::create(m_cssAgent.get())); |
| 493 | 495 |
| 494 m_inspectorFrontend = adoptPtr(new InspectorFrontend(this)); | 496 m_inspectorFrontend = adoptPtr(new InspectorFrontend(this)); |
| 495 // We can reconnect to existing front-end -> unmute state. | 497 // We can reconnect to existing front-end -> unmute state. |
| 496 m_state->unmute(); | 498 m_state->unmute(); |
| 497 m_agents.setFrontend(m_inspectorFrontend.get()); | 499 m_agents.setFrontend(m_inspectorFrontend.get()); |
| 498 | 500 |
| 499 InspectorInstrumentation::registerInstrumentingAgents(m_instrumentingAgents.
get()); | 501 InspectorInstrumentation::registerInstrumentingAgents(m_instrumentingAgents.
get()); |
| 500 InspectorInstrumentation::frontendCreated(); | 502 InspectorInstrumentation::frontendCreated(); |
| 501 | 503 |
| 502 m_inspectorBackendDispatcher = InspectorBackendDispatcher::create(this); | 504 m_inspectorBackendDispatcher = InspectorBackendDispatcher::create(this); |
| (...skipping 23 matching lines...) Expand all Loading... |
| 526 m_inspectorBackendDispatcher.clear(); | 528 m_inspectorBackendDispatcher.clear(); |
| 527 | 529 |
| 528 // Destroying agents would change the state, but we don't want that. | 530 // Destroying agents would change the state, but we don't want that. |
| 529 // Pre-disconnect state will be used to restore inspector agents. | 531 // Pre-disconnect state will be used to restore inspector agents. |
| 530 m_state->mute(); | 532 m_state->mute(); |
| 531 m_agents.clearFrontend(); | 533 m_agents.clearFrontend(); |
| 532 m_inspectorFrontend.clear(); | 534 m_inspectorFrontend.clear(); |
| 533 | 535 |
| 534 // Release overlay resources. | 536 // Release overlay resources. |
| 535 m_overlay->clear(); | 537 m_overlay->clear(); |
| 538 m_overlay->setLayoutEditor(nullptr); |
| 536 InspectorInstrumentation::frontendDeleted(); | 539 InspectorInstrumentation::frontendDeleted(); |
| 537 InspectorInstrumentation::unregisterInstrumentingAgents(m_instrumentingAgent
s.get()); | 540 InspectorInstrumentation::unregisterInstrumentingAgents(m_instrumentingAgent
s.get()); |
| 538 | 541 |
| 539 m_attached = false; | 542 m_attached = false; |
| 540 } | 543 } |
| 541 | 544 |
| 542 void WebDevToolsAgentImpl::continueProgram() | 545 void WebDevToolsAgentImpl::continueProgram() |
| 543 { | 546 { |
| 544 ClientMessageLoopAdapter::continueProgram(); | 547 ClientMessageLoopAdapter::continueProgram(); |
| 545 } | 548 } |
| (...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 741 if (!InspectorBackendDispatcher::getCommandName(message, &commandName)) | 744 if (!InspectorBackendDispatcher::getCommandName(message, &commandName)) |
| 742 return false; | 745 return false; |
| 743 return commandName == InspectorBackendDispatcher::commandName(InspectorBacke
ndDispatcher::kDebugger_pauseCmd) | 746 return commandName == InspectorBackendDispatcher::commandName(InspectorBacke
ndDispatcher::kDebugger_pauseCmd) |
| 744 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke
ndDispatcher::kDebugger_setBreakpointCmd) | 747 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke
ndDispatcher::kDebugger_setBreakpointCmd) |
| 745 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke
ndDispatcher::kDebugger_setBreakpointByUrlCmd) | 748 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke
ndDispatcher::kDebugger_setBreakpointByUrlCmd) |
| 746 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke
ndDispatcher::kDebugger_removeBreakpointCmd) | 749 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke
ndDispatcher::kDebugger_removeBreakpointCmd) |
| 747 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke
ndDispatcher::kDebugger_setBreakpointsActiveCmd); | 750 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke
ndDispatcher::kDebugger_setBreakpointsActiveCmd); |
| 748 } | 751 } |
| 749 | 752 |
| 750 } // namespace blink | 753 } // namespace blink |
| OLD | NEW |