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

Side by Side Diff: third_party/WebKit/Source/core/fetch/FontResource.h

Issue 2533503002: Report decoded webfont blob size to memory-infra (Closed)
Patch Set: 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/fetch/FontResource.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 2008 Apple 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 float size, 65 float size,
66 bool bold, 66 bool bold,
67 bool italic, 67 bool italic,
68 FontOrientation = FontOrientation::Horizontal); 68 FontOrientation = FontOrientation::Horizontal);
69 69
70 // Returns true if the loading priority of the remote font resource can be 70 // Returns true if the loading priority of the remote font resource can be
71 // lowered. The loading priority of the font can be lowered only if the 71 // lowered. The loading priority of the font can be lowered only if the
72 // font is not needed for painting the text. 72 // font is not needed for painting the text.
73 bool isLowPriorityLoadingAllowedForRemoteFont() const; 73 bool isLowPriorityLoadingAllowedForRemoteFont() const;
74 74
75 void onMemoryDump(WebMemoryDumpLevelOfDetail,
76 WebProcessMemoryDump*) const override;
77
75 private: 78 private:
76 class FontResourceFactory : public ResourceFactory { 79 class FontResourceFactory : public ResourceFactory {
77 public: 80 public:
78 FontResourceFactory() : ResourceFactory(Resource::Font) {} 81 FontResourceFactory() : ResourceFactory(Resource::Font) {}
79 82
80 Resource* create(const ResourceRequest& request, 83 Resource* create(const ResourceRequest& request,
81 const ResourceLoaderOptions& options, 84 const ResourceLoaderOptions& options,
82 const String& charset) const override { 85 const String& charset) const override {
83 return new FontResource(request, options); 86 return new FontResource(request, options);
84 } 87 }
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 // Only the RemoteFontFaceSources clients can prevent lowering of loading 126 // Only the RemoteFontFaceSources clients can prevent lowering of loading
124 // priority of the remote fonts. Set the default to true to prevent 127 // priority of the remote fonts. Set the default to true to prevent
125 // other clients from incorrectly returning false. 128 // other clients from incorrectly returning false.
126 return true; 129 return true;
127 } 130 }
128 }; 131 };
129 132
130 } // namespace blink 133 } // namespace blink
131 134
132 #endif 135 #endif
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/fetch/FontResource.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698