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 657 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
668 m_client->sendMessageToInspectorFrontend(m_frontendMessageQueue[i]->toJS
ONString()); | 668 m_client->sendMessageToInspectorFrontend(m_frontendMessageQueue[i]->toJS
ONString()); |
669 m_frontendMessageQueue.clear(); | 669 m_frontendMessageQueue.clear(); |
670 } | 670 } |
671 | 671 |
672 void WebDevToolsAgentImpl::willProcessTask() | 672 void WebDevToolsAgentImpl::willProcessTask() |
673 { | 673 { |
674 if (!m_attached) | 674 if (!m_attached) |
675 return; | 675 return; |
676 if (InspectorController* ic = inspectorController()) | 676 if (InspectorController* ic = inspectorController()) |
677 ic->willProcessTask(); | 677 ic->willProcessTask(); |
| 678 TRACE_EVENT_BEGIN0(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "Program"
); |
678 } | 679 } |
679 | 680 |
680 void WebDevToolsAgentImpl::didProcessTask() | 681 void WebDevToolsAgentImpl::didProcessTask() |
681 { | 682 { |
682 if (!m_attached) | 683 if (!m_attached) |
683 return; | 684 return; |
684 if (InspectorController* ic = inspectorController()) | 685 if (InspectorController* ic = inspectorController()) |
685 ic->didProcessTask(); | 686 ic->didProcessTask(); |
| 687 TRACE_EVENT_END0(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "Program"); |
686 flushPendingFrontendMessages(); | 688 flushPendingFrontendMessages(); |
687 } | 689 } |
688 | 690 |
689 void WebDevToolsAgent::interruptAndDispatch(MessageDescriptor* rawDescriptor) | 691 void WebDevToolsAgent::interruptAndDispatch(MessageDescriptor* rawDescriptor) |
690 { | 692 { |
691 // rawDescriptor can't be a PassOwnPtr because interruptAndDispatch is a Web
Kit API function. | 693 // rawDescriptor can't be a PassOwnPtr because interruptAndDispatch is a Web
Kit API function. |
692 OwnPtr<MessageDescriptor> descriptor = adoptPtr(rawDescriptor); | 694 OwnPtr<MessageDescriptor> descriptor = adoptPtr(rawDescriptor); |
693 OwnPtr<DebuggerTask> task = adoptPtr(new DebuggerTask(descriptor.release()))
; | 695 OwnPtr<DebuggerTask> task = adoptPtr(new DebuggerTask(descriptor.release()))
; |
694 PageScriptDebugServer::interruptAndRun(task.release()); | 696 PageScriptDebugServer::interruptAndRun(task.release()); |
695 } | 697 } |
696 | 698 |
697 bool WebDevToolsAgent::shouldInterruptForMessage(const WebString& message) | 699 bool WebDevToolsAgent::shouldInterruptForMessage(const WebString& message) |
698 { | 700 { |
699 String commandName; | 701 String commandName; |
700 if (!InspectorBackendDispatcher::getCommandName(message, &commandName)) | 702 if (!InspectorBackendDispatcher::getCommandName(message, &commandName)) |
701 return false; | 703 return false; |
702 return commandName == InspectorBackendDispatcher::commandName(InspectorBacke
ndDispatcher::kDebugger_pauseCmd) | 704 return commandName == InspectorBackendDispatcher::commandName(InspectorBacke
ndDispatcher::kDebugger_pauseCmd) |
703 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke
ndDispatcher::kDebugger_setBreakpointCmd) | 705 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke
ndDispatcher::kDebugger_setBreakpointCmd) |
704 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke
ndDispatcher::kDebugger_setBreakpointByUrlCmd) | 706 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke
ndDispatcher::kDebugger_setBreakpointByUrlCmd) |
705 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke
ndDispatcher::kDebugger_removeBreakpointCmd) | 707 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke
ndDispatcher::kDebugger_removeBreakpointCmd) |
706 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke
ndDispatcher::kDebugger_setBreakpointsActiveCmd); | 708 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke
ndDispatcher::kDebugger_setBreakpointsActiveCmd); |
707 } | 709 } |
708 | 710 |
709 void WebDevToolsAgent::processPendingMessages() | 711 void WebDevToolsAgent::processPendingMessages() |
710 { | 712 { |
711 PageScriptDebugServer::shared().runPendingTasks(); | 713 PageScriptDebugServer::shared().runPendingTasks(); |
712 } | 714 } |
713 | 715 |
714 } // namespace blink | 716 } // namespace blink |
OLD | NEW |