OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef BROWSER_DEVTOOLS_PROTOCOL_PAGE_HANDLER_IMAGE_UTILS_H_ |
| 6 #define BROWSER_DEVTOOLS_PROTOCOL_PAGE_HANDLER_IMAGE_UTILS_H_ |
| 7 |
| 8 #include "base/macros.h" |
| 9 |
| 10 namespace content { |
| 11 namespace protocol { |
| 12 |
| 13 enum class ScreenshotFormat { PNG, JPEG }; |
| 14 |
| 15 // base64-encodes the provided gfx::Image as PNG or JPEG. |
| 16 std::string EncodeScreenshotImage(const gfx::Image& image, |
| 17 ScreenshotFormat format, |
| 18 int quality); |
| 19 |
| 20 scoped_refptr<base::RefCountedMemory> EncodeScreenshotImageAsJpeg( |
| 21 const gfx::Image& image, |
| 22 int quality); |
| 23 |
| 24 } // namespace protocol |
| 25 } // namespace content |
| 26 |
| 27 #endif // BROWSER_DEVTOOLS_PROTOCOL_PAGE_HANDLER_IMAGE_UTILS_H_ |
OLD | NEW |