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

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"
(...skipping 1328 matching lines...) Expand 10 before | Expand all | Expand 10 after
1410 return InspectorCounters::counterValue(InspectorCounters::DocumentCounter); 1411 return InspectorCounters::counterValue(InspectorCounters::DocumentCounter);
1411 } 1412 }
1412 1413
1413 String Internals::dumpRefCountedInstanceCounts() const 1414 String Internals::dumpRefCountedInstanceCounts() const
1414 { 1415 {
1415 return WTF::dumpRefCountedInstanceCounts(); 1416 return WTF::dumpRefCountedInstanceCounts();
1416 } 1417 }
1417 1418
1418 Vector<String> Internals::consoleMessageArgumentCounts(Document* document) const 1419 Vector<String> Internals::consoleMessageArgumentCounts(Document* document) const
1419 { 1420 {
1420 InstrumentingAgents* instrumentingAgents = instrumentationForPage(document-> page()); 1421 LocalFrame* frame = document->frame();
1421 if (!instrumentingAgents) 1422 if (!frame)
1422 return Vector<String>(); 1423 return Vector<String>();
1423 InspectorConsoleAgent* consoleAgent = instrumentingAgents->inspectorConsoleA gent(); 1424
1424 if (!consoleAgent) 1425 Vector<unsigned> counts = frame->console().messageStorage()->argumentCounts( );
1425 return Vector<String>();
1426 Vector<unsigned> counts = consoleAgent->consoleMessageArgumentCounts();
1427 Vector<String> result(counts.size()); 1426 Vector<String> result(counts.size());
1428 for (size_t i = 0; i < counts.size(); i++) 1427 for (size_t i = 0; i < counts.size(); i++)
1429 result[i] = String::number(counts[i]); 1428 result[i] = String::number(counts[i]);
1430 return result; 1429 return result;
1431 } 1430 }
1432 1431
1433 Vector<unsigned long> Internals::setMemoryCacheCapacities(unsigned long minDeadB ytes, unsigned long maxDeadBytes, unsigned long totalBytes) 1432 Vector<unsigned long> Internals::setMemoryCacheCapacities(unsigned long minDeadB ytes, unsigned long maxDeadBytes, unsigned long totalBytes)
1434 { 1433 {
1435 Vector<unsigned long> result; 1434 Vector<unsigned long> result;
1436 result.append(memoryCache()->minDeadCapacity()); 1435 result.append(memoryCache()->minDeadCapacity());
(...skipping 788 matching lines...) Expand 10 before | Expand all | Expand 10 after
2225 } 2224 }
2226 if (!element->isPluginElement()) { 2225 if (!element->isPluginElement()) {
2227 exceptionState.throwDOMException(InvalidNodeTypeError, "The element prov ided is not a plugin."); 2226 exceptionState.throwDOMException(InvalidNodeTypeError, "The element prov ided is not a plugin.");
2228 return; 2227 return;
2229 } 2228 }
2230 element->ensureUserAgentShadowRoot().setInnerHTML(htmlSource, exceptionState ); 2229 element->ensureUserAgentShadowRoot().setInnerHTML(htmlSource, exceptionState );
2231 toHTMLPlugInElement(element)->setUsePlaceholderContent(true); 2230 toHTMLPlugInElement(element)->setUsePlaceholderContent(true);
2232 } 2231 }
2233 2232
2234 } // namespace blink 2233 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698