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

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

Issue 1004113004: [DevTools] Do not instrument with InspectorInspectorAgent. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 9 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
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 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 { 275 {
276 ASSERT(isMainThread()); 276 ASSERT(isMainThread());
277 277
278 long processId = WTF::getCurrentProcessID(); 278 long processId = WTF::getCurrentProcessID();
279 ASSERT(processId > 0); 279 ASSERT(processId > 0);
280 IdentifiersFactory::setProcessId(processId); 280 IdentifiersFactory::setProcessId(processId);
281 Page* page = m_webViewImpl->page(); 281 Page* page = m_webViewImpl->page();
282 282
283 InjectedScriptManager* injectedScriptManager = m_injectedScriptManager.get() ; 283 InjectedScriptManager* injectedScriptManager = m_injectedScriptManager.get() ;
284 284
285 m_agents.append(InspectorInspectorAgent::create(injectedScriptManager)); 285 OwnPtrWillBeRawPtr<InspectorInspectorAgent> inspectorAgentPtr(InspectorInspe ctorAgent::create(injectedScriptManager));
286 m_inspectorAgent = inspectorAgentPtr.get();
287 m_agents.append(inspectorAgentPtr.release());
286 288
287 OwnPtrWillBeRawPtr<InspectorPageAgent> pageAgentPtr(InspectorPageAgent::crea te(page, injectedScriptManager, m_overlay)); 289 OwnPtrWillBeRawPtr<InspectorPageAgent> pageAgentPtr(InspectorPageAgent::crea te(page, injectedScriptManager, m_overlay));
288 m_pageAgent = pageAgentPtr.get(); 290 m_pageAgent = pageAgentPtr.get();
289 m_agents.append(pageAgentPtr.release()); 291 m_agents.append(pageAgentPtr.release());
290 292
291 OwnPtrWillBeRawPtr<InspectorDOMAgent> domAgentPtr(InspectorDOMAgent::create( m_pageAgent, injectedScriptManager, m_overlay)); 293 OwnPtrWillBeRawPtr<InspectorDOMAgent> domAgentPtr(InspectorDOMAgent::create( m_pageAgent, injectedScriptManager, m_overlay));
292 m_domAgent = domAgentPtr.get(); 294 m_domAgent = domAgentPtr.get();
293 m_agents.append(domAgentPtr.release()); 295 m_agents.append(domAgentPtr.release());
294 296
295 OwnPtrWillBeRawPtr<InspectorLayerTreeAgent> layerTreeAgentPtr(InspectorLayer TreeAgent::create(m_pageAgent)); 297 OwnPtrWillBeRawPtr<InspectorLayerTreeAgent> layerTreeAgentPtr(InspectorLayer TreeAgent::create(m_pageAgent));
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
650 m_client->resumeStartup(); 652 m_client->resumeStartup();
651 } 653 }
652 654
653 void WebDevToolsAgentImpl::setLayerTreeId(int layerTreeId) 655 void WebDevToolsAgentImpl::setLayerTreeId(int layerTreeId)
654 { 656 {
655 m_tracingAgent->setLayerTreeId(layerTreeId); 657 m_tracingAgent->setLayerTreeId(layerTreeId);
656 } 658 }
657 659
658 void WebDevToolsAgentImpl::evaluateInWebInspector(long callId, const WebString& script) 660 void WebDevToolsAgentImpl::evaluateInWebInspector(long callId, const WebString& script)
659 { 661 {
660 if (InspectorInspectorAgent* inspectorAgent = m_instrumentingAgents->inspect orInspectorAgent()) 662 m_inspectorAgent->evaluateForTestInFrontend(callId, script);
661 inspectorAgent->evaluateForTestInFrontend(callId, script);
662 } 663 }
663 664
664 void WebDevToolsAgentImpl::flushPendingProtocolNotifications() 665 void WebDevToolsAgentImpl::flushPendingProtocolNotifications()
665 { 666 {
666 if (!m_attached) 667 if (!m_attached)
667 return; 668 return;
668 669
669 m_agents.flushPendingProtocolNotifications(); 670 m_agents.flushPendingProtocolNotifications();
670 for (size_t i = 0; i < m_notificationQueue.size(); ++i) 671 for (size_t i = 0; i < m_notificationQueue.size(); ++i)
671 m_client->sendProtocolMessage(0, m_notificationQueue[i]->toJSONString(), WebString()); 672 m_client->sendProtocolMessage(0, m_notificationQueue[i]->toJSONString(), WebString());
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
707 if (!InspectorBackendDispatcher::getCommandName(message, &commandName)) 708 if (!InspectorBackendDispatcher::getCommandName(message, &commandName))
708 return false; 709 return false;
709 return commandName == InspectorBackendDispatcher::commandName(InspectorBacke ndDispatcher::kDebugger_pauseCmd) 710 return commandName == InspectorBackendDispatcher::commandName(InspectorBacke ndDispatcher::kDebugger_pauseCmd)
710 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke ndDispatcher::kDebugger_setBreakpointCmd) 711 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke ndDispatcher::kDebugger_setBreakpointCmd)
711 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke ndDispatcher::kDebugger_setBreakpointByUrlCmd) 712 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke ndDispatcher::kDebugger_setBreakpointByUrlCmd)
712 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke ndDispatcher::kDebugger_removeBreakpointCmd) 713 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke ndDispatcher::kDebugger_removeBreakpointCmd)
713 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke ndDispatcher::kDebugger_setBreakpointsActiveCmd); 714 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke ndDispatcher::kDebugger_setBreakpointsActiveCmd);
714 } 715 }
715 716
716 } // namespace blink 717 } // namespace blink
OLDNEW
« Source/core/inspector/InspectorInspectorAgent.cpp ('K') | « Source/web/WebDevToolsAgentImpl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698