OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 CONTENT_PUBLIC_BROWSER_READBACK_TYPES_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_READBACK_TYPES_H_ |
6 #define CONTENT_PUBLIC_BROWSER_READBACK_TYPES_H_ | 6 #define CONTENT_PUBLIC_BROWSER_READBACK_TYPES_H_ |
7 | 7 |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 | 9 |
10 class SkBitmap; | 10 class SkBitmap; |
11 | 11 |
12 namespace content { | 12 namespace content { |
13 | 13 |
14 // ReadbackResponse type used in ContentReadbackHandler. | 14 // ReadbackResponse type used in ContentReadbackHandler. |
15 // | 15 // |
16 // A Java counterpart will be generated for this enum. | 16 // A Java counterpart will be generated for this enum. |
17 // GENERATED_JAVA_ENUM_PACKAGE: ( | 17 // GENERATED_JAVA_ENUM_PACKAGE: ( |
18 // org.chromium.content_public.browser.readback_types) | 18 // org.chromium.content_public.browser.readback_types) |
19 // GENERATED_JAVA_PREFIX_TO_STRIP: READBACK_ | 19 // GENERATED_JAVA_PREFIX_TO_STRIP: READBACK_ |
20 enum ReadbackResponse { | 20 enum ReadbackResponse { |
21 READBACK_SUCCESS, | 21 READBACK_SUCCESS, |
22 READBACK_FAILED, | 22 READBACK_FAILED, |
23 READBACK_FORMAT_NOT_SUPPORTED, | |
24 READBACK_NOT_SUPPORTED, | |
25 READBACK_SURFACE_UNAVAILABLE, | 23 READBACK_SURFACE_UNAVAILABLE, |
26 READBACK_MEMORY_ALLOCATION_FAILURE, | 24 READBACK_BITMAP_ALLOCATION_FAILURE, |
27 }; | 25 }; |
28 | 26 |
29 typedef const base::Callback<void(const SkBitmap&, ReadbackResponse)> | 27 typedef const base::Callback<void(const SkBitmap&, ReadbackResponse)> |
30 ReadbackRequestCallback; | 28 ReadbackRequestCallback; |
31 | 29 |
32 } // namespace content | 30 } // namespace content |
33 | 31 |
34 #endif // CONTENT_PUBLIC_BROWSER_READBACK_TYPES_H_ | 32 #endif // CONTENT_PUBLIC_BROWSER_READBACK_TYPES_H_ |
OLD | NEW |