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 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
184 public: | 184 public: |
185 DebuggerTask(PassOwnPtr<WebDevToolsAgent::MessageDescriptor> descriptor) | 185 DebuggerTask(PassOwnPtr<WebDevToolsAgent::MessageDescriptor> descriptor) |
186 : m_descriptor(descriptor) | 186 : m_descriptor(descriptor) |
187 { | 187 { |
188 } | 188 } |
189 | 189 |
190 virtual ~DebuggerTask() { } | 190 virtual ~DebuggerTask() { } |
191 virtual void run() | 191 virtual void run() |
192 { | 192 { |
193 if (WebDevToolsAgent* webagent = m_descriptor->agent()) | 193 if (WebDevToolsAgent* webagent = m_descriptor->agent()) |
194 webagent->dispatchOnInspectorBackend(m_descriptor->message()); | 194 webagent->dispatchOnInspectorBackend(m_descriptor->message(), true); |
195 } | 195 } |
196 | 196 |
197 private: | 197 private: |
198 OwnPtr<WebDevToolsAgent::MessageDescriptor> m_descriptor; | 198 OwnPtr<WebDevToolsAgent::MessageDescriptor> m_descriptor; |
199 }; | 199 }; |
200 | 200 |
201 WebDevToolsAgentImpl::WebDevToolsAgentImpl( | 201 WebDevToolsAgentImpl::WebDevToolsAgentImpl( |
202 WebViewImpl* webViewImpl, | 202 WebViewImpl* webViewImpl, |
203 WebDevToolsAgentClient* client) | 203 WebDevToolsAgentClient* client) |
204 : m_layerTreeId(0) | 204 : m_layerTreeId(0) |
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
433 { | 433 { |
434 if (!m_webViewImpl->page()->focusController().isFocused()) | 434 if (!m_webViewImpl->page()->focusController().isFocused()) |
435 m_webViewImpl->setFocus(true); | 435 m_webViewImpl->setFocus(true); |
436 | 436 |
437 m_generatingEvent = true; | 437 m_generatingEvent = true; |
438 WebMouseEvent webEvent = WebMouseEventBuilder(m_webViewImpl->mainFrameImpl() ->frameView(), event); | 438 WebMouseEvent webEvent = WebMouseEventBuilder(m_webViewImpl->mainFrameImpl() ->frameView(), event); |
439 m_webViewImpl->handleInputEvent(webEvent); | 439 m_webViewImpl->handleInputEvent(webEvent); |
440 m_generatingEvent = false; | 440 m_generatingEvent = false; |
441 } | 441 } |
442 | 442 |
443 void WebDevToolsAgentImpl::dispatchOnInspectorBackend(const WebString& message) | 443 void WebDevToolsAgentImpl::dispatchOnInspectorBackend(const WebString& message, bool ignoreInterrupt) |
444 { | 444 { |
445 if (!m_attached) | 445 if (!m_attached) |
446 return; | 446 return; |
447 inspectorController()->dispatchMessageFromFrontend(message); | 447 if (ignoreInterrupt || !WebDevToolsAgent::shouldInterruptForMessage(message) ) |
yurys
2015/02/16 16:33:07
You don't need this parameter as before the chromi
yurys
2015/02/16 16:56:15
To clarify this after offline discussion. We can m
sergeyv
2015/02/16 17:30:13
Done.
| |
448 inspectorController()->dispatchMessageFromFrontend(message); | |
449 else | |
450 PageScriptDebugServer::shared().runPendingTasks(); | |
448 } | 451 } |
449 | 452 |
450 void WebDevToolsAgentImpl::inspectElementAt(const WebPoint& point) | 453 void WebDevToolsAgentImpl::inspectElementAt(const WebPoint& point) |
451 { | 454 { |
452 m_webViewImpl->inspectElementAt(point); | 455 m_webViewImpl->inspectElementAt(point); |
453 } | 456 } |
454 | 457 |
455 InspectorController* WebDevToolsAgentImpl::inspectorController() | 458 InspectorController* WebDevToolsAgentImpl::inspectorController() |
456 { | 459 { |
457 if (Page* page = m_webViewImpl->page()) | 460 if (Page* page = m_webViewImpl->page()) |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
576 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke ndDispatcher::kDebugger_removeBreakpointCmd) | 579 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke ndDispatcher::kDebugger_removeBreakpointCmd) |
577 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke ndDispatcher::kDebugger_setBreakpointsActiveCmd); | 580 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke ndDispatcher::kDebugger_setBreakpointsActiveCmd); |
578 } | 581 } |
579 | 582 |
580 void WebDevToolsAgent::processPendingMessages() | 583 void WebDevToolsAgent::processPendingMessages() |
581 { | 584 { |
582 PageScriptDebugServer::shared().runPendingTasks(); | 585 PageScriptDebugServer::shared().runPendingTasks(); |
583 } | 586 } |
584 | 587 |
585 } // namespace blink | 588 } // namespace blink |
OLD | NEW |