OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #ifndef ImageEncoderUtils_h | 5 #ifndef ImageEncoderUtils_h |
6 #define ImageEncoderUtils_h | 6 #define ImageEncoderUtils_h |
7 | 7 |
8 #include "platform/PlatformExport.h" | 8 #include "platform/PlatformExport.h" |
9 #include "wtf/text/WTFString.h" | 9 #include "platform/wtf/text/WTFString.h" |
10 | 10 |
11 namespace blink { | 11 namespace blink { |
12 | 12 |
13 class PLATFORM_EXPORT ImageEncoderUtils { | 13 class PLATFORM_EXPORT ImageEncoderUtils { |
14 public: | 14 public: |
15 enum EncodeReason { | 15 enum EncodeReason { |
16 kEncodeReasonToDataURL = 0, | 16 kEncodeReasonToDataURL = 0, |
17 kEncodeReasonToBlobCallback = 1, | 17 kEncodeReasonToBlobCallback = 1, |
18 kEncodeReasonConvertToBlobPromise = 2, | 18 kEncodeReasonConvertToBlobPromise = 2, |
19 kNumberOfEncodeReasons | 19 kNumberOfEncodeReasons |
20 }; | 20 }; |
21 static String ToEncodingMimeType(const String& mime_type, const EncodeReason); | 21 static String ToEncodingMimeType(const String& mime_type, const EncodeReason); |
22 | 22 |
23 // Default image mime type for toDataURL and toBlob functions | 23 // Default image mime type for toDataURL and toBlob functions |
24 static const char kDefaultMimeType[]; | 24 static const char kDefaultMimeType[]; |
25 }; | 25 }; |
26 | 26 |
27 } // namespace blink | 27 } // namespace blink |
28 | 28 |
29 #endif // ImageEncoderUtils_h | 29 #endif // ImageEncoderUtils_h |
OLD | NEW |