| 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 437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 448 m_session->append(DeviceOrientationInspectorAgent::create(page)); | 448 m_session->append(DeviceOrientationInspectorAgent::create(page)); |
| 449 m_session->append(new InspectorAccessibilityAgent(page, m_domAgent)); | 449 m_session->append(new InspectorAccessibilityAgent(page, m_domAgent)); |
| 450 m_session->append(InspectorDOMStorageAgent::create(page)); | 450 m_session->append(InspectorDOMStorageAgent::create(page)); |
| 451 m_session->append(InspectorCacheStorageAgent::create()); | 451 m_session->append(InspectorCacheStorageAgent::create()); |
| 452 } | 452 } |
| 453 | 453 |
| 454 if (m_overlay) | 454 if (m_overlay) |
| 455 m_overlay->init(cssAgent, debuggerAgent, m_domAgent); | 455 m_overlay->init(cssAgent, debuggerAgent, m_domAgent); |
| 456 | 456 |
| 457 Platform::current()->currentThread()->addTaskObserver(this); | 457 Platform::current()->currentThread()->addTaskObserver(this); |
| 458 InspectorInstrumentation::registerInstrumentingAgents(m_instrumentingAgents.
get()); | |
| 459 } | 458 } |
| 460 | 459 |
| 461 void WebDevToolsAgentImpl::destroySession() | 460 void WebDevToolsAgentImpl::destroySession() |
| 462 { | 461 { |
| 463 if (m_overlay) | 462 if (m_overlay) |
| 464 m_overlay->clear(); | 463 m_overlay->clear(); |
| 465 | 464 |
| 466 m_tracingAgent.clear(); | 465 m_tracingAgent.clear(); |
| 467 m_layerTreeAgent.clear(); | 466 m_layerTreeAgent.clear(); |
| 468 m_resourceAgent.clear(); | 467 m_resourceAgent.clear(); |
| 469 m_pageAgent.clear(); | 468 m_pageAgent.clear(); |
| 470 m_domAgent.clear(); | 469 m_domAgent.clear(); |
| 471 | 470 |
| 472 m_session->detach(); | 471 m_session->detach(); |
| 473 m_v8Session.clear(); | 472 m_v8Session.clear(); |
| 474 m_session.clear(); | 473 m_session.clear(); |
| 475 | 474 |
| 476 Platform::current()->currentThread()->removeTaskObserver(this); | 475 Platform::current()->currentThread()->removeTaskObserver(this); |
| 477 InspectorInstrumentation::unregisterInstrumentingAgents(m_instrumentingAgent
s.get()); | |
| 478 } | 476 } |
| 479 | 477 |
| 480 void WebDevToolsAgentImpl::attach(const WebString& hostId, int sessionId) | 478 void WebDevToolsAgentImpl::attach(const WebString& hostId, int sessionId) |
| 481 { | 479 { |
| 482 if (attached()) | 480 if (attached()) |
| 483 return; | 481 return; |
| 484 initializeSession(sessionId, hostId); | 482 initializeSession(sessionId, hostId); |
| 485 m_session->attach(m_v8Session.get(), nullptr); | 483 m_session->attach(m_v8Session.get(), nullptr); |
| 486 } | 484 } |
| 487 | 485 |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 691 bool WebDevToolsAgent::shouldInterruptForMethod(const WebString& method) | 689 bool WebDevToolsAgent::shouldInterruptForMethod(const WebString& method) |
| 692 { | 690 { |
| 693 return method == "Debugger.pause" | 691 return method == "Debugger.pause" |
| 694 || method == "Debugger.setBreakpoint" | 692 || method == "Debugger.setBreakpoint" |
| 695 || method == "Debugger.setBreakpointByUrl" | 693 || method == "Debugger.setBreakpointByUrl" |
| 696 || method == "Debugger.removeBreakpoint" | 694 || method == "Debugger.removeBreakpoint" |
| 697 || method == "Debugger.setBreakpointsActive"; | 695 || method == "Debugger.setBreakpointsActive"; |
| 698 } | 696 } |
| 699 | 697 |
| 700 } // namespace blink | 698 } // namespace blink |
| OLD | NEW |