Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(27)

Side by Side Diff: third_party/WebKit/Source/web/WebDevToolsAgentImpl.cpp

Issue 1967933002: [DevTools] Dispatch messages to V8InspectorSession directly. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@1936593002
Patch Set: rebased Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 24 matching lines...) Expand all
35 #include "core/InstrumentingAgents.h" 35 #include "core/InstrumentingAgents.h"
36 #include "core/frame/FrameView.h" 36 #include "core/frame/FrameView.h"
37 #include "core/frame/LocalFrame.h" 37 #include "core/frame/LocalFrame.h"
38 #include "core/frame/Settings.h" 38 #include "core/frame/Settings.h"
39 #include "core/inspector/InspectedFrames.h" 39 #include "core/inspector/InspectedFrames.h"
40 #include "core/inspector/InspectorAnimationAgent.h" 40 #include "core/inspector/InspectorAnimationAgent.h"
41 #include "core/inspector/InspectorApplicationCacheAgent.h" 41 #include "core/inspector/InspectorApplicationCacheAgent.h"
42 #include "core/inspector/InspectorCSSAgent.h" 42 #include "core/inspector/InspectorCSSAgent.h"
43 #include "core/inspector/InspectorDOMAgent.h" 43 #include "core/inspector/InspectorDOMAgent.h"
44 #include "core/inspector/InspectorDOMDebuggerAgent.h" 44 #include "core/inspector/InspectorDOMDebuggerAgent.h"
45 #include "core/inspector/InspectorDebuggerAgent.h"
46 #include "core/inspector/InspectorHeapProfilerAgent.h"
47 #include "core/inspector/InspectorInputAgent.h" 45 #include "core/inspector/InspectorInputAgent.h"
48 #include "core/inspector/InspectorInstrumentation.h" 46 #include "core/inspector/InspectorInstrumentation.h"
49 #include "core/inspector/InspectorLayerTreeAgent.h" 47 #include "core/inspector/InspectorLayerTreeAgent.h"
50 #include "core/inspector/InspectorMemoryAgent.h" 48 #include "core/inspector/InspectorMemoryAgent.h"
51 #include "core/inspector/InspectorPageAgent.h" 49 #include "core/inspector/InspectorPageAgent.h"
52 #include "core/inspector/InspectorProfilerAgent.h"
53 #include "core/inspector/InspectorResourceAgent.h" 50 #include "core/inspector/InspectorResourceAgent.h"
54 #include "core/inspector/InspectorResourceContainer.h" 51 #include "core/inspector/InspectorResourceContainer.h"
55 #include "core/inspector/InspectorResourceContentLoader.h" 52 #include "core/inspector/InspectorResourceContentLoader.h"
56 #include "core/inspector/InspectorRuntimeAgent.h"
57 #include "core/inspector/InspectorTaskRunner.h" 53 #include "core/inspector/InspectorTaskRunner.h"
58 #include "core/inspector/InspectorTracingAgent.h" 54 #include "core/inspector/InspectorTracingAgent.h"
59 #include "core/inspector/InspectorWorkerAgent.h" 55 #include "core/inspector/InspectorWorkerAgent.h"
60 #include "core/inspector/LayoutEditor.h" 56 #include "core/inspector/LayoutEditor.h"
61 #include "core/inspector/MainThreadDebugger.h" 57 #include "core/inspector/MainThreadDebugger.h"
62 #include "core/inspector/PageConsoleAgent.h" 58 #include "core/inspector/PageConsoleAgent.h"
63 #include "core/layout/api/LayoutViewItem.h" 59 #include "core/layout/api/LayoutViewItem.h"
64 #include "core/page/FocusController.h" 60 #include "core/page/FocusController.h"
65 #include "core/page/Page.h" 61 #include "core/page/Page.h"
66 #include "modules/accessibility/InspectorAccessibilityAgent.h" 62 #include "modules/accessibility/InspectorAccessibilityAgent.h"
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 176
181 m_runningForCreateWindow = true; 177 m_runningForCreateWindow = true;
182 if (!m_runningForDebugBreak) 178 if (!m_runningForDebugBreak)
183 runLoop(frame); 179 runLoop(frame);
184 } 180 }
185 181
186 void runLoop(WebLocalFrameImpl* frame) 182 void runLoop(WebLocalFrameImpl* frame)
187 { 183 {
188 // 0. Flush pending frontend messages. 184 // 0. Flush pending frontend messages.
189 WebDevToolsAgentImpl* agent = frame->devToolsAgentImpl(); 185 WebDevToolsAgentImpl* agent = frame->devToolsAgentImpl();
190 agent->flushPendingProtocolNotifications(); 186 agent->flushProtocolNotifications();
191 187
192 Vector<WebViewImpl*> views; 188 Vector<WebViewImpl*> views;
193 HeapVector<Member<WebFrameWidgetImpl>> widgets; 189 HeapVector<Member<WebFrameWidgetImpl>> widgets;
194 190
195 // 1. Disable input events. 191 // 1. Disable input events.
196 const HashSet<WebViewImpl*>& viewImpls = WebViewImpl::allInstances(); 192 const HashSet<WebViewImpl*>& viewImpls = WebViewImpl::allInstances();
197 HashSet<WebViewImpl*>::const_iterator viewImplsEnd = viewImpls.end(); 193 HashSet<WebViewImpl*>::const_iterator viewImplsEnd = viewImpls.end();
198 for (HashSet<WebViewImpl*>::const_iterator it = viewImpls.begin(); it ! = viewImplsEnd; ++it) { 194 for (HashSet<WebViewImpl*>::const_iterator it = viewImpls.begin(); it ! = viewImplsEnd; ++it) {
199 WebViewImpl* view = *it; 195 WebViewImpl* view = *it;
200 m_frozenViews.add(view); 196 m_frozenViews.add(view);
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 } 363 }
368 364
369 void WebDevToolsAgentImpl::willBeDestroyed() 365 void WebDevToolsAgentImpl::willBeDestroyed()
370 { 366 {
371 DCHECK(m_webLocalFrameImpl->frame()); 367 DCHECK(m_webLocalFrameImpl->frame());
372 DCHECK(m_inspectedFrames->root()->view()); 368 DCHECK(m_inspectedFrames->root()->view());
373 detach(); 369 detach();
374 m_resourceContentLoader->dispose(); 370 m_resourceContentLoader->dispose();
375 } 371 }
376 372
377 void WebDevToolsAgentImpl::initializeSession(int sessionId, const String& hostId ) 373 void WebDevToolsAgentImpl::initializeSession(int sessionId, const String& hostId , String* state)
378 { 374 {
379 m_session = new InspectorSession(this, m_inspectedFrames.get(), m_instrument ingAgents.get(), sessionId, false /* autoFlush */);
380
381 ClientMessageLoopAdapter::ensureMainThreadDebuggerCreated(m_client); 375 ClientMessageLoopAdapter::ensureMainThreadDebuggerCreated(m_client);
382 MainThreadDebugger* mainThreadDebugger = MainThreadDebugger::instance(); 376 MainThreadDebugger* mainThreadDebugger = MainThreadDebugger::instance();
383 v8::Isolate* isolate = V8PerIsolateData::mainThreadIsolate(); 377 v8::Isolate* isolate = V8PerIsolateData::mainThreadIsolate();
384 m_v8Session = mainThreadDebugger->debugger()->connect(mainThreadDebugger->co ntextGroupId(m_inspectedFrames->root()));
385 378
386 m_session->append(new InspectorRuntimeAgent(m_v8Session->runtimeAgent())); 379 m_session = new InspectorSession(this, m_inspectedFrames.get(), m_instrument ingAgents.get(), sessionId, false /* autoFlush */, mainThreadDebugger->debugger( ), mainThreadDebugger->contextGroupId(m_inspectedFrames->root()), state);
387 380
388 InspectorDOMAgent* domAgent = new InspectorDOMAgent(isolate, m_inspectedFram es.get(), m_v8Session.get(), m_overlay.get()); 381 InspectorDOMAgent* domAgent = new InspectorDOMAgent(isolate, m_inspectedFram es.get(), m_session->v8Session(), m_overlay.get());
389 m_domAgent = domAgent; 382 m_domAgent = domAgent;
390 m_session->append(domAgent); 383 m_session->append(domAgent);
391 384
392 InspectorLayerTreeAgent* layerTreeAgent = InspectorLayerTreeAgent::create(m_ inspectedFrames.get()); 385 InspectorLayerTreeAgent* layerTreeAgent = InspectorLayerTreeAgent::create(m_ inspectedFrames.get());
393 m_layerTreeAgent = layerTreeAgent; 386 m_layerTreeAgent = layerTreeAgent;
394 m_session->append(layerTreeAgent); 387 m_session->append(layerTreeAgent);
395 388
396 InspectorResourceAgent* resourceAgent = InspectorResourceAgent::create(m_ins pectedFrames.get()); 389 InspectorResourceAgent* resourceAgent = InspectorResourceAgent::create(m_ins pectedFrames.get());
397 m_resourceAgent = resourceAgent; 390 m_resourceAgent = resourceAgent;
398 m_session->append(resourceAgent); 391 m_session->append(resourceAgent);
399 392
400 InspectorCSSAgent* cssAgent = InspectorCSSAgent::create(m_domAgent, m_inspec tedFrames.get(), m_resourceAgent, m_resourceContentLoader.get(), m_resourceConta iner.get()); 393 InspectorCSSAgent* cssAgent = InspectorCSSAgent::create(m_domAgent, m_inspec tedFrames.get(), m_resourceAgent, m_resourceContentLoader.get(), m_resourceConta iner.get());
401 m_session->append(cssAgent); 394 m_session->append(cssAgent);
402 395
403 m_session->append(new InspectorAnimationAgent(m_inspectedFrames.get(), m_dom Agent, cssAgent, m_v8Session.get())); 396 m_session->append(new InspectorAnimationAgent(m_inspectedFrames.get(), m_dom Agent, cssAgent, m_session->v8Session()));
404 397
405 m_session->append(InspectorMemoryAgent::create()); 398 m_session->append(InspectorMemoryAgent::create());
406 399
407 m_session->append(InspectorApplicationCacheAgent::create(m_inspectedFrames.g et())); 400 m_session->append(InspectorApplicationCacheAgent::create(m_inspectedFrames.g et()));
408 401
409 m_session->append(InspectorIndexedDBAgent::create(m_inspectedFrames.get())); 402 m_session->append(InspectorIndexedDBAgent::create(m_inspectedFrames.get()));
410 403
411 InspectorDebuggerAgent* debuggerAgent = new InspectorDebuggerAgent(m_v8Sessi on->debuggerAgent()); 404 m_session->append(new PageConsoleAgent(m_session->v8Session(), m_domAgent, m _inspectedFrames.get()));
412 m_session->append(debuggerAgent);
413
414 m_session->append(new PageConsoleAgent(m_v8Session.get(), m_domAgent, m_insp ectedFrames.get()));
415 405
416 InspectorWorkerAgent* workerAgent = new InspectorWorkerAgent(m_inspectedFram es.get()); 406 InspectorWorkerAgent* workerAgent = new InspectorWorkerAgent(m_inspectedFram es.get());
417 m_session->append(workerAgent); 407 m_session->append(workerAgent);
418 408
419 InspectorTracingAgent* tracingAgent = InspectorTracingAgent::create(this, wo rkerAgent, m_inspectedFrames.get()); 409 InspectorTracingAgent* tracingAgent = InspectorTracingAgent::create(this, wo rkerAgent, m_inspectedFrames.get());
420 m_tracingAgent = tracingAgent; 410 m_tracingAgent = tracingAgent;
421 m_session->append(tracingAgent); 411 m_session->append(tracingAgent);
422 412
423 m_session->append(new InspectorDOMDebuggerAgent(isolate, m_domAgent, m_v8Ses sion.get())); 413 m_session->append(new InspectorDOMDebuggerAgent(isolate, m_domAgent, m_sessi on->v8Session()));
424 414
425 m_session->append(InspectorInputAgent::create(m_inspectedFrames.get())); 415 m_session->append(InspectorInputAgent::create(m_inspectedFrames.get()));
426 416
427 m_session->append(new InspectorProfilerAgent(m_v8Session->profilerAgent())); 417 InspectorPageAgent* pageAgent = InspectorPageAgent::create(m_inspectedFrames .get(), this, m_resourceContentLoader.get(), m_session->v8Session());
428
429 m_session->append(new InspectorHeapProfilerAgent(m_v8Session->heapProfilerAg ent()));
430
431 InspectorPageAgent* pageAgent = InspectorPageAgent::create(m_inspectedFrames .get(), this, m_resourceContentLoader.get(), m_v8Session.get());
432 m_pageAgent = pageAgent; 418 m_pageAgent = pageAgent;
433 m_session->append(pageAgent); 419 m_session->append(pageAgent);
434 420
435 m_tracingAgent->setLayerTreeId(m_layerTreeId); 421 m_tracingAgent->setLayerTreeId(m_layerTreeId);
436 m_resourceAgent->setHostId(hostId); 422 m_resourceAgent->setHostId(hostId);
437 423
438 if (m_includeViewAgents) { 424 if (m_includeViewAgents) {
439 // TODO(dgozman): we should actually pass the view instead of frame, but during 425 // TODO(dgozman): we should actually pass the view instead of frame, but during
440 // remote->local transition we cannot access mainFrameImpl() yet, so we have to store the 426 // remote->local transition we cannot access mainFrameImpl() yet, so we have to store the
441 // frame which will become the main frame later. 427 // frame which will become the main frame later.
442 m_session->append(InspectorRenderingAgent::create(m_webLocalFrameImpl, m _overlay.get())); 428 m_session->append(InspectorRenderingAgent::create(m_webLocalFrameImpl, m _overlay.get()));
443 m_session->append(InspectorEmulationAgent::create(m_webLocalFrameImpl, t his)); 429 m_session->append(InspectorEmulationAgent::create(m_webLocalFrameImpl, t his));
444 // TODO(dgozman): migrate each of the following agents to frame once mod ule is ready. 430 // TODO(dgozman): migrate each of the following agents to frame once mod ule is ready.
445 Page* page = m_webLocalFrameImpl->viewImpl()->page(); 431 Page* page = m_webLocalFrameImpl->viewImpl()->page();
446 m_session->append(InspectorDatabaseAgent::create(page)); 432 m_session->append(InspectorDatabaseAgent::create(page));
447 m_session->append(DeviceOrientationInspectorAgent::create(page)); 433 m_session->append(DeviceOrientationInspectorAgent::create(page));
448 m_session->append(new InspectorAccessibilityAgent(page, m_domAgent)); 434 m_session->append(new InspectorAccessibilityAgent(page, m_domAgent));
449 m_session->append(InspectorDOMStorageAgent::create(page)); 435 m_session->append(InspectorDOMStorageAgent::create(page));
450 m_session->append(InspectorCacheStorageAgent::create()); 436 m_session->append(InspectorCacheStorageAgent::create());
451 } 437 }
452 438
453 if (m_overlay) 439 if (m_overlay)
454 m_overlay->init(cssAgent, debuggerAgent, m_domAgent); 440 m_overlay->init(cssAgent, m_session->v8Session(), m_domAgent);
455 441
456 Platform::current()->currentThread()->addTaskObserver(this); 442 Platform::current()->currentThread()->addTaskObserver(this);
457 } 443 }
458 444
459 void WebDevToolsAgentImpl::destroySession() 445 void WebDevToolsAgentImpl::destroySession()
460 { 446 {
461 if (m_overlay) 447 if (m_overlay)
462 m_overlay->clear(); 448 m_overlay->clear();
463 449
464 m_tracingAgent.clear(); 450 m_tracingAgent.clear();
465 m_layerTreeAgent.clear(); 451 m_layerTreeAgent.clear();
466 m_resourceAgent.clear(); 452 m_resourceAgent.clear();
467 m_pageAgent.clear(); 453 m_pageAgent.clear();
468 m_domAgent.clear(); 454 m_domAgent.clear();
469 455
470 m_session->detach(); 456 m_session->dispose();
471 m_v8Session.clear();
472 m_session.clear(); 457 m_session.clear();
473 458
474 Platform::current()->currentThread()->removeTaskObserver(this); 459 Platform::current()->currentThread()->removeTaskObserver(this);
475 } 460 }
476 461
477 void WebDevToolsAgentImpl::attach(const WebString& hostId, int sessionId) 462 void WebDevToolsAgentImpl::attach(const WebString& hostId, int sessionId)
478 { 463 {
479 if (attached()) 464 if (attached())
480 return; 465 return;
481 initializeSession(sessionId, hostId); 466 initializeSession(sessionId, hostId, nullptr);
482 m_session->attach(m_v8Session.get(), nullptr);
483 } 467 }
484 468
485 void WebDevToolsAgentImpl::reattach(const WebString& hostId, int sessionId, cons t WebString& savedState) 469 void WebDevToolsAgentImpl::reattach(const WebString& hostId, int sessionId, cons t WebString& savedState)
486 { 470 {
487 if (attached()) 471 if (attached())
488 return; 472 return;
489 initializeSession(sessionId, hostId);
490 String state = savedState; 473 String state = savedState;
491 m_session->attach(m_v8Session.get(), &state); 474 initializeSession(sessionId, hostId, &state);
475 m_session->restore();
492 } 476 }
493 477
494 void WebDevToolsAgentImpl::detach() 478 void WebDevToolsAgentImpl::detach()
495 { 479 {
496 if (!attached()) 480 if (!attached())
497 return; 481 return;
498 destroySession(); 482 destroySession();
499 } 483 }
500 484
501 void WebDevToolsAgentImpl::continueProgram() 485 void WebDevToolsAgentImpl::continueProgram()
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
550 m_client->setCPUThrottlingRate(rate); 534 m_client->setCPUThrottlingRate(rate);
551 } 535 }
552 536
553 void WebDevToolsAgentImpl::dispatchOnInspectorBackend(int sessionId, int callId, const WebString& method, const WebString& message) 537 void WebDevToolsAgentImpl::dispatchOnInspectorBackend(int sessionId, int callId, const WebString& method, const WebString& message)
554 { 538 {
555 if (!attached()) 539 if (!attached())
556 return; 540 return;
557 if (WebDevToolsAgent::shouldInterruptForMethod(method)) 541 if (WebDevToolsAgent::shouldInterruptForMethod(method))
558 MainThreadDebugger::instance()->taskRunner()->runAllTasksDontWait(); 542 MainThreadDebugger::instance()->taskRunner()->runAllTasksDontWait();
559 else 543 else
560 dispatchMessageFromFrontend(sessionId, message); 544 dispatchMessageFromFrontend(sessionId, method, message);
561 } 545 }
562 546
563 void WebDevToolsAgentImpl::dispatchMessageFromFrontend(int sessionId, const Stri ng& message) 547 void WebDevToolsAgentImpl::dispatchMessageFromFrontend(int sessionId, const Stri ng& method, const String& message)
564 { 548 {
565 if (!attached() || sessionId != m_session->sessionId()) 549 if (!attached() || sessionId != m_session->sessionId())
566 return; 550 return;
567 InspectorTaskRunner::IgnoreInterruptsScope scope(MainThreadDebugger::instanc e()->taskRunner()); 551 InspectorTaskRunner::IgnoreInterruptsScope scope(MainThreadDebugger::instanc e()->taskRunner());
568 m_session->dispatchProtocolMessage(message); 552 m_session->dispatchProtocolMessage(method, message);
569 } 553 }
570 554
571 void WebDevToolsAgentImpl::inspectElementAt(const WebPoint& pointInRootFrame) 555 void WebDevToolsAgentImpl::inspectElementAt(const WebPoint& pointInRootFrame)
572 { 556 {
573 if (!m_domAgent) 557 if (!m_domAgent)
574 return; 558 return;
575 HitTestRequest::HitTestRequestType hitType = HitTestRequest::Move | HitTestR equest::ReadOnly | HitTestRequest::AllowChildFrameContent; 559 HitTestRequest::HitTestRequestType hitType = HitTestRequest::Move | HitTestR equest::ReadOnly | HitTestRequest::AllowChildFrameContent;
576 HitTestRequest request(hitType); 560 HitTestRequest request(hitType);
577 WebMouseEvent dummyEvent; 561 WebMouseEvent dummyEvent;
578 dummyEvent.type = WebInputEvent::MouseDown; 562 dummyEvent.type = WebInputEvent::MouseDown;
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
640 } 624 }
641 625
642 WebString WebDevToolsAgentImpl::evaluateInWebInspectorOverlay(const WebString& s cript) 626 WebString WebDevToolsAgentImpl::evaluateInWebInspectorOverlay(const WebString& s cript)
643 { 627 {
644 if (!m_overlay) 628 if (!m_overlay)
645 return WebString(); 629 return WebString();
646 630
647 return m_overlay->evaluateInOverlayForTest(script); 631 return m_overlay->evaluateInOverlayForTest(script);
648 } 632 }
649 633
650 void WebDevToolsAgentImpl::flushPendingProtocolNotifications() 634 void WebDevToolsAgentImpl::flushProtocolNotifications()
651 { 635 {
652 if (m_session) 636 if (m_session)
653 m_session->flushPendingProtocolNotifications(); 637 m_session->flushProtocolNotifications();
654 } 638 }
655 639
656 void WebDevToolsAgentImpl::willProcessTask() 640 void WebDevToolsAgentImpl::willProcessTask()
657 { 641 {
658 if (!attached()) 642 if (!attached())
659 return; 643 return;
660 ThreadDebugger::idleFinished(V8PerIsolateData::mainThreadIsolate()); 644 ThreadDebugger::idleFinished(V8PerIsolateData::mainThreadIsolate());
661 } 645 }
662 646
663 void WebDevToolsAgentImpl::didProcessTask() 647 void WebDevToolsAgentImpl::didProcessTask()
664 { 648 {
665 if (!attached()) 649 if (!attached())
666 return; 650 return;
667 ThreadDebugger::idleStarted(V8PerIsolateData::mainThreadIsolate()); 651 ThreadDebugger::idleStarted(V8PerIsolateData::mainThreadIsolate());
668 flushPendingProtocolNotifications(); 652 flushProtocolNotifications();
669 } 653 }
670 654
671 void WebDevToolsAgentImpl::runDebuggerTask(int sessionId, PassOwnPtr<WebDevTools Agent::MessageDescriptor> descriptor) 655 void WebDevToolsAgentImpl::runDebuggerTask(int sessionId, PassOwnPtr<WebDevTools Agent::MessageDescriptor> descriptor)
672 { 656 {
673 WebDevToolsAgent* webagent = descriptor->agent(); 657 WebDevToolsAgent* webagent = descriptor->agent();
674 if (!webagent) 658 if (!webagent)
675 return; 659 return;
676 660
677 WebDevToolsAgentImpl* agentImpl = static_cast<WebDevToolsAgentImpl*>(webagen t); 661 WebDevToolsAgentImpl* agentImpl = static_cast<WebDevToolsAgentImpl*>(webagen t);
678 if (agentImpl->attached()) 662 if (agentImpl->attached())
679 agentImpl->dispatchMessageFromFrontend(sessionId, descriptor->message()) ; 663 agentImpl->dispatchMessageFromFrontend(sessionId, descriptor->method(), descriptor->message());
680 } 664 }
681 665
682 void WebDevToolsAgent::interruptAndDispatch(int sessionId, MessageDescriptor* ra wDescriptor) 666 void WebDevToolsAgent::interruptAndDispatch(int sessionId, MessageDescriptor* ra wDescriptor)
683 { 667 {
684 // rawDescriptor can't be a PassOwnPtr because interruptAndDispatch is a Web Kit API function. 668 // rawDescriptor can't be a PassOwnPtr because interruptAndDispatch is a Web Kit API function.
685 MainThreadDebugger::interruptMainThreadAndRun(threadSafeBind(WebDevToolsAgen tImpl::runDebuggerTask, sessionId, passed(adoptPtr(rawDescriptor)))); 669 MainThreadDebugger::interruptMainThreadAndRun(threadSafeBind(WebDevToolsAgen tImpl::runDebuggerTask, sessionId, passed(adoptPtr(rawDescriptor))));
686 } 670 }
687 671
688 bool WebDevToolsAgent::shouldInterruptForMethod(const WebString& method) 672 bool WebDevToolsAgent::shouldInterruptForMethod(const WebString& method)
689 { 673 {
690 return method == "Debugger.pause" 674 return method == "Debugger.pause"
691 || method == "Debugger.setBreakpoint" 675 || method == "Debugger.setBreakpoint"
692 || method == "Debugger.setBreakpointByUrl" 676 || method == "Debugger.setBreakpointByUrl"
693 || method == "Debugger.removeBreakpoint" 677 || method == "Debugger.removeBreakpoint"
694 || method == "Debugger.setBreakpointsActive"; 678 || method == "Debugger.setBreakpointsActive";
695 } 679 }
696 680
697 } // namespace blink 681 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698