| 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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 if (s_instance && s_instance->m_running) | 105 if (s_instance && s_instance->m_running) |
| 106 PageScriptDebugServer::shared().continueProgram(); | 106 PageScriptDebugServer::shared().continueProgram(); |
| 107 } | 107 } |
| 108 | 108 |
| 109 private: | 109 private: |
| 110 ClientMessageLoopAdapter(PassOwnPtr<WebDevToolsAgentClient::WebKitClientMess
ageLoop> messageLoop) | 110 ClientMessageLoopAdapter(PassOwnPtr<WebDevToolsAgentClient::WebKitClientMess
ageLoop> messageLoop) |
| 111 : m_running(false) | 111 : m_running(false) |
| 112 , m_messageLoop(messageLoop) { } | 112 , m_messageLoop(messageLoop) { } |
| 113 | 113 |
| 114 | 114 |
| 115 virtual void run(Page* page) | 115 virtual void run(LocalFrame* frame) |
| 116 { | 116 { |
| 117 if (m_running) | 117 if (m_running) |
| 118 return; | 118 return; |
| 119 m_running = true; | 119 m_running = true; |
| 120 | 120 |
| 121 // 0. Flush pending frontend messages. | 121 // 0. Flush pending frontend messages. |
| 122 WebViewImpl* viewImpl = WebViewImpl::fromPage(page); | 122 WebViewImpl* viewImpl = WebViewImpl::fromPage(frame->page()); |
| 123 WebDevToolsAgentImpl* agent = static_cast<WebDevToolsAgentImpl*>(viewImp
l->devToolsAgent()); | 123 WebDevToolsAgentImpl* agent = static_cast<WebDevToolsAgentImpl*>(viewImp
l->devToolsAgent()); |
| 124 agent->flushPendingProtocolNotifications(); | 124 agent->flushPendingProtocolNotifications(); |
| 125 | 125 |
| 126 Vector<WebViewImpl*> views; | 126 Vector<WebViewImpl*> views; |
| 127 | 127 |
| 128 // 1. Disable input events. | 128 // 1. Disable input events. |
| 129 const HashSet<Page*>& pages = Page::ordinaryPages(); | 129 const HashSet<Page*>& pages = Page::ordinaryPages(); |
| 130 HashSet<Page*>::const_iterator end = pages.end(); | 130 HashSet<Page*>::const_iterator end = pages.end(); |
| 131 for (HashSet<Page*>::const_iterator it = pages.begin(); it != end; ++it
) { | 131 for (HashSet<Page*>::const_iterator it = pages.begin(); it != end; ++it
) { |
| 132 WebViewImpl* view = WebViewImpl::fromPage(*it); | 132 WebViewImpl* view = WebViewImpl::fromPage(*it); |
| (...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 609 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke
ndDispatcher::kDebugger_removeBreakpointCmd) | 609 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke
ndDispatcher::kDebugger_removeBreakpointCmd) |
| 610 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke
ndDispatcher::kDebugger_setBreakpointsActiveCmd); | 610 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke
ndDispatcher::kDebugger_setBreakpointsActiveCmd); |
| 611 } | 611 } |
| 612 | 612 |
| 613 void WebDevToolsAgent::processPendingMessages() | 613 void WebDevToolsAgent::processPendingMessages() |
| 614 { | 614 { |
| 615 PageScriptDebugServer::shared().runPendingTasks(); | 615 PageScriptDebugServer::shared().runPendingTasks(); |
| 616 } | 616 } |
| 617 | 617 |
| 618 } // namespace blink | 618 } // namespace blink |
| OLD | NEW |