| Index: android_webview/native/aw_contents.h
|
| diff --git a/android_webview/native/aw_contents.h b/android_webview/native/aw_contents.h
|
| index 6d0248281d85c58371d218c7d1fca0a16df97a71..41368ffbb4873ba14296218bccbeb95e84825d83 100644
|
| --- a/android_webview/native/aw_contents.h
|
| +++ b/android_webview/native/aw_contents.h
|
| @@ -10,22 +10,15 @@
|
|
|
| #include "android_webview/browser/find_helper.h"
|
| #include "android_webview/browser/renderer_host/aw_render_view_host_ext.h"
|
| -#include "android_webview/public/browser/draw_gl.h"
|
| +#include "android_webview/browser/view_renderer.h"
|
| #include "base/android/scoped_java_ref.h"
|
| #include "base/android/jni_helper.h"
|
| #include "base/memory/scoped_ptr.h"
|
| -#include "content/public/browser/android/compositor.h"
|
| #include "content/public/browser/javascript_dialogs.h"
|
|
|
| -typedef void* EGLContext;
|
| class TabContents;
|
|
|
| -namespace cc {
|
| -class Layer;
|
| -}
|
| -
|
| namespace content {
|
| -class Compositor;
|
| class WebContents;
|
| }
|
|
|
| @@ -39,8 +32,7 @@ class AwWebContentsDelegate;
|
| // WebView functionality; analogous to chrome's TabContents, but with a
|
| // level of indirection provided by the AwContentsContainer abstraction.
|
| class AwContents : public FindHelper::Listener,
|
| - public content::Compositor::Client,
|
| - public AwRenderViewHostExt::Client {
|
| + public ViewRenderer::Client {
|
| public:
|
| // Returns the AwContents instance associated with |web_contents|, or NULL.
|
| static AwContents* FromWebContents(content::WebContents* web_contents);
|
| @@ -50,9 +42,6 @@ class AwContents : public FindHelper::Listener,
|
| jobject web_contents_delegate);
|
| virtual ~AwContents();
|
|
|
| - void DrawGL(AwDrawGLInfo* draw_info);
|
| - bool DrawSW(JNIEnv* env, jobject obj, jobject canvas);
|
| -
|
| void RunJavaScriptDialog(
|
| content::JavaScriptMessageType message_type,
|
| const GURL& origin_url,
|
| @@ -98,9 +87,23 @@ class AwContents : public FindHelper::Listener,
|
| base::android::ScopedJavaLocalRef<jbyteArray> GetOpaqueState(
|
| JNIEnv* env, jobject obj);
|
| jboolean RestoreFromOpaqueState(JNIEnv* env, jobject obj, jbyteArray state);
|
| + void FocusFirstNode(JNIEnv* env, jobject obj);
|
| + bool DrawSW(JNIEnv* env,
|
| + jobject obj,
|
| + jobject canvas,
|
| + jint clip_x,
|
| + jint clip_y,
|
| + jint clip_w,
|
| + jint clip_h);
|
| void SetScrollForHWFrame(JNIEnv* env, jobject obj,
|
| int scroll_x, int scroll_y);
|
| - void FocusFirstNode(JNIEnv* env, jobject obj);
|
| + jint GetAwDrawGLViewContext(JNIEnv* env, jobject obj);
|
| + base::android::ScopedJavaLocalRef<jobject> CapturePicture(JNIEnv* env,
|
| + jobject obj);
|
| + void EnableOnNewPicture(JNIEnv* env,
|
| + jobject obj,
|
| + jboolean enabled,
|
| + jboolean invalidation_only);
|
|
|
| // Geolocation API support
|
| void OnGeolocationShowPrompt(int render_process_id,
|
| @@ -114,8 +117,6 @@ class AwContents : public FindHelper::Listener,
|
| void FindAllAsync(JNIEnv* env, jobject obj, jstring search_string);
|
| void FindNext(JNIEnv* env, jobject obj, jboolean forward);
|
| void ClearMatches(JNIEnv* env, jobject obj);
|
| - void ClearCache(JNIEnv* env, jobject obj, jboolean include_disk_files);
|
| -
|
| FindHelper* GetFindHelper();
|
|
|
| // FindHelper::Listener implementation.
|
| @@ -123,22 +124,17 @@ class AwContents : public FindHelper::Listener,
|
| int match_count,
|
| bool finished) OVERRIDE;
|
|
|
| - // content::Compositor::Client implementation.
|
| - virtual void ScheduleComposite() OVERRIDE;
|
| - virtual void OnSwapBuffersCompleted() OVERRIDE;
|
| + // ViewRenderer::Client implementation.
|
| + virtual void Invalidate() OVERRIDE;
|
| + virtual void OnNewPicture(
|
| + base::android::ScopedJavaLocalRef<jobject> picture) OVERRIDE;
|
|
|
| + void ClearCache(JNIEnv* env, jobject obj, jboolean include_disk_files);
|
| void SetPendingWebContentsForPopup(scoped_ptr<content::WebContents> pending);
|
| jint ReleasePopupWebContents(JNIEnv* env, jobject obj);
|
|
|
| - // AwRenderViewHostExt::Client implementation.
|
| - virtual void OnPictureUpdated(int process_id, int render_view_id) OVERRIDE;
|
| -
|
| private:
|
| - void Invalidate();
|
| void SetWebContents(content::WebContents* web_contents);
|
| - void SetCompositorVisibility(bool visible);
|
| - void ResetCompositor();
|
| - void AttachLayerTree();
|
|
|
| JavaObjectWeakGlobalRef java_ref_;
|
| scoped_ptr<content::WebContents> web_contents_;
|
| @@ -146,21 +142,7 @@ class AwContents : public FindHelper::Listener,
|
| scoped_ptr<AwRenderViewHostExt> render_view_host_ext_;
|
| scoped_ptr<FindHelper> find_helper_;
|
| scoped_ptr<content::WebContents> pending_contents_;
|
| -
|
| - // Compositor-specific state.
|
| - scoped_ptr<content::Compositor> compositor_;
|
| - scoped_refptr<cc::Layer> scissor_clip_layer_;
|
| - scoped_refptr<cc::Layer> transform_layer_;
|
| - scoped_refptr<cc::Layer> view_clip_layer_;
|
| - gfx::Point hw_rendering_scroll_;
|
| - gfx::Size view_size_;
|
| - bool view_visible_;
|
| - bool compositor_visible_;
|
| - bool is_composite_pending_;
|
| -
|
| - // Used only for detecting Android View System context changes.
|
| - // Not to be used between draw calls.
|
| - EGLContext last_frame_context_;
|
| + scoped_ptr<ViewRenderer> view_renderer_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(AwContents);
|
| };
|
|
|