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

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

Issue 892693006: Revert of DevTools: use per-LocalFrame instrumenting agents instead of per-Page ones. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/storage/StorageArea.cpp ('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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
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(LocalFrame* frame) 115 virtual void run(Page* page)
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(frame->page()); 122 WebViewImpl* viewImpl = WebViewImpl::fromPage(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
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
OLDNEW
« no previous file with comments | « Source/core/storage/StorageArea.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698