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

Unified Diff: Source/WebCore/inspector/InspectorInstrumentation.cpp

Issue 12077053: Merge 140127 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1364/
Patch Set: Created 7 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/WebCore/inspector/InspectorInstrumentation.h ('k') | Source/WebCore/inspector/InstrumentingAgents.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/inspector/InspectorInstrumentation.cpp
===================================================================
--- Source/WebCore/inspector/InspectorInstrumentation.cpp (revision 141144)
+++ Source/WebCore/inspector/InspectorInstrumentation.cpp (working copy)
@@ -117,6 +117,37 @@
return frame;
}
+InspectorInstrumentationCookie::InspectorInstrumentationCookie()
+ : m_instrumentingAgents(0)
+ , m_timelineAgentId(0)
+{
+}
+
+InspectorInstrumentationCookie::InspectorInstrumentationCookie(InstrumentingAgents* agents, int timelineAgentId)
+ : m_instrumentingAgents(agents)
+ , m_timelineAgentId(timelineAgentId)
+{
+}
+
+InspectorInstrumentationCookie::InspectorInstrumentationCookie(const InspectorInstrumentationCookie& other)
+ : m_instrumentingAgents(other.m_instrumentingAgents)
+ , m_timelineAgentId(other.m_timelineAgentId)
+{
+}
+
+InspectorInstrumentationCookie& InspectorInstrumentationCookie::operator=(const InspectorInstrumentationCookie& other)
+{
+ if (this != &other) {
+ m_instrumentingAgents = other.m_instrumentingAgents;
+ m_timelineAgentId = other.m_timelineAgentId;
+ }
+ return *this;
+}
+
+InspectorInstrumentationCookie::~InspectorInstrumentationCookie()
+{
+}
+
void InspectorInstrumentation::didClearWindowObjectInWorldImpl(InstrumentingAgents* instrumentingAgents, Frame* frame, DOMWrapperWorld* world)
{
InspectorPageAgent* pageAgent = instrumentingAgents->inspectorPageAgent();
@@ -374,7 +405,7 @@
void InspectorInstrumentation::didHandleEventImpl(const InspectorInstrumentationCookie& cookie)
{
- cancelPauseOnNativeEvent(cookie.first);
+ cancelPauseOnNativeEvent(cookie.instrumentingAgents());
}
void InspectorInstrumentation::didDispatchEventImpl(const InspectorInstrumentationCookie& cookie)
@@ -436,7 +467,7 @@
void InspectorInstrumentation::didFireTimerImpl(const InspectorInstrumentationCookie& cookie)
{
- cancelPauseOnNativeEvent(cookie.first);
+ cancelPauseOnNativeEvent(cookie.instrumentingAgents());
if (InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent(cookie))
timelineAgent->didFireTimer();
@@ -472,13 +503,10 @@
void InspectorInstrumentation::didLayoutImpl(const InspectorInstrumentationCookie& cookie, RenderObject* root)
{
- if (!cookie.first)
- return;
-
if (InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent(cookie))
timelineAgent->didLayout(root);
- if (InspectorPageAgent* pageAgent = cookie.first->inspectorPageAgent())
+ if (InspectorPageAgent* pageAgent = cookie.instrumentingAgents()->inspectorPageAgent())
pageAgent->didLayout();
}
@@ -513,7 +541,7 @@
{
if (InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent(cookie))
timelineAgent->didPaint(rect);
- if (InspectorPageAgent* pageAgent = cookie.first ? cookie.first->inspectorPageAgent() : 0)
+ if (InspectorPageAgent* pageAgent = cookie.instrumentingAgents()->inspectorPageAgent())
pageAgent->didPaint(context, rect);
}
@@ -557,9 +585,7 @@
{
if (InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent(cookie))
timelineAgent->didRecalculateStyle();
- InstrumentingAgents* instrumentingAgents = cookie.first;
- if (!instrumentingAgents)
- return;
+ InstrumentingAgents* instrumentingAgents = cookie.instrumentingAgents();
if (InspectorResourceAgent* resourceAgent = instrumentingAgents->inspectorResourceAgent())
resourceAgent->didRecalculateStyle();
if (InspectorPageAgent* pageAgent = instrumentingAgents->inspectorPageAgent())
@@ -587,7 +613,7 @@
void InspectorInstrumentation::didMatchRuleImpl(const InspectorInstrumentationCookie& cookie, bool matched)
{
- InspectorCSSAgent* cssAgent = cookie.first->inspectorCSSAgent();
+ InspectorCSSAgent* cssAgent = cookie.instrumentingAgents()->inspectorCSSAgent();
if (cssAgent)
cssAgent->didMatchRule(matched);
}
@@ -605,7 +631,7 @@
void InspectorInstrumentation::didProcessRuleImpl(const InspectorInstrumentationCookie& cookie)
{
- InspectorCSSAgent* cssAgent = cookie.first->inspectorCSSAgent();
+ InspectorCSSAgent* cssAgent = cookie.instrumentingAgents()->inspectorCSSAgent();
if (cssAgent)
cssAgent->didProcessRule();
}
@@ -715,9 +741,7 @@
timelineAgent->didReceiveResourceResponse();
if (!loader)
return;
- InstrumentingAgents* instrumentingAgents = cookie.first;
- if (!instrumentingAgents)
- return;
+ InstrumentingAgents* instrumentingAgents = cookie.instrumentingAgents();
if (InspectorResourceAgent* resourceAgent = instrumentingAgents->inspectorResourceAgent())
resourceAgent->didReceiveResponse(identifier, loader, response, resourceLoader);
if (InspectorConsoleAgent* consoleAgent = instrumentingAgents->inspectorConsoleAgent())
@@ -1253,10 +1277,10 @@
InspectorTimelineAgent* InspectorInstrumentation::retrieveTimelineAgent(const InspectorInstrumentationCookie& cookie)
{
- if (!cookie.first)
+ if (!cookie.instrumentingAgents())
return 0;
- InspectorTimelineAgent* timelineAgent = cookie.first->inspectorTimelineAgent();
- if (timelineAgent && timelineAgent->id() == cookie.second)
+ InspectorTimelineAgent* timelineAgent = cookie.instrumentingAgents()->inspectorTimelineAgent();
+ if (timelineAgent && cookie.hasMatchingTimelineAgentId(timelineAgent->id()))
return timelineAgent;
return 0;
}
« no previous file with comments | « Source/WebCore/inspector/InspectorInstrumentation.h ('k') | Source/WebCore/inspector/InstrumentingAgents.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698