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

Side by Side Diff: content/browser/android/content_readback_handler.h

Issue 593503003: Support error handling for Surface readbacks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Formatted code and fixed build issue in test. Created 6 years, 1 month 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
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_BROWSER_ANDROID_CONTENT_READBACK_HANDLER_H_ 5 #ifndef CONTENT_BROWSER_ANDROID_CONTENT_READBACK_HANDLER_H_
6 #define CONTENT_BROWSER_ANDROID_CONTENT_READBACK_HANDLER_H_ 6 #define CONTENT_BROWSER_ANDROID_CONTENT_READBACK_HANDLER_H_
7 7
8 #include <jni.h> 8 #include <jni.h>
9 9
10 #include "base/android/jni_weak_ref.h" 10 #include "base/android/jni_weak_ref.h"
11 #include "base/callback.h" 11 #include "base/callback.h"
12 #include "base/memory/weak_ptr.h" 12 #include "base/memory/weak_ptr.h"
13 #include "content/public/browser/readback_types.h"
13 14
14 class SkBitmap; 15 class SkBitmap;
15 16
16 namespace cc { 17 namespace cc {
17 class CopyOutputResult; 18 class CopyOutputResult;
18 } 19 }
19 20
20 namespace content { 21 namespace content {
21 22
22 // Native side of the ContentReadbackHandler.java, which issues content 23 // Native side of the ContentReadbackHandler.java, which issues content
(...skipping 18 matching lines...) Expand all
41 jobject content_view_core); 42 jobject content_view_core);
42 void GetCompositorBitmap(JNIEnv* env, 43 void GetCompositorBitmap(JNIEnv* env,
43 jobject obj, 44 jobject obj,
44 jint readback_id, 45 jint readback_id,
45 jlong native_window_android); 46 jlong native_window_android);
46 47
47 private: 48 private:
48 virtual ~ContentReadbackHandler(); 49 virtual ~ContentReadbackHandler();
49 50
50 void OnFinishReadback(int readback_id, 51 void OnFinishReadback(int readback_id,
51 bool success, 52 const SkBitmap& bitmap,
52 const SkBitmap& bitmap); 53 ReadbackResponse response);
53 54
54 base::android::ScopedJavaGlobalRef<jobject> java_obj_; 55 base::android::ScopedJavaGlobalRef<jobject> java_obj_;
55 base::WeakPtrFactory<ContentReadbackHandler> weak_factory_; 56 base::WeakPtrFactory<ContentReadbackHandler> weak_factory_;
56 57
57 DISALLOW_COPY_AND_ASSIGN(ContentReadbackHandler); 58 DISALLOW_COPY_AND_ASSIGN(ContentReadbackHandler);
58 }; 59 };
59 60
60 } // namespace content 61 } // namespace content
61 62
62 #endif // CONTENT_BROWSER_ANDROID_CONTENT_READBACK_HANDLER_H_ 63 #endif // CONTENT_BROWSER_ANDROID_CONTENT_READBACK_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698