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

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

Issue 2569273002: Add constructors to WebInputEvents and setters so we can work at cleaning up these public structs. (Closed)
Patch Set: Rebase Created 3 years, 11 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 516 matching lines...) Expand 10 before | Expand all | Expand 10 after
527 } 527 }
528 528
529 void WebDevToolsAgentImpl::inspectElementAt(int sessionId, 529 void WebDevToolsAgentImpl::inspectElementAt(int sessionId,
530 const WebPoint& pointInRootFrame) { 530 const WebPoint& pointInRootFrame) {
531 if (!m_domAgent || !m_session || m_session->sessionId() != sessionId) 531 if (!m_domAgent || !m_session || m_session->sessionId() != sessionId)
532 return; 532 return;
533 HitTestRequest::HitTestRequestType hitType = 533 HitTestRequest::HitTestRequestType hitType =
534 HitTestRequest::Move | HitTestRequest::ReadOnly | 534 HitTestRequest::Move | HitTestRequest::ReadOnly |
535 HitTestRequest::AllowChildFrameContent; 535 HitTestRequest::AllowChildFrameContent;
536 HitTestRequest request(hitType); 536 HitTestRequest request(hitType);
537 WebMouseEvent dummyEvent; 537 WebMouseEvent dummyEvent(WebInputEvent::MouseDown, WebInputEvent::NoModifiers,
538 dummyEvent.type = WebInputEvent::MouseDown; 538 WTF::monotonicallyIncreasingTimeMS());
539 dummyEvent.x = pointInRootFrame.x; 539 dummyEvent.x = pointInRootFrame.x;
540 dummyEvent.y = pointInRootFrame.y; 540 dummyEvent.y = pointInRootFrame.y;
541 IntPoint transformedPoint = 541 IntPoint transformedPoint =
542 PlatformMouseEventBuilder(m_webLocalFrameImpl->frameView(), dummyEvent) 542 PlatformMouseEventBuilder(m_webLocalFrameImpl->frameView(), dummyEvent)
543 .position(); 543 .position();
544 HitTestResult result( 544 HitTestResult result(
545 request, 545 request,
546 m_webLocalFrameImpl->frameView()->rootFrameToContents(transformedPoint)); 546 m_webLocalFrameImpl->frameView()->rootFrameToContents(transformedPoint));
547 m_webLocalFrameImpl->frame()->contentLayoutItem().hitTest(result); 547 m_webLocalFrameImpl->frame()->contentLayoutItem().hitTest(result);
548 Node* node = result.innerNode(); 548 Node* node = result.innerNode();
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
638 } 638 }
639 639
640 bool WebDevToolsAgent::shouldInterruptForMethod(const WebString& method) { 640 bool WebDevToolsAgent::shouldInterruptForMethod(const WebString& method) {
641 return method == "Debugger.pause" || method == "Debugger.setBreakpoint" || 641 return method == "Debugger.pause" || method == "Debugger.setBreakpoint" ||
642 method == "Debugger.setBreakpointByUrl" || 642 method == "Debugger.setBreakpointByUrl" ||
643 method == "Debugger.removeBreakpoint" || 643 method == "Debugger.removeBreakpoint" ||
644 method == "Debugger.setBreakpointsActive"; 644 method == "Debugger.setBreakpointsActive";
645 } 645 }
646 646
647 } // namespace blink 647 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698