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

Side by Side Diff: Source/core/testing/Internals.cpp

Issue 464293002: [DevTools] ConsoleMessage storage moved from ConsoleAgent (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@remove-can-generate
Patch Set: Created 6 years, 3 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) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * Copyright (C) 2013 Apple Inc. All rights reserved. 3 * Copyright (C) 2013 Apple Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 #include "core/editing/Editor.h" 62 #include "core/editing/Editor.h"
63 #include "core/editing/PlainTextRange.h" 63 #include "core/editing/PlainTextRange.h"
64 #include "core/editing/SpellCheckRequester.h" 64 #include "core/editing/SpellCheckRequester.h"
65 #include "core/editing/SpellChecker.h" 65 #include "core/editing/SpellChecker.h"
66 #include "core/editing/SurroundingText.h" 66 #include "core/editing/SurroundingText.h"
67 #include "core/editing/TextIterator.h" 67 #include "core/editing/TextIterator.h"
68 #include "core/fetch/MemoryCache.h" 68 #include "core/fetch/MemoryCache.h"
69 #include "core/fetch/ResourceFetcher.h" 69 #include "core/fetch/ResourceFetcher.h"
70 #include "core/frame/LocalDOMWindow.h" 70 #include "core/frame/LocalDOMWindow.h"
71 #include "core/frame/EventHandlerRegistry.h" 71 #include "core/frame/EventHandlerRegistry.h"
72 #include "core/frame/FrameConsole.h"
72 #include "core/frame/FrameView.h" 73 #include "core/frame/FrameView.h"
73 #include "core/frame/LocalFrame.h" 74 #include "core/frame/LocalFrame.h"
74 #include "core/frame/Settings.h" 75 #include "core/frame/Settings.h"
75 #include "core/frame/WebKitPoint.h" 76 #include "core/frame/WebKitPoint.h"
76 #include "core/html/HTMLContentElement.h" 77 #include "core/html/HTMLContentElement.h"
77 #include "core/html/HTMLIFrameElement.h" 78 #include "core/html/HTMLIFrameElement.h"
78 #include "core/html/HTMLInputElement.h" 79 #include "core/html/HTMLInputElement.h"
79 #include "core/html/HTMLMediaElement.h" 80 #include "core/html/HTMLMediaElement.h"
80 #include "core/html/HTMLPlugInElement.h" 81 #include "core/html/HTMLPlugInElement.h"
81 #include "core/html/HTMLSelectElement.h" 82 #include "core/html/HTMLSelectElement.h"
82 #include "core/html/HTMLTextAreaElement.h" 83 #include "core/html/HTMLTextAreaElement.h"
83 #include "core/html/canvas/CanvasRenderingContext2D.h" 84 #include "core/html/canvas/CanvasRenderingContext2D.h"
84 #include "core/html/forms/FormController.h" 85 #include "core/html/forms/FormController.h"
85 #include "core/html/shadow/ShadowElementNames.h" 86 #include "core/html/shadow/ShadowElementNames.h"
86 #include "core/html/shadow/TextControlInnerElements.h" 87 #include "core/html/shadow/TextControlInnerElements.h"
88 #include "core/inspector/ConsoleMessageStorage.h"
87 #include "core/inspector/InspectorClient.h" 89 #include "core/inspector/InspectorClient.h"
88 #include "core/inspector/InspectorConsoleAgent.h" 90 #include "core/inspector/InspectorConsoleAgent.h"
89 #include "core/inspector/InspectorController.h" 91 #include "core/inspector/InspectorController.h"
90 #include "core/inspector/InspectorCounters.h" 92 #include "core/inspector/InspectorCounters.h"
91 #include "core/inspector/InspectorFrontendChannel.h" 93 #include "core/inspector/InspectorFrontendChannel.h"
92 #include "core/inspector/InspectorInstrumentation.h" 94 #include "core/inspector/InspectorInstrumentation.h"
93 #include "core/inspector/InspectorOverlay.h" 95 #include "core/inspector/InspectorOverlay.h"
94 #include "core/inspector/InstrumentingAgents.h" 96 #include "core/inspector/InstrumentingAgents.h"
95 #include "core/loader/FrameLoader.h" 97 #include "core/loader/FrameLoader.h"
96 #include "core/loader/HistoryItem.h" 98 #include "core/loader/HistoryItem.h"
(...skipping 1313 matching lines...) Expand 10 before | Expand all | Expand 10 after
1410 return InspectorCounters::counterValue(InspectorCounters::DocumentCounter); 1412 return InspectorCounters::counterValue(InspectorCounters::DocumentCounter);
1411 } 1413 }
1412 1414
1413 String Internals::dumpRefCountedInstanceCounts() const 1415 String Internals::dumpRefCountedInstanceCounts() const
1414 { 1416 {
1415 return WTF::dumpRefCountedInstanceCounts(); 1417 return WTF::dumpRefCountedInstanceCounts();
1416 } 1418 }
1417 1419
1418 Vector<String> Internals::consoleMessageArgumentCounts(Document* document) const 1420 Vector<String> Internals::consoleMessageArgumentCounts(Document* document) const
1419 { 1421 {
1420 InstrumentingAgents* instrumentingAgents = instrumentationForPage(document-> page()); 1422 LocalFrame* frame = document->frame();
1421 if (!instrumentingAgents) 1423 if (!frame)
1422 return Vector<String>(); 1424 return Vector<String>();
1423 InspectorConsoleAgent* consoleAgent = instrumentingAgents->inspectorConsoleA gent(); 1425
1424 if (!consoleAgent) 1426 Vector<unsigned> counts = frame->console().messageStorage()->argumentCounts( );
1425 return Vector<String>();
1426 Vector<unsigned> counts = consoleAgent->consoleMessageArgumentCounts();
1427 Vector<String> result(counts.size()); 1427 Vector<String> result(counts.size());
1428 for (size_t i = 0; i < counts.size(); i++) 1428 for (size_t i = 0; i < counts.size(); i++)
1429 result[i] = String::number(counts[i]); 1429 result[i] = String::number(counts[i]);
1430 return result; 1430 return result;
1431 } 1431 }
1432 1432
1433 Vector<unsigned long> Internals::setMemoryCacheCapacities(unsigned long minDeadB ytes, unsigned long maxDeadBytes, unsigned long totalBytes) 1433 Vector<unsigned long> Internals::setMemoryCacheCapacities(unsigned long minDeadB ytes, unsigned long maxDeadBytes, unsigned long totalBytes)
1434 { 1434 {
1435 Vector<unsigned long> result; 1435 Vector<unsigned long> result;
1436 result.append(memoryCache()->minDeadCapacity()); 1436 result.append(memoryCache()->minDeadCapacity());
(...skipping 788 matching lines...) Expand 10 before | Expand all | Expand 10 after
2225 } 2225 }
2226 if (!element->isPluginElement()) { 2226 if (!element->isPluginElement()) {
2227 exceptionState.throwDOMException(InvalidNodeTypeError, "The element prov ided is not a plugin."); 2227 exceptionState.throwDOMException(InvalidNodeTypeError, "The element prov ided is not a plugin.");
2228 return; 2228 return;
2229 } 2229 }
2230 element->ensureUserAgentShadowRoot().setInnerHTML(htmlSource, exceptionState ); 2230 element->ensureUserAgentShadowRoot().setInnerHTML(htmlSource, exceptionState );
2231 toHTMLPlugInElement(element)->setUsePlaceholderContent(true); 2231 toHTMLPlugInElement(element)->setUsePlaceholderContent(true);
2232 } 2232 }
2233 2233
2234 } // namespace blink 2234 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/inspector/WorkerInspectorController.cpp ('k') | Source/core/workers/WorkerConsole.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698