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

Unified Diff: third_party/WebKit/Source/core/html/HTMLCanvasElement.h

Issue 1820813004: Add UMA to HTMLCanvasElement to track image formats usage of toDataURL/toBlob (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Matching name of histogram Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/html/HTMLCanvasElement.h
diff --git a/third_party/WebKit/Source/core/html/HTMLCanvasElement.h b/third_party/WebKit/Source/core/html/HTMLCanvasElement.h
index e7bb8bbb4369218d4e700e60f7e7d6304a717fc2..72ee12061f611bde006a903471c80b165f242cc5 100644
--- a/third_party/WebKit/Source/core/html/HTMLCanvasElement.h
+++ b/third_party/WebKit/Source/core/html/HTMLCanvasElement.h
@@ -98,7 +98,7 @@ public:
bool isPaintable() const;
- static String toEncodingMimeType(const String& mimeType);
+ static String toEncodingMimeType(const String& mimeType, const String& callFunctionName);
String toDataURL(const String& mimeType, const ScriptValue& qualityArgument, ExceptionState&) const;
String toDataURL(const String& mimeType, ExceptionState& exceptionState) const { return toDataURL(mimeType, ScriptValue(), exceptionState); }
@@ -185,6 +185,17 @@ public:
bool isSupportedInteractiveCanvasFallback(const Element&);
std::pair<Element*, String> getControlAndIdIfHitRegionExists(const LayoutPoint&);
+ enum CanvasReturnImageFormat {
Justin Novosad 2016/03/22 15:09:04 This does not need to be in the header. Also, why
+ Png = 0,
Justin Novosad 2016/03/22 15:09:04 enum members should have the enum name as a prefix
+ Jpeg = 1,
+ Webp = 2,
+ Gif = 3,
+ Bmp = 4,
+ Ico = 5,
+ Tiff = 6,
+ NumberOfImageFormats
Justin Novosad 2016/03/22 15:09:04 You should add an "Unknown" value
+ };
+
protected:
void didMoveToNewDocument(Document& oldDocument) override;

Powered by Google App Engine
This is Rietveld 408576698