Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(86)

Side by Side Diff: Source/web/WebDevToolsAgentImpl.cpp

Issue 286263002: [DevTools] Notify embedder about pausing/resuming in debugger. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed comments Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/web/WebDevToolsAgentImpl.h ('k') | public/web/WebDevToolsAgentClient.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
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);
133 if (!view) 133 if (!view)
134 continue; 134 continue;
135 m_frozenViews.add(view); 135 m_frozenViews.add(view);
136 views.append(view); 136 views.append(view);
137 view->setIgnoreInputEvents(true); 137 view->setIgnoreInputEvents(true);
138 } 138 }
139 // Notify embedder about pausing.
140 agent->client()->willEnterDebugLoop();
139 141
140 // 2. Disable active objects 142 // 2. Disable active objects
141 WebView::willEnterModalLoop(); 143 WebView::willEnterModalLoop();
142 144
143 // 3. Process messages until quitNow is called. 145 // 3. Process messages until quitNow is called.
144 m_messageLoop->run(); 146 m_messageLoop->run();
145 147
146 // 4. Resume active objects 148 // 4. Resume active objects
147 WebView::didExitModalLoop(); 149 WebView::didExitModalLoop();
148 150
149 // 5. Resume input events. 151 // 5. Resume input events.
150 for (Vector<WebViewImpl*>::iterator it = views.begin(); it != views.end( ); ++it) { 152 for (Vector<WebViewImpl*>::iterator it = views.begin(); it != views.end( ); ++it) {
151 if (m_frozenViews.contains(*it)) { 153 if (m_frozenViews.contains(*it)) {
152 // The view was not closed during the dispatch. 154 // The view was not closed during the dispatch.
153 (*it)->setIgnoreInputEvents(false); 155 (*it)->setIgnoreInputEvents(false);
154 } 156 }
155 } 157 }
158 agent->client()->didExitDebugLoop();
156 159
157 // 6. All views have been resumed, clear the set. 160 // 6. All views have been resumed, clear the set.
158 m_frozenViews.clear(); 161 m_frozenViews.clear();
159 162
160 m_running = false; 163 m_running = false;
161 } 164 }
162 165
163 virtual void quitNow() 166 virtual void quitNow()
164 { 167 {
165 m_messageLoop->quitNow(); 168 m_messageLoop->quitNow();
(...skipping 552 matching lines...) Expand 10 before | Expand all | Expand 10 after
718 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke ndDispatcher::kDebugger_removeBreakpointCmd) 721 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke ndDispatcher::kDebugger_removeBreakpointCmd)
719 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke ndDispatcher::kDebugger_setBreakpointsActiveCmd); 722 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke ndDispatcher::kDebugger_setBreakpointsActiveCmd);
720 } 723 }
721 724
722 void WebDevToolsAgent::processPendingMessages() 725 void WebDevToolsAgent::processPendingMessages()
723 { 726 {
724 PageScriptDebugServer::shared().runPendingTasks(); 727 PageScriptDebugServer::shared().runPendingTasks();
725 } 728 }
726 729
727 } // namespace blink 730 } // namespace blink
OLDNEW
« no previous file with comments | « Source/web/WebDevToolsAgentImpl.h ('k') | public/web/WebDevToolsAgentClient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698