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 531 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
542 } | 542 } |
543 | 543 |
544 void WebDevToolsAgentImpl::dispatchMessageFromFrontend(int sessionId, const Stri
ng& method, const String& message) | 544 void WebDevToolsAgentImpl::dispatchMessageFromFrontend(int sessionId, const Stri
ng& method, const String& message) |
545 { | 545 { |
546 if (!attached() || sessionId != m_session->sessionId()) | 546 if (!attached() || sessionId != m_session->sessionId()) |
547 return; | 547 return; |
548 InspectorTaskRunner::IgnoreInterruptsScope scope(MainThreadDebugger::instanc
e()->taskRunner()); | 548 InspectorTaskRunner::IgnoreInterruptsScope scope(MainThreadDebugger::instanc
e()->taskRunner()); |
549 m_session->dispatchProtocolMessage(method, message); | 549 m_session->dispatchProtocolMessage(method, message); |
550 } | 550 } |
551 | 551 |
552 void WebDevToolsAgentImpl::inspectElementAt(const WebPoint& pointInRootFrame) | 552 void WebDevToolsAgentImpl::inspectElementAt(int sessionId, const WebPoint& point
InRootFrame) |
553 { | 553 { |
554 if (!m_domAgent) | 554 if (!m_domAgent || !m_session || m_session->sessionId() != sessionId) |
555 return; | 555 return; |
556 HitTestRequest::HitTestRequestType hitType = HitTestRequest::Move | HitTestR
equest::ReadOnly | HitTestRequest::AllowChildFrameContent; | 556 HitTestRequest::HitTestRequestType hitType = HitTestRequest::Move | HitTestR
equest::ReadOnly | HitTestRequest::AllowChildFrameContent; |
557 HitTestRequest request(hitType); | 557 HitTestRequest request(hitType); |
558 WebMouseEvent dummyEvent; | 558 WebMouseEvent dummyEvent; |
559 dummyEvent.type = WebInputEvent::MouseDown; | 559 dummyEvent.type = WebInputEvent::MouseDown; |
560 dummyEvent.x = pointInRootFrame.x; | 560 dummyEvent.x = pointInRootFrame.x; |
561 dummyEvent.y = pointInRootFrame.y; | 561 dummyEvent.y = pointInRootFrame.y; |
562 IntPoint transformedPoint = PlatformMouseEventBuilder(m_webLocalFrameImpl->f
rameView(), dummyEvent).position(); | 562 IntPoint transformedPoint = PlatformMouseEventBuilder(m_webLocalFrameImpl->f
rameView(), dummyEvent).position(); |
563 HitTestResult result(request, m_webLocalFrameImpl->frameView()->rootFrameToC
ontents(transformedPoint)); | 563 HitTestResult result(request, m_webLocalFrameImpl->frameView()->rootFrameToC
ontents(transformedPoint)); |
564 m_webLocalFrameImpl->frame()->contentLayoutItem().hitTest(result); | 564 m_webLocalFrameImpl->frame()->contentLayoutItem().hitTest(result); |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
677 bool WebDevToolsAgent::shouldInterruptForMethod(const WebString& method) | 677 bool WebDevToolsAgent::shouldInterruptForMethod(const WebString& method) |
678 { | 678 { |
679 return method == "Debugger.pause" | 679 return method == "Debugger.pause" |
680 || method == "Debugger.setBreakpoint" | 680 || method == "Debugger.setBreakpoint" |
681 || method == "Debugger.setBreakpointByUrl" | 681 || method == "Debugger.setBreakpointByUrl" |
682 || method == "Debugger.removeBreakpoint" | 682 || method == "Debugger.removeBreakpoint" |
683 || method == "Debugger.setBreakpointsActive"; | 683 || method == "Debugger.setBreakpointsActive"; |
684 } | 684 } |
685 | 685 |
686 } // namespace blink | 686 } // namespace blink |
OLD | NEW |