| 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 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 | 156 |
| 157 void run(LocalFrame* frame) override | 157 void run(LocalFrame* frame) override |
| 158 { | 158 { |
| 159 if (m_running) | 159 if (m_running) |
| 160 return; | 160 return; |
| 161 m_running = true; | 161 m_running = true; |
| 162 | 162 |
| 163 // 0. Flush pending frontend messages. | 163 // 0. Flush pending frontend messages. |
| 164 WebLocalFrameImpl* frameImpl = WebLocalFrameImpl::fromFrame(frame); | 164 WebLocalFrameImpl* frameImpl = WebLocalFrameImpl::fromFrame(frame); |
| 165 WebDevToolsAgentImpl* agent = frameImpl->devToolsAgentImpl(); | 165 WebDevToolsAgentImpl* agent = frameImpl->devToolsAgentImpl(); |
| 166 |
| 167 // FIXME(terry): Dart fix if the current iFrame doesn't have a dev tools |
| 168 // agent then use the main frame's agent. This allow's |
| 169 // debugging Dart code associated with an iFrame (that's |
| 170 // not the main frame). |
| 171 if (!agent) { |
| 172 LocalFrame* mainFrame = frameImpl->frame()->localFrameRoot(); |
| 173 frameImpl = WebLocalFrameImpl::fromFrame(mainFrame); |
| 174 agent = frameImpl->devToolsAgentImpl(); |
| 175 } |
| 176 |
| 166 agent->flushPendingProtocolNotifications(); | 177 agent->flushPendingProtocolNotifications(); |
| 167 | 178 |
| 168 Vector<WebViewImpl*> views; | 179 Vector<WebViewImpl*> views; |
| 169 Vector<WebFrameWidgetImpl*> widgets; | 180 Vector<WebFrameWidgetImpl*> widgets; |
| 170 | 181 |
| 171 // 1. Disable input events. | 182 // 1. Disable input events. |
| 172 const HashSet<WebViewImpl*>& viewImpls = WebViewImpl::allInstances(); | 183 const HashSet<WebViewImpl*>& viewImpls = WebViewImpl::allInstances(); |
| 173 HashSet<WebViewImpl*>::const_iterator viewImplsEnd = viewImpls.end(); | 184 HashSet<WebViewImpl*>::const_iterator viewImplsEnd = viewImpls.end(); |
| 174 for (HashSet<WebViewImpl*>::const_iterator it = viewImpls.begin(); it !
= viewImplsEnd; ++it) { | 185 for (HashSet<WebViewImpl*>::const_iterator it = viewImpls.begin(); it !
= viewImplsEnd; ++it) { |
| 175 WebViewImpl* view = *it; | 186 WebViewImpl* view = *it; |
| (...skipping 582 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 758 if (!InspectorBackendDispatcher::getCommandName(message, &commandName)) | 769 if (!InspectorBackendDispatcher::getCommandName(message, &commandName)) |
| 759 return false; | 770 return false; |
| 760 return commandName == InspectorBackendDispatcher::commandName(InspectorBacke
ndDispatcher::kDebugger_pauseCmd) | 771 return commandName == InspectorBackendDispatcher::commandName(InspectorBacke
ndDispatcher::kDebugger_pauseCmd) |
| 761 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke
ndDispatcher::kDebugger_setBreakpointCmd) | 772 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke
ndDispatcher::kDebugger_setBreakpointCmd) |
| 762 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke
ndDispatcher::kDebugger_setBreakpointByUrlCmd) | 773 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke
ndDispatcher::kDebugger_setBreakpointByUrlCmd) |
| 763 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke
ndDispatcher::kDebugger_removeBreakpointCmd) | 774 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke
ndDispatcher::kDebugger_removeBreakpointCmd) |
| 764 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke
ndDispatcher::kDebugger_setBreakpointsActiveCmd); | 775 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke
ndDispatcher::kDebugger_setBreakpointsActiveCmd); |
| 765 } | 776 } |
| 766 | 777 |
| 767 } // namespace blink | 778 } // namespace blink |
| OLD | NEW |