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/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, 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
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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 } 110 }
111 111
112 static Frame* frameForScriptExecutionContext(ScriptExecutionContext* context) 112 static Frame* frameForScriptExecutionContext(ScriptExecutionContext* context)
113 { 113 {
114 Frame* frame = 0; 114 Frame* frame = 0;
115 if (context->isDocument()) 115 if (context->isDocument())
116 frame = static_cast<Document*>(context)->frame(); 116 frame = static_cast<Document*>(context)->frame();
117 return frame; 117 return frame;
118 } 118 }
119 119
120 InspectorInstrumentationCookie::InspectorInstrumentationCookie()
121 : m_instrumentingAgents(0)
122 , m_timelineAgentId(0)
123 {
124 }
125
126 InspectorInstrumentationCookie::InspectorInstrumentationCookie(InstrumentingAgen ts* agents, int timelineAgentId)
127 : m_instrumentingAgents(agents)
128 , m_timelineAgentId(timelineAgentId)
129 {
130 }
131
132 InspectorInstrumentationCookie::InspectorInstrumentationCookie(const InspectorIn strumentationCookie& other)
133 : m_instrumentingAgents(other.m_instrumentingAgents)
134 , m_timelineAgentId(other.m_timelineAgentId)
135 {
136 }
137
138 InspectorInstrumentationCookie& InspectorInstrumentationCookie::operator=(const InspectorInstrumentationCookie& other)
139 {
140 if (this != &other) {
141 m_instrumentingAgents = other.m_instrumentingAgents;
142 m_timelineAgentId = other.m_timelineAgentId;
143 }
144 return *this;
145 }
146
147 InspectorInstrumentationCookie::~InspectorInstrumentationCookie()
148 {
149 }
150
120 void InspectorInstrumentation::didClearWindowObjectInWorldImpl(InstrumentingAgen ts* instrumentingAgents, Frame* frame, DOMWrapperWorld* world) 151 void InspectorInstrumentation::didClearWindowObjectInWorldImpl(InstrumentingAgen ts* instrumentingAgents, Frame* frame, DOMWrapperWorld* world)
121 { 152 {
122 InspectorPageAgent* pageAgent = instrumentingAgents->inspectorPageAgent(); 153 InspectorPageAgent* pageAgent = instrumentingAgents->inspectorPageAgent();
123 if (pageAgent) 154 if (pageAgent)
124 pageAgent->didClearWindowObjectInWorld(frame, world); 155 pageAgent->didClearWindowObjectInWorld(frame, world);
125 if (InspectorAgent* inspectorAgent = instrumentingAgents->inspectorAgent()) 156 if (InspectorAgent* inspectorAgent = instrumentingAgents->inspectorAgent())
126 inspectorAgent->didClearWindowObjectInWorld(frame, world); 157 inspectorAgent->didClearWindowObjectInWorld(frame, world);
127 #if ENABLE(JAVASCRIPT_DEBUGGER) 158 #if ENABLE(JAVASCRIPT_DEBUGGER)
128 if (PageDebuggerAgent* debuggerAgent = instrumentingAgents->pageDebuggerAgen t()) { 159 if (PageDebuggerAgent* debuggerAgent = instrumentingAgents->pageDebuggerAgen t()) {
129 if (pageAgent && world == mainThreadNormalWorld() && frame == pageAgent- >mainFrame()) 160 if (pageAgent && world == mainThreadNormalWorld() && frame == pageAgent- >mainFrame())
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 } 398 }
368 399
369 InspectorInstrumentationCookie InspectorInstrumentation::willHandleEventImpl(Ins trumentingAgents* instrumentingAgents, Event* event) 400 InspectorInstrumentationCookie InspectorInstrumentation::willHandleEventImpl(Ins trumentingAgents* instrumentingAgents, Event* event)
370 { 401 {
371 pauseOnNativeEventIfNeeded(instrumentingAgents, true, event->type(), false); 402 pauseOnNativeEventIfNeeded(instrumentingAgents, true, event->type(), false);
372 return InspectorInstrumentationCookie(instrumentingAgents, 0); 403 return InspectorInstrumentationCookie(instrumentingAgents, 0);
373 } 404 }
374 405
375 void InspectorInstrumentation::didHandleEventImpl(const InspectorInstrumentation Cookie& cookie) 406 void InspectorInstrumentation::didHandleEventImpl(const InspectorInstrumentation Cookie& cookie)
376 { 407 {
377 cancelPauseOnNativeEvent(cookie.first); 408 cancelPauseOnNativeEvent(cookie.instrumentingAgents());
378 } 409 }
379 410
380 void InspectorInstrumentation::didDispatchEventImpl(const InspectorInstrumentati onCookie& cookie) 411 void InspectorInstrumentation::didDispatchEventImpl(const InspectorInstrumentati onCookie& cookie)
381 { 412 {
382 if (InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent(cookie)) 413 if (InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent(cookie))
383 timelineAgent->didDispatchEvent(); 414 timelineAgent->didDispatchEvent();
384 } 415 }
385 416
386 InspectorInstrumentationCookie InspectorInstrumentation::willDispatchEventOnWind owImpl(InstrumentingAgents* instrumentingAgents, const Event& event, DOMWindow* window) 417 InspectorInstrumentationCookie InspectorInstrumentation::willDispatchEventOnWind owImpl(InstrumentingAgents* instrumentingAgents, const Event& event, DOMWindow* window)
387 { 418 {
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
429 int timelineAgentId = 0; 460 int timelineAgentId = 0;
430 if (InspectorTimelineAgent* timelineAgent = instrumentingAgents->inspectorTi melineAgent()) { 461 if (InspectorTimelineAgent* timelineAgent = instrumentingAgents->inspectorTi melineAgent()) {
431 timelineAgent->willFireTimer(timerId, frameForScriptExecutionContext(con text)); 462 timelineAgent->willFireTimer(timerId, frameForScriptExecutionContext(con text));
432 timelineAgentId = timelineAgent->id(); 463 timelineAgentId = timelineAgent->id();
433 } 464 }
434 return InspectorInstrumentationCookie(instrumentingAgents, timelineAgentId); 465 return InspectorInstrumentationCookie(instrumentingAgents, timelineAgentId);
435 } 466 }
436 467
437 void InspectorInstrumentation::didFireTimerImpl(const InspectorInstrumentationCo okie& cookie) 468 void InspectorInstrumentation::didFireTimerImpl(const InspectorInstrumentationCo okie& cookie)
438 { 469 {
439 cancelPauseOnNativeEvent(cookie.first); 470 cancelPauseOnNativeEvent(cookie.instrumentingAgents());
440 471
441 if (InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent(cookie)) 472 if (InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent(cookie))
442 timelineAgent->didFireTimer(); 473 timelineAgent->didFireTimer();
443 } 474 }
444 475
445 void InspectorInstrumentation::didBeginFrameImpl(InstrumentingAgents* instrument ingAgents) 476 void InspectorInstrumentation::didBeginFrameImpl(InstrumentingAgents* instrument ingAgents)
446 { 477 {
447 if (InspectorTimelineAgent* timelineAgent = instrumentingAgents->inspectorTi melineAgent()) 478 if (InspectorTimelineAgent* timelineAgent = instrumentingAgents->inspectorTi melineAgent())
448 timelineAgent->didBeginFrame(); 479 timelineAgent->didBeginFrame();
449 } 480 }
(...skipping 15 matching lines...) Expand all
465 int timelineAgentId = 0; 496 int timelineAgentId = 0;
466 if (InspectorTimelineAgent* timelineAgent = instrumentingAgents->inspectorTi melineAgent()) { 497 if (InspectorTimelineAgent* timelineAgent = instrumentingAgents->inspectorTi melineAgent()) {
467 timelineAgent->willLayout(frame); 498 timelineAgent->willLayout(frame);
468 timelineAgentId = timelineAgent->id(); 499 timelineAgentId = timelineAgent->id();
469 } 500 }
470 return InspectorInstrumentationCookie(instrumentingAgents, timelineAgentId); 501 return InspectorInstrumentationCookie(instrumentingAgents, timelineAgentId);
471 } 502 }
472 503
473 void InspectorInstrumentation::didLayoutImpl(const InspectorInstrumentationCooki e& cookie, RenderObject* root) 504 void InspectorInstrumentation::didLayoutImpl(const InspectorInstrumentationCooki e& cookie, RenderObject* root)
474 { 505 {
475 if (!cookie.first)
476 return;
477
478 if (InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent(cookie)) 506 if (InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent(cookie))
479 timelineAgent->didLayout(root); 507 timelineAgent->didLayout(root);
480 508
481 if (InspectorPageAgent* pageAgent = cookie.first->inspectorPageAgent()) 509 if (InspectorPageAgent* pageAgent = cookie.instrumentingAgents()->inspectorP ageAgent())
482 pageAgent->didLayout(); 510 pageAgent->didLayout();
483 } 511 }
484 512
485 InspectorInstrumentationCookie InspectorInstrumentation::willDispatchXHRLoadEven tImpl(InstrumentingAgents* instrumentingAgents, XMLHttpRequest* request, ScriptE xecutionContext* context) 513 InspectorInstrumentationCookie InspectorInstrumentation::willDispatchXHRLoadEven tImpl(InstrumentingAgents* instrumentingAgents, XMLHttpRequest* request, ScriptE xecutionContext* context)
486 { 514 {
487 int timelineAgentId = 0; 515 int timelineAgentId = 0;
488 InspectorTimelineAgent* timelineAgent = instrumentingAgents->inspectorTimeli neAgent(); 516 InspectorTimelineAgent* timelineAgent = instrumentingAgents->inspectorTimeli neAgent();
489 if (timelineAgent && request->hasEventListeners(eventNames().loadEvent)) { 517 if (timelineAgent && request->hasEventListeners(eventNames().loadEvent)) {
490 timelineAgent->willDispatchXHRLoadEvent(request->url(), frameForScriptEx ecutionContext(context)); 518 timelineAgent->willDispatchXHRLoadEvent(request->url(), frameForScriptEx ecutionContext(context));
491 timelineAgentId = timelineAgent->id(); 519 timelineAgentId = timelineAgent->id();
(...skipping 14 matching lines...) Expand all
506 timelineAgent->willPaint(frame); 534 timelineAgent->willPaint(frame);
507 timelineAgentId = timelineAgent->id(); 535 timelineAgentId = timelineAgent->id();
508 } 536 }
509 return InspectorInstrumentationCookie(instrumentingAgents, timelineAgentId); 537 return InspectorInstrumentationCookie(instrumentingAgents, timelineAgentId);
510 } 538 }
511 539
512 void InspectorInstrumentation::didPaintImpl(const InspectorInstrumentationCookie & cookie, GraphicsContext* context, const LayoutRect& rect) 540 void InspectorInstrumentation::didPaintImpl(const InspectorInstrumentationCookie & cookie, GraphicsContext* context, const LayoutRect& rect)
513 { 541 {
514 if (InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent(cookie)) 542 if (InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent(cookie))
515 timelineAgent->didPaint(rect); 543 timelineAgent->didPaint(rect);
516 if (InspectorPageAgent* pageAgent = cookie.first ? cookie.first->inspectorPa geAgent() : 0) 544 if (InspectorPageAgent* pageAgent = cookie.instrumentingAgents()->inspectorP ageAgent())
517 pageAgent->didPaint(context, rect); 545 pageAgent->didPaint(context, rect);
518 } 546 }
519 547
520 void InspectorInstrumentation::willScrollLayerImpl(InstrumentingAgents* instrume ntingAgents, Frame* frame) 548 void InspectorInstrumentation::willScrollLayerImpl(InstrumentingAgents* instrume ntingAgents, Frame* frame)
521 { 549 {
522 if (InspectorTimelineAgent* timelineAgent = instrumentingAgents->inspectorTi melineAgent()) 550 if (InspectorTimelineAgent* timelineAgent = instrumentingAgents->inspectorTi melineAgent())
523 timelineAgent->willScroll(frame); 551 timelineAgent->willScroll(frame);
524 } 552 }
525 553
526 void InspectorInstrumentation::didScrollLayerImpl(InstrumentingAgents* instrumen tingAgents) 554 void InspectorInstrumentation::didScrollLayerImpl(InstrumentingAgents* instrumen tingAgents)
(...skipping 23 matching lines...) Expand all
550 } 578 }
551 if (InspectorResourceAgent* resourceAgent = instrumentingAgents->inspectorRe sourceAgent()) 579 if (InspectorResourceAgent* resourceAgent = instrumentingAgents->inspectorRe sourceAgent())
552 resourceAgent->willRecalculateStyle(); 580 resourceAgent->willRecalculateStyle();
553 return InspectorInstrumentationCookie(instrumentingAgents, timelineAgentId); 581 return InspectorInstrumentationCookie(instrumentingAgents, timelineAgentId);
554 } 582 }
555 583
556 void InspectorInstrumentation::didRecalculateStyleImpl(const InspectorInstrument ationCookie& cookie) 584 void InspectorInstrumentation::didRecalculateStyleImpl(const InspectorInstrument ationCookie& cookie)
557 { 585 {
558 if (InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent(cookie)) 586 if (InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent(cookie))
559 timelineAgent->didRecalculateStyle(); 587 timelineAgent->didRecalculateStyle();
560 InstrumentingAgents* instrumentingAgents = cookie.first; 588 InstrumentingAgents* instrumentingAgents = cookie.instrumentingAgents();
561 if (!instrumentingAgents)
562 return;
563 if (InspectorResourceAgent* resourceAgent = instrumentingAgents->inspectorRe sourceAgent()) 589 if (InspectorResourceAgent* resourceAgent = instrumentingAgents->inspectorRe sourceAgent())
564 resourceAgent->didRecalculateStyle(); 590 resourceAgent->didRecalculateStyle();
565 if (InspectorPageAgent* pageAgent = instrumentingAgents->inspectorPageAgent( )) 591 if (InspectorPageAgent* pageAgent = instrumentingAgents->inspectorPageAgent( ))
566 pageAgent->didRecalculateStyle(); 592 pageAgent->didRecalculateStyle();
567 } 593 }
568 594
569 void InspectorInstrumentation::didScheduleStyleRecalculationImpl(InstrumentingAg ents* instrumentingAgents, Document* document) 595 void InspectorInstrumentation::didScheduleStyleRecalculationImpl(InstrumentingAg ents* instrumentingAgents, Document* document)
570 { 596 {
571 if (InspectorTimelineAgent* timelineAgent = instrumentingAgents->inspectorTi melineAgent()) 597 if (InspectorTimelineAgent* timelineAgent = instrumentingAgents->inspectorTi melineAgent())
572 timelineAgent->didScheduleStyleRecalculation(document->frame()); 598 timelineAgent->didScheduleStyleRecalculation(document->frame());
573 if (InspectorResourceAgent* resourceAgent = instrumentingAgents->inspectorRe sourceAgent()) 599 if (InspectorResourceAgent* resourceAgent = instrumentingAgents->inspectorRe sourceAgent())
574 resourceAgent->didScheduleStyleRecalculation(document); 600 resourceAgent->didScheduleStyleRecalculation(document);
575 } 601 }
576 602
577 InspectorInstrumentationCookie InspectorInstrumentation::willMatchRuleImpl(Instr umentingAgents* instrumentingAgents, StyleRule* rule, StyleResolver* styleResolv er) 603 InspectorInstrumentationCookie InspectorInstrumentation::willMatchRuleImpl(Instr umentingAgents* instrumentingAgents, StyleRule* rule, StyleResolver* styleResolv er)
578 { 604 {
579 InspectorCSSAgent* cssAgent = instrumentingAgents->inspectorCSSAgent(); 605 InspectorCSSAgent* cssAgent = instrumentingAgents->inspectorCSSAgent();
580 if (cssAgent) { 606 if (cssAgent) {
581 cssAgent->willMatchRule(rule, styleResolver); 607 cssAgent->willMatchRule(rule, styleResolver);
582 return InspectorInstrumentationCookie(instrumentingAgents, 1); 608 return InspectorInstrumentationCookie(instrumentingAgents, 1);
583 } 609 }
584 610
585 return InspectorInstrumentationCookie(); 611 return InspectorInstrumentationCookie();
586 } 612 }
587 613
588 void InspectorInstrumentation::didMatchRuleImpl(const InspectorInstrumentationCo okie& cookie, bool matched) 614 void InspectorInstrumentation::didMatchRuleImpl(const InspectorInstrumentationCo okie& cookie, bool matched)
589 { 615 {
590 InspectorCSSAgent* cssAgent = cookie.first->inspectorCSSAgent(); 616 InspectorCSSAgent* cssAgent = cookie.instrumentingAgents()->inspectorCSSAgen t();
591 if (cssAgent) 617 if (cssAgent)
592 cssAgent->didMatchRule(matched); 618 cssAgent->didMatchRule(matched);
593 } 619 }
594 620
595 InspectorInstrumentationCookie InspectorInstrumentation::willProcessRuleImpl(Ins trumentingAgents* instrumentingAgents, StyleRule* rule, StyleResolver* styleReso lver) 621 InspectorInstrumentationCookie InspectorInstrumentation::willProcessRuleImpl(Ins trumentingAgents* instrumentingAgents, StyleRule* rule, StyleResolver* styleReso lver)
596 { 622 {
597 InspectorCSSAgent* cssAgent = instrumentingAgents->inspectorCSSAgent(); 623 InspectorCSSAgent* cssAgent = instrumentingAgents->inspectorCSSAgent();
598 if (cssAgent) { 624 if (cssAgent) {
599 cssAgent->willProcessRule(rule, styleResolver); 625 cssAgent->willProcessRule(rule, styleResolver);
600 return InspectorInstrumentationCookie(instrumentingAgents, 1); 626 return InspectorInstrumentationCookie(instrumentingAgents, 1);
601 } 627 }
602 628
603 return InspectorInstrumentationCookie(); 629 return InspectorInstrumentationCookie();
604 } 630 }
605 631
606 void InspectorInstrumentation::didProcessRuleImpl(const InspectorInstrumentation Cookie& cookie) 632 void InspectorInstrumentation::didProcessRuleImpl(const InspectorInstrumentation Cookie& cookie)
607 { 633 {
608 InspectorCSSAgent* cssAgent = cookie.first->inspectorCSSAgent(); 634 InspectorCSSAgent* cssAgent = cookie.instrumentingAgents()->inspectorCSSAgen t();
609 if (cssAgent) 635 if (cssAgent)
610 cssAgent->didProcessRule(); 636 cssAgent->didProcessRule();
611 } 637 }
612 638
613 void InspectorInstrumentation::applyUserAgentOverrideImpl(InstrumentingAgents* i nstrumentingAgents, String* userAgent) 639 void InspectorInstrumentation::applyUserAgentOverrideImpl(InstrumentingAgents* i nstrumentingAgents, String* userAgent)
614 { 640 {
615 if (InspectorResourceAgent* resourceAgent = instrumentingAgents->inspectorRe sourceAgent()) 641 if (InspectorResourceAgent* resourceAgent = instrumentingAgents->inspectorRe sourceAgent())
616 resourceAgent->applyUserAgentOverride(userAgent); 642 resourceAgent->applyUserAgentOverride(userAgent);
617 } 643 }
618 644
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
708 } 734 }
709 return InspectorInstrumentationCookie(instrumentingAgents, timelineAgentId); 735 return InspectorInstrumentationCookie(instrumentingAgents, timelineAgentId);
710 } 736 }
711 737
712 void InspectorInstrumentation::didReceiveResourceResponseImpl(const InspectorIns trumentationCookie& cookie, unsigned long identifier, DocumentLoader* loader, co nst ResourceResponse& response, ResourceLoader* resourceLoader) 738 void InspectorInstrumentation::didReceiveResourceResponseImpl(const InspectorIns trumentationCookie& cookie, unsigned long identifier, DocumentLoader* loader, co nst ResourceResponse& response, ResourceLoader* resourceLoader)
713 { 739 {
714 if (InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent(cookie)) 740 if (InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent(cookie))
715 timelineAgent->didReceiveResourceResponse(); 741 timelineAgent->didReceiveResourceResponse();
716 if (!loader) 742 if (!loader)
717 return; 743 return;
718 InstrumentingAgents* instrumentingAgents = cookie.first; 744 InstrumentingAgents* instrumentingAgents = cookie.instrumentingAgents();
719 if (!instrumentingAgents)
720 return;
721 if (InspectorResourceAgent* resourceAgent = instrumentingAgents->inspectorRe sourceAgent()) 745 if (InspectorResourceAgent* resourceAgent = instrumentingAgents->inspectorRe sourceAgent())
722 resourceAgent->didReceiveResponse(identifier, loader, response, resource Loader); 746 resourceAgent->didReceiveResponse(identifier, loader, response, resource Loader);
723 if (InspectorConsoleAgent* consoleAgent = instrumentingAgents->inspectorCons oleAgent()) 747 if (InspectorConsoleAgent* consoleAgent = instrumentingAgents->inspectorCons oleAgent())
724 consoleAgent->didReceiveResponse(identifier, response); // This should c ome AFTER resource notification, front-end relies on this. 748 consoleAgent->didReceiveResponse(identifier, response); // This should c ome AFTER resource notification, front-end relies on this.
725 } 749 }
726 750
727 void InspectorInstrumentation::didReceiveResourceResponseButCanceledImpl(Frame* frame, DocumentLoader* loader, unsigned long identifier, const ResourceResponse& r) 751 void InspectorInstrumentation::didReceiveResourceResponseButCanceledImpl(Frame* frame, DocumentLoader* loader, unsigned long identifier, const ResourceResponse& r)
728 { 752 {
729 InspectorInstrumentationCookie cookie = InspectorInstrumentation::willReceiv eResourceResponse(frame, identifier, r); 753 InspectorInstrumentationCookie cookie = InspectorInstrumentation::willReceiv eResourceResponse(frame, identifier, r);
730 InspectorInstrumentation::didReceiveResourceResponse(cookie, identifier, loa der, r, 0); 754 InspectorInstrumentation::didReceiveResourceResponse(cookie, identifier, loa der, r, 0);
(...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after
1246 return; 1270 return;
1247 instrumentingAgentsSet->remove(instrumentingAgents); 1271 instrumentingAgentsSet->remove(instrumentingAgents);
1248 if (instrumentingAgentsSet->isEmpty()) { 1272 if (instrumentingAgentsSet->isEmpty()) {
1249 delete instrumentingAgentsSet; 1273 delete instrumentingAgentsSet;
1250 instrumentingAgentsSet = 0; 1274 instrumentingAgentsSet = 0;
1251 } 1275 }
1252 } 1276 }
1253 1277
1254 InspectorTimelineAgent* InspectorInstrumentation::retrieveTimelineAgent(const In spectorInstrumentationCookie& cookie) 1278 InspectorTimelineAgent* InspectorInstrumentation::retrieveTimelineAgent(const In spectorInstrumentationCookie& cookie)
1255 { 1279 {
1256 if (!cookie.first) 1280 if (!cookie.instrumentingAgents())
1257 return 0; 1281 return 0;
1258 InspectorTimelineAgent* timelineAgent = cookie.first->inspectorTimelineAgent (); 1282 InspectorTimelineAgent* timelineAgent = cookie.instrumentingAgents()->inspec torTimelineAgent();
1259 if (timelineAgent && timelineAgent->id() == cookie.second) 1283 if (timelineAgent && cookie.hasMatchingTimelineAgentId(timelineAgent->id()))
1260 return timelineAgent; 1284 return timelineAgent;
1261 return 0; 1285 return 0;
1262 } 1286 }
1263 1287
1264 InstrumentingAgents* InspectorInstrumentation::instrumentingAgentsForPage(Page* page) 1288 InstrumentingAgents* InspectorInstrumentation::instrumentingAgentsForPage(Page* page)
1265 { 1289 {
1266 if (!page) 1290 if (!page)
1267 return 0; 1291 return 0;
1268 return instrumentationForPage(page); 1292 return instrumentationForPage(page);
1269 } 1293 }
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
1310 void InspectorInstrumentation::renderLayerDestroyedImpl(InstrumentingAgents* ins trumentingAgents, const RenderLayer* renderLayer) 1334 void InspectorInstrumentation::renderLayerDestroyedImpl(InstrumentingAgents* ins trumentingAgents, const RenderLayer* renderLayer)
1311 { 1335 {
1312 if (InspectorLayerTreeAgent* layerTreeAgent = instrumentingAgents->inspector LayerTreeAgent()) 1336 if (InspectorLayerTreeAgent* layerTreeAgent = instrumentingAgents->inspector LayerTreeAgent())
1313 layerTreeAgent->renderLayerDestroyed(renderLayer); 1337 layerTreeAgent->renderLayerDestroyed(renderLayer);
1314 } 1338 }
1315 #endif 1339 #endif
1316 1340
1317 } // namespace WebCore 1341 } // namespace WebCore
1318 1342
1319 #endif // !ENABLE(INSPECTOR) 1343 #endif // !ENABLE(INSPECTOR)
OLDNEW
« 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