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

Side by Side Diff: third_party/WebKit/Source/core/inspector/PageDebuggerAgent.cpp

Issue 1907663005: [DevTools] Move v8-related instrumentation from agents to InspectorSession. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@1889533002
Patch Set: profiler agent restore starts instrumenting Created 4 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 return scriptController.canExecuteScripts(NotAboutToExecuteScript); 72 return scriptController.canExecuteScripts(NotAboutToExecuteScript);
73 } 73 }
74 74
75 void PageDebuggerAgent::enable(ErrorString* errorString) 75 void PageDebuggerAgent::enable(ErrorString* errorString)
76 { 76 {
77 if (!canExecuteScripts()) { 77 if (!canExecuteScripts()) {
78 *errorString = "Script execution is prohibited"; 78 *errorString = "Script execution is prohibited";
79 return; 79 return;
80 } 80 }
81 InspectorDebuggerAgent::enable(errorString); 81 InspectorDebuggerAgent::enable(errorString);
82 m_instrumentingAgents->setPageDebuggerAgent(this);
83 } 82 }
84 83
85 void PageDebuggerAgent::disable(ErrorString* errorString) 84 void PageDebuggerAgent::disable(ErrorString* errorString)
86 { 85 {
87 m_instrumentingAgents->setPageDebuggerAgent(nullptr);
88 m_compiledScriptURLs.clear(); 86 m_compiledScriptURLs.clear();
89 InspectorDebuggerAgent::disable(errorString); 87 InspectorDebuggerAgent::disable(errorString);
90 } 88 }
91 89
92 void PageDebuggerAgent::restore() 90 void PageDebuggerAgent::restore()
93 { 91 {
94 if (canExecuteScripts()) 92 if (canExecuteScripts())
95 InspectorDebuggerAgent::restore(); 93 InspectorDebuggerAgent::restore();
96 } 94 }
97 95
98 96
99 void PageDebuggerAgent::didStartProvisionalLoad(LocalFrame* frame)
100 {
101 if (frame == m_inspectedFrames->root()) {
102 ErrorString error;
103 resume(&error);
104 }
105 }
106
107 } // namespace blink 97 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698