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

Side by Side Diff: Source/core/inspector/InspectorController.cpp

Issue 13973026: remove memoryinstrumentation Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: remove the rest part of MemoryInstrumentation Created 7 years, 8 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) 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 #include "InspectorResourceAgent.h" 64 #include "InspectorResourceAgent.h"
65 #include "InspectorState.h" 65 #include "InspectorState.h"
66 #include "InspectorTimelineAgent.h" 66 #include "InspectorTimelineAgent.h"
67 #include "InspectorWorkerAgent.h" 67 #include "InspectorWorkerAgent.h"
68 #include "InstrumentingAgents.h" 68 #include "InstrumentingAgents.h"
69 #include "PageConsoleAgent.h" 69 #include "PageConsoleAgent.h"
70 #include "PageDebuggerAgent.h" 70 #include "PageDebuggerAgent.h"
71 #include "PageRuntimeAgent.h" 71 #include "PageRuntimeAgent.h"
72 #include "Page.h" 72 #include "Page.h"
73 #include "ScriptObject.h" 73 #include "ScriptObject.h"
74 #include "WebCoreMemoryInstrumentation.h"
75 #include <wtf/MemoryInstrumentationVector.h>
76 #include <wtf/UnusedParam.h> 74 #include <wtf/UnusedParam.h>
77 75
78 namespace WebCore { 76 namespace WebCore {
79 77
80 InspectorController::InspectorController(Page* page, InspectorClient* inspectorC lient) 78 InspectorController::InspectorController(Page* page, InspectorClient* inspectorC lient)
81 : m_instrumentingAgents(InstrumentingAgents::create()) 79 : m_instrumentingAgents(InstrumentingAgents::create())
82 , m_injectedScriptManager(InjectedScriptManager::createForPage()) 80 , m_injectedScriptManager(InjectedScriptManager::createForPage())
83 , m_state(adoptPtr(new InspectorCompositeState(inspectorClient))) 81 , m_state(adoptPtr(new InspectorCompositeState(inspectorClient)))
84 , m_overlay(InspectorOverlay::create(page, inspectorClient)) 82 , m_overlay(InspectorOverlay::create(page, inspectorClient))
85 , m_page(page) 83 , m_page(page)
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 ErrorString error; 351 ErrorString error;
354 m_debuggerAgent->resume(&error); 352 m_debuggerAgent->resume(&error);
355 } 353 }
356 } 354 }
357 355
358 void InspectorController::setResourcesDataSizeLimitsFromInternals(int maximumRes ourcesContentSize, int maximumSingleResourceContentSize) 356 void InspectorController::setResourcesDataSizeLimitsFromInternals(int maximumRes ourcesContentSize, int maximumSingleResourceContentSize)
359 { 357 {
360 m_resourceAgent->setResourcesDataSizeLimitsFromInternals(maximumResourcesCon tentSize, maximumSingleResourceContentSize); 358 m_resourceAgent->setResourcesDataSizeLimitsFromInternals(maximumResourcesCon tentSize, maximumSingleResourceContentSize);
361 } 359 }
362 360
363 void InspectorController::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
364 {
365 MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::InspectorCo ntroller);
366 info.addMember(m_inspectorAgent, "inspectorAgent");
367 info.addMember(m_instrumentingAgents, "instrumentingAgents");
368 info.addMember(m_injectedScriptManager, "injectedScriptManager");
369 info.addMember(m_state, "state");
370 info.addMember(m_overlay, "overlay");
371
372 info.addMember(m_inspectorAgent, "inspectorAgent");
373 info.addMember(m_domAgent, "domAgent");
374 info.addMember(m_resourceAgent, "resourceAgent");
375 info.addMember(m_pageAgent, "pageAgent");
376 info.addMember(m_debuggerAgent, "debuggerAgent");
377 info.addMember(m_domDebuggerAgent, "domDebuggerAgent");
378 info.addMember(m_profilerAgent, "profilerAgent");
379
380 info.addMember(m_inspectorBackendDispatcher, "inspectorBackendDispatcher");
381 info.addMember(m_inspectorFrontendClient, "inspectorFrontendClient");
382 info.addMember(m_inspectorFrontend, "inspectorFrontend");
383 info.addMember(m_page, "page");
384 info.addWeakPointer(m_inspectorClient);
385 info.addMember(m_agents, "agents");
386 }
387
388 void InspectorController::willProcessTask() 361 void InspectorController::willProcessTask()
389 { 362 {
390 if (InspectorTimelineAgent* timelineAgent = m_instrumentingAgents->inspector TimelineAgent()) 363 if (InspectorTimelineAgent* timelineAgent = m_instrumentingAgents->inspector TimelineAgent())
391 timelineAgent->willProcessTask(); 364 timelineAgent->willProcessTask();
392 m_profilerAgent->willProcessTask(); 365 m_profilerAgent->willProcessTask();
393 } 366 }
394 367
395 void InspectorController::didProcessTask() 368 void InspectorController::didProcessTask()
396 { 369 {
397 if (InspectorTimelineAgent* timelineAgent = m_instrumentingAgents->inspector TimelineAgent()) 370 if (InspectorTimelineAgent* timelineAgent = m_instrumentingAgents->inspector TimelineAgent())
(...skipping 21 matching lines...) Expand all
419 if (InspectorTimelineAgent* timelineAgent = m_instrumentingAgents->inspector TimelineAgent()) 392 if (InspectorTimelineAgent* timelineAgent = m_instrumentingAgents->inspector TimelineAgent())
420 timelineAgent->willComposite(); 393 timelineAgent->willComposite();
421 } 394 }
422 395
423 void InspectorController::didComposite() 396 void InspectorController::didComposite()
424 { 397 {
425 if (InspectorTimelineAgent* timelineAgent = m_instrumentingAgents->inspector TimelineAgent()) 398 if (InspectorTimelineAgent* timelineAgent = m_instrumentingAgents->inspector TimelineAgent())
426 timelineAgent->didComposite(); 399 timelineAgent->didComposite();
427 } 400 }
428 401
429 HashMap<String, size_t> InspectorController::processMemoryDistribution() const
430 {
431 HashMap<String, size_t> memoryInfo;
432 m_memoryAgent->getProcessMemoryDistributionMap(&memoryInfo);
433 return memoryInfo;
434 }
435
436 } // namespace WebCore 402 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/inspector/InspectorController.h ('k') | Source/core/inspector/InspectorDOMStorageAgent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698