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

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

Issue 381403002: DevTools: Make WebDevToolsAgent load processId from its client. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 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 | « no previous file | 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 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 , m_webViewDidLayoutOnceAfterLoad(false) 209 , m_webViewDidLayoutOnceAfterLoad(false)
210 , m_deviceMetricsEnabled(false) 210 , m_deviceMetricsEnabled(false)
211 , m_emulateMobileEnabled(false) 211 , m_emulateMobileEnabled(false)
212 , m_originalViewportEnabled(false) 212 , m_originalViewportEnabled(false)
213 , m_isOverlayScrollbarsEnabled(false) 213 , m_isOverlayScrollbarsEnabled(false)
214 , m_originalMinimumPageScaleFactor(0) 214 , m_originalMinimumPageScaleFactor(0)
215 , m_originalMaximumPageScaleFactor(0) 215 , m_originalMaximumPageScaleFactor(0)
216 , m_pageScaleLimitsOverriden(false) 216 , m_pageScaleLimitsOverriden(false)
217 , m_touchEventEmulationEnabled(false) 217 , m_touchEventEmulationEnabled(false)
218 { 218 {
219 long processId = client->processId();
220 ASSERT(processId > 0);
221 inspectorController()->setProcessId(processId);
222
219 ASSERT(m_debuggerId > 0); 223 ASSERT(m_debuggerId > 0);
220 ClientMessageLoopAdapter::ensureClientMessageLoopCreated(m_client); 224 ClientMessageLoopAdapter::ensureClientMessageLoopCreated(m_client);
221 } 225 }
222 226
223 WebDevToolsAgentImpl::~WebDevToolsAgentImpl() 227 WebDevToolsAgentImpl::~WebDevToolsAgentImpl()
224 { 228 {
225 ClientMessageLoopAdapter::inspectedViewClosed(m_webViewImpl); 229 ClientMessageLoopAdapter::inspectedViewClosed(m_webViewImpl);
226 if (m_attached) 230 if (m_attached)
227 blink::Platform::current()->currentThread()->removeTaskObserver(this); 231 blink::Platform::current()->currentThread()->removeTaskObserver(this);
228 } 232 }
(...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after
669 flushPendingFrontendMessages(); 673 flushPendingFrontendMessages();
670 } 674 }
671 675
672 void WebDevToolsAgentImpl::updateInspectorStateCookie(const String& state) 676 void WebDevToolsAgentImpl::updateInspectorStateCookie(const String& state)
673 { 677 {
674 m_client->saveAgentRuntimeState(state); 678 m_client->saveAgentRuntimeState(state);
675 } 679 }
676 680
677 void WebDevToolsAgentImpl::setProcessId(long processId) 681 void WebDevToolsAgentImpl::setProcessId(long processId)
678 { 682 {
679 inspectorController()->setProcessId(processId);
680 } 683 }
681 684
682 void WebDevToolsAgentImpl::setLayerTreeId(int layerTreeId) 685 void WebDevToolsAgentImpl::setLayerTreeId(int layerTreeId)
683 { 686 {
684 m_layerTreeId = layerTreeId; 687 m_layerTreeId = layerTreeId;
685 inspectorController()->setLayerTreeId(layerTreeId); 688 inspectorController()->setLayerTreeId(layerTreeId);
686 } 689 }
687 690
688 void WebDevToolsAgentImpl::evaluateInWebInspector(long callId, const WebString& script) 691 void WebDevToolsAgentImpl::evaluateInWebInspector(long callId, const WebString& script)
689 { 692 {
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
739 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke ndDispatcher::kDebugger_removeBreakpointCmd) 742 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke ndDispatcher::kDebugger_removeBreakpointCmd)
740 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke ndDispatcher::kDebugger_setBreakpointsActiveCmd); 743 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke ndDispatcher::kDebugger_setBreakpointsActiveCmd);
741 } 744 }
742 745
743 void WebDevToolsAgent::processPendingMessages() 746 void WebDevToolsAgent::processPendingMessages()
744 { 747 {
745 PageScriptDebugServer::shared().runPendingTasks(); 748 PageScriptDebugServer::shared().runPendingTasks();
746 } 749 }
747 750
748 } // namespace blink 751 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698