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

Side by Side Diff: ui/base/android/window_android.h

Issue 297683005: android: add Java-side support for browser compositor async readback (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed tedchoc comments Created 6 years, 7 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
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 UI_BASE_ANDROID_WINDOW_ANDROID_H_ 5 #ifndef UI_BASE_ANDROID_WINDOW_ANDROID_H_
6 #define UI_BASE_ANDROID_WINDOW_ANDROID_H_ 6 #define UI_BASE_ANDROID_WINDOW_ANDROID_H_
7 7
8 #include <jni.h> 8 #include <jni.h>
9 #include <vector> 9 #include <vector>
10 #include "base/android/jni_weak_ref.h" 10 #include "base/android/jni_weak_ref.h"
(...skipping 18 matching lines...) Expand all
29 base::android::ScopedJavaLocalRef<jobject> GetJavaObject(); 29 base::android::ScopedJavaLocalRef<jobject> GetJavaObject();
30 30
31 static bool RegisterWindowAndroid(JNIEnv* env); 31 static bool RegisterWindowAndroid(JNIEnv* env);
32 32
33 // The content offset is used to translate snapshots to the correct part of 33 // The content offset is used to translate snapshots to the correct part of
34 // the window. 34 // the window.
35 void set_content_offset(const gfx::Vector2dF& content_offset) { 35 void set_content_offset(const gfx::Vector2dF& content_offset) {
36 content_offset_ = content_offset; 36 content_offset_ = content_offset;
37 } 37 }
38 38
39 bool GrabSnapshot(int content_x, int content_y, int width, int height,
40 std::vector<unsigned char>* png_representation);
41
42 // Compositor callback relay. 39 // Compositor callback relay.
43 void OnCompositingDidCommit(); 40 void OnCompositingDidCommit();
44 41
45 void AttachCompositor(WindowAndroidCompositor* compositor); 42 void AttachCompositor(WindowAndroidCompositor* compositor);
46 void DetachCompositor(); 43 void DetachCompositor();
47 44
48 void AddObserver(WindowAndroidObserver* observer); 45 void AddObserver(WindowAndroidObserver* observer);
49 void RemoveObserver(WindowAndroidObserver* observer); 46 void RemoveObserver(WindowAndroidObserver* observer);
50 47
51 WindowAndroidCompositor* GetCompositor() { return compositor_; } 48 WindowAndroidCompositor* GetCompositor() { return compositor_; }
(...skipping 10 matching lines...) Expand all
62 base::TimeDelta vsync_period_; 59 base::TimeDelta vsync_period_;
63 60
64 ObserverList<WindowAndroidObserver> observer_list_; 61 ObserverList<WindowAndroidObserver> observer_list_;
65 62
66 DISALLOW_COPY_AND_ASSIGN(WindowAndroid); 63 DISALLOW_COPY_AND_ASSIGN(WindowAndroid);
67 }; 64 };
68 65
69 } // namespace ui 66 } // namespace ui
70 67
71 #endif // UI_BASE_ANDROID_WINDOW_ANDROID_H_ 68 #endif // UI_BASE_ANDROID_WINDOW_ANDROID_H_
OLDNEW
« no previous file with comments | « ui/android/java/src/org/chromium/ui/base/WindowAndroid.java ('k') | ui/base/android/window_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698