| 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 #include "core/inspector/PageConsoleAgent.h" | 58 #include "core/inspector/PageConsoleAgent.h" |
| 59 #include "core/layout/api/LayoutViewItem.h" | 59 #include "core/layout/api/LayoutViewItem.h" |
| 60 #include "core/page/FocusController.h" | 60 #include "core/page/FocusController.h" |
| 61 #include "core/page/Page.h" | 61 #include "core/page/Page.h" |
| 62 #include "modules/accessibility/InspectorAccessibilityAgent.h" | 62 #include "modules/accessibility/InspectorAccessibilityAgent.h" |
| 63 #include "modules/cachestorage/InspectorCacheStorageAgent.h" | 63 #include "modules/cachestorage/InspectorCacheStorageAgent.h" |
| 64 #include "modules/device_orientation/DeviceOrientationInspectorAgent.h" | 64 #include "modules/device_orientation/DeviceOrientationInspectorAgent.h" |
| 65 #include "modules/indexeddb/InspectorIndexedDBAgent.h" | 65 #include "modules/indexeddb/InspectorIndexedDBAgent.h" |
| 66 #include "modules/storage/InspectorDOMStorageAgent.h" | 66 #include "modules/storage/InspectorDOMStorageAgent.h" |
| 67 #include "modules/webdatabase/InspectorDatabaseAgent.h" | 67 #include "modules/webdatabase/InspectorDatabaseAgent.h" |
| 68 #include "platform/CrossThreadFunctional.h" |
| 68 #include "platform/RuntimeEnabledFeatures.h" | 69 #include "platform/RuntimeEnabledFeatures.h" |
| 69 #include "platform/ThreadSafeFunctional.h" | |
| 70 #include "platform/TraceEvent.h" | 70 #include "platform/TraceEvent.h" |
| 71 #include "platform/graphics/GraphicsContext.h" | 71 #include "platform/graphics/GraphicsContext.h" |
| 72 #include "platform/graphics/paint/PaintController.h" | 72 #include "platform/graphics/paint/PaintController.h" |
| 73 #include "platform/inspector_protocol/Values.h" | 73 #include "platform/inspector_protocol/Values.h" |
| 74 #include "platform/v8_inspector/public/V8Debugger.h" | 74 #include "platform/v8_inspector/public/V8Debugger.h" |
| 75 #include "platform/v8_inspector/public/V8InspectorSession.h" | 75 #include "platform/v8_inspector/public/V8InspectorSession.h" |
| 76 #include "public/platform/Platform.h" | 76 #include "public/platform/Platform.h" |
| 77 #include "public/platform/WebLayerTreeView.h" | 77 #include "public/platform/WebLayerTreeView.h" |
| 78 #include "public/platform/WebRect.h" | 78 #include "public/platform/WebRect.h" |
| 79 #include "public/platform/WebString.h" | 79 #include "public/platform/WebString.h" |
| (...skipping 575 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 655 return; | 655 return; |
| 656 | 656 |
| 657 WebDevToolsAgentImpl* agentImpl = static_cast<WebDevToolsAgentImpl*>(webagen
t); | 657 WebDevToolsAgentImpl* agentImpl = static_cast<WebDevToolsAgentImpl*>(webagen
t); |
| 658 if (agentImpl->attached()) | 658 if (agentImpl->attached()) |
| 659 agentImpl->dispatchMessageFromFrontend(sessionId, descriptor->method(),
descriptor->message()); | 659 agentImpl->dispatchMessageFromFrontend(sessionId, descriptor->method(),
descriptor->message()); |
| 660 } | 660 } |
| 661 | 661 |
| 662 void WebDevToolsAgent::interruptAndDispatch(int sessionId, MessageDescriptor* ra
wDescriptor) | 662 void WebDevToolsAgent::interruptAndDispatch(int sessionId, MessageDescriptor* ra
wDescriptor) |
| 663 { | 663 { |
| 664 // rawDescriptor can't be a std::unique_ptr because interruptAndDispatch is
a WebKit API function. | 664 // rawDescriptor can't be a std::unique_ptr because interruptAndDispatch is
a WebKit API function. |
| 665 MainThreadDebugger::interruptMainThreadAndRun(threadSafeBind(WebDevToolsAgen
tImpl::runDebuggerTask, sessionId, passed(wrapUnique(rawDescriptor)))); | 665 MainThreadDebugger::interruptMainThreadAndRun(crossThreadBind(WebDevToolsAge
ntImpl::runDebuggerTask, sessionId, passed(wrapUnique(rawDescriptor)))); |
| 666 } | 666 } |
| 667 | 667 |
| 668 bool WebDevToolsAgent::shouldInterruptForMethod(const WebString& method) | 668 bool WebDevToolsAgent::shouldInterruptForMethod(const WebString& method) |
| 669 { | 669 { |
| 670 return method == "Debugger.pause" | 670 return method == "Debugger.pause" |
| 671 || method == "Debugger.setBreakpoint" | 671 || method == "Debugger.setBreakpoint" |
| 672 || method == "Debugger.setBreakpointByUrl" | 672 || method == "Debugger.setBreakpointByUrl" |
| 673 || method == "Debugger.removeBreakpoint" | 673 || method == "Debugger.removeBreakpoint" |
| 674 || method == "Debugger.setBreakpointsActive"; | 674 || method == "Debugger.setBreakpointsActive"; |
| 675 } | 675 } |
| 676 | 676 |
| 677 } // namespace blink | 677 } // namespace blink |
| OLD | NEW |