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

Side by Side Diff: third_party/WebKit/Source/core/inspector/InspectorTraceEvents.cpp

Issue 2469873002: [ImageResource 4] Split ImageResource into Resource and Image parts (Closed)
Patch Set: style Created 4 years 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 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/inspector/InspectorTraceEvents.h" 5 #include "core/inspector/InspectorTraceEvents.h"
6 6
7 #include "bindings/core/v8/ScriptSourceCode.h" 7 #include "bindings/core/v8/ScriptSourceCode.h"
8 #include "bindings/core/v8/SourceLocation.h" 8 #include "bindings/core/v8/SourceLocation.h"
9 #include "core/animation/Animation.h" 9 #include "core/animation/Animation.h"
10 #include "core/animation/KeyframeEffectReadOnly.h" 10 #include "core/animation/KeyframeEffectReadOnly.h"
(...skipping 880 matching lines...) Expand 10 before | Expand all | Expand 10 after
891 value->setString("scriptId", String::number(location->scriptId())); 891 value->setString("scriptId", String::number(location->scriptId()));
892 value->setString("url", location->url()); 892 value->setString("url", location->url());
893 value->setInteger("lineNumber", location->lineNumber()); 893 value->setInteger("lineNumber", location->lineNumber());
894 return value; 894 return value;
895 } 895 }
896 896
897 std::unique_ptr<TracedValue> InspectorPaintImageEvent::data( 897 std::unique_ptr<TracedValue> InspectorPaintImageEvent::data(
898 const LayoutImage& layoutImage) { 898 const LayoutImage& layoutImage) {
899 std::unique_ptr<TracedValue> value = TracedValue::create(); 899 std::unique_ptr<TracedValue> value = TracedValue::create();
900 setGeneratingNodeInfo(value.get(), &layoutImage, "nodeId"); 900 setGeneratingNodeInfo(value.get(), &layoutImage, "nodeId");
901 if (const ImageResource* resource = layoutImage.cachedImage()) 901 if (const ImageResourceContent* resource = layoutImage.cachedImage())
902 value->setString("url", resource->url().getString()); 902 value->setString("url", resource->url().getString());
903 return value; 903 return value;
904 } 904 }
905 905
906 std::unique_ptr<TracedValue> InspectorPaintImageEvent::data( 906 std::unique_ptr<TracedValue> InspectorPaintImageEvent::data(
907 const LayoutObject& owningLayoutObject, 907 const LayoutObject& owningLayoutObject,
908 const StyleImage& styleImage) { 908 const StyleImage& styleImage) {
909 std::unique_ptr<TracedValue> value = TracedValue::create(); 909 std::unique_ptr<TracedValue> value = TracedValue::create();
910 setGeneratingNodeInfo(value.get(), &owningLayoutObject, "nodeId"); 910 setGeneratingNodeInfo(value.get(), &owningLayoutObject, "nodeId");
911 if (const ImageResource* resource = styleImage.cachedImage()) 911 if (const ImageResourceContent* resource = styleImage.cachedImage())
912 value->setString("url", resource->url().getString()); 912 value->setString("url", resource->url().getString());
913 return value; 913 return value;
914 } 914 }
915 915
916 std::unique_ptr<TracedValue> InspectorPaintImageEvent::data( 916 std::unique_ptr<TracedValue> InspectorPaintImageEvent::data(
917 const LayoutObject* owningLayoutObject, 917 const LayoutObject* owningLayoutObject,
918 const ImageResource& imageResource) { 918 const ImageResourceContent& imageResource) {
919 std::unique_ptr<TracedValue> value = TracedValue::create(); 919 std::unique_ptr<TracedValue> value = TracedValue::create();
920 setGeneratingNodeInfo(value.get(), owningLayoutObject, "nodeId"); 920 setGeneratingNodeInfo(value.get(), owningLayoutObject, "nodeId");
921 value->setString("url", imageResource.url().getString()); 921 value->setString("url", imageResource.url().getString());
922 return value; 922 return value;
923 } 923 }
924 924
925 static size_t usedHeapSize() { 925 static size_t usedHeapSize() {
926 v8::HeapStatistics heapStatistics; 926 v8::HeapStatistics heapStatistics;
927 v8::Isolate::GetCurrent()->GetHeapStatistics(&heapStatistics); 927 v8::Isolate::GetCurrent()->GetHeapStatistics(&heapStatistics);
928 return heapStatistics.used_heap_size(); 928 return heapStatistics.used_heap_size();
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
1053 if (request.move()) 1053 if (request.move())
1054 value->setBoolean("move", true); 1054 value->setBoolean("move", true);
1055 if (request.listBased()) 1055 if (request.listBased())
1056 value->setBoolean("listBased", true); 1056 value->setBoolean("listBased", true);
1057 else if (Node* node = result.innerNode()) 1057 else if (Node* node = result.innerNode())
1058 setNodeInfo(value.get(), node, "nodeId", "nodeName"); 1058 setNodeInfo(value.get(), node, "nodeId", "nodeName");
1059 return value; 1059 return value;
1060 } 1060 }
1061 1061
1062 } // namespace blink 1062 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/inspector/InspectorTraceEvents.h ('k') | third_party/WebKit/Source/core/layout/LayoutImage.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698