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

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

Issue 2209603003: [DevTools] Remove V8InspectorSessionClient. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 | « third_party/WebKit/Source/web/WebDevToolsAgentImpl.h ('k') | no next file » | 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 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 { 261 {
262 if (m_runningForCreateWindow) { 262 if (m_runningForCreateWindow) {
263 m_runningForCreateWindow = false; 263 m_runningForCreateWindow = false;
264 if (!m_runningForDebugBreak) 264 if (!m_runningForDebugBreak)
265 m_messageLoop->quitNow(); 265 m_messageLoop->quitNow();
266 return true; 266 return true;
267 } 267 }
268 return false; 268 return false;
269 } 269 }
270 270
271 void resumeStartup(LocalFrame* frame) override
272 {
273 // If we've paused for createWindow, handle it ourselves.
274 if (quitForCreateWindow())
275 return;
276 // Otherwise, pass to the client (embedded workers do it differently).
277 WebDevToolsAgentImpl* agent = WebLocalFrameImpl::fromFrame(frame)->devTo olsAgentImpl();
278 if (agent && agent->client())
279 agent->client()->resumeStartup();
280 }
281
271 bool m_runningForDebugBreak; 282 bool m_runningForDebugBreak;
272 bool m_runningForCreateWindow; 283 bool m_runningForCreateWindow;
273 std::unique_ptr<WebDevToolsAgentClient::WebKitClientMessageLoop> m_messageLo op; 284 std::unique_ptr<WebDevToolsAgentClient::WebKitClientMessageLoop> m_messageLo op;
274 typedef HashSet<WebViewImpl*> FrozenViewsSet; 285 typedef HashSet<WebViewImpl*> FrozenViewsSet;
275 FrozenViewsSet m_frozenViews; 286 FrozenViewsSet m_frozenViews;
276 WebFrameWidgetsSet m_frozenWidgets; 287 WebFrameWidgetsSet m_frozenWidgets;
277 static ClientMessageLoopAdapter* s_instance; 288 static ClientMessageLoopAdapter* s_instance;
278 }; 289 };
279 290
280 ClientMessageLoopAdapter* ClientMessageLoopAdapter::s_instance = nullptr; 291 ClientMessageLoopAdapter* ClientMessageLoopAdapter::s_instance = nullptr;
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
577 ClientMessageLoopAdapter::resumeForCreateWindow(); 588 ClientMessageLoopAdapter::resumeForCreateWindow();
578 } 589 }
579 590
580 void WebDevToolsAgentImpl::sendProtocolMessage(int sessionId, int callId, const String& response, const String& state) 591 void WebDevToolsAgentImpl::sendProtocolMessage(int sessionId, int callId, const String& response, const String& state)
581 { 592 {
582 ASSERT(attached()); 593 ASSERT(attached());
583 if (m_client) 594 if (m_client)
584 m_client->sendProtocolMessage(sessionId, callId, response, state); 595 m_client->sendProtocolMessage(sessionId, callId, response, state);
585 } 596 }
586 597
587 void WebDevToolsAgentImpl::resumeStartup()
588 {
589 // If we've paused for createWindow, handle it ourselves.
590 if (ClientMessageLoopAdapter::resumeForCreateWindow())
591 return;
592 // Otherwise, pass to the client (embedded workers do it differently).
593 if (m_client)
594 m_client->resumeStartup();
595 }
596
597 void WebDevToolsAgentImpl::pageLayoutInvalidated(bool resized) 598 void WebDevToolsAgentImpl::pageLayoutInvalidated(bool resized)
598 { 599 {
599 if (m_overlay) 600 if (m_overlay)
600 m_overlay->pageLayoutInvalidated(resized); 601 m_overlay->pageLayoutInvalidated(resized);
601 } 602 }
602 603
603 void WebDevToolsAgentImpl::configureOverlay(bool suspended, const String& messag e) 604 void WebDevToolsAgentImpl::configureOverlay(bool suspended, const String& messag e)
604 { 605 {
605 if (!m_overlay) 606 if (!m_overlay)
606 return; 607 return;
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
668 bool WebDevToolsAgent::shouldInterruptForMethod(const WebString& method) 669 bool WebDevToolsAgent::shouldInterruptForMethod(const WebString& method)
669 { 670 {
670 return method == "Debugger.pause" 671 return method == "Debugger.pause"
671 || method == "Debugger.setBreakpoint" 672 || method == "Debugger.setBreakpoint"
672 || method == "Debugger.setBreakpointByUrl" 673 || method == "Debugger.setBreakpointByUrl"
673 || method == "Debugger.removeBreakpoint" 674 || method == "Debugger.removeBreakpoint"
674 || method == "Debugger.setBreakpointsActive"; 675 || method == "Debugger.setBreakpointsActive";
675 } 676 }
676 677
677 } // namespace blink 678 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebDevToolsAgentImpl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698