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

Side by Side Diff: content/browser/devtools/protocol/page_handler_image_utils.h

Issue 2592983002: [devtools] Support different encodings for Page.CaptureScreenshot. (Closed)
Patch Set: Return gfx::Image from ui snapshot methods instead. Created 3 years, 11 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 unified diff | Download patch
OLDNEW
(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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698