| Index: android_webview/native/aw_contents.h
 | 
| diff --git a/android_webview/native/aw_contents.h b/android_webview/native/aw_contents.h
 | 
| index 78ababc8ab1c25a1a663de88a846141714e26579..889aaa875b6e9571450f267a12680dc115ba1ca2 100644
 | 
| --- a/android_webview/native/aw_contents.h
 | 
| +++ b/android_webview/native/aw_contents.h
 | 
| @@ -10,29 +10,20 @@
 | 
|  #include <string>
 | 
|  #include <utility>
 | 
|  
 | 
| +#include "android_webview/browser/browser_view_renderer.h"
 | 
|  #include "android_webview/browser/find_helper.h"
 | 
|  #include "android_webview/browser/icon_helper.h"
 | 
|  #include "android_webview/browser/renderer_host/aw_render_view_host_ext.h"
 | 
| -#include "android_webview/public/browser/draw_gl.h"
 | 
|  #include "base/android/scoped_java_ref.h"
 | 
|  #include "base/android/jni_helper.h"
 | 
|  #include "base/callback_forward.h"
 | 
|  #include "base/memory/scoped_ptr.h"
 | 
| -#include "content/public/browser/android/compositor.h"
 | 
|  #include "content/public/browser/javascript_dialog_manager.h"
 | 
| -#include "skia/ext/refptr.h"
 | 
| -#include "third_party/skia/include/core/SkPicture.h"
 | 
|  
 | 
| -typedef void* EGLContext;
 | 
|  class SkBitmap;
 | 
|  class TabContents;
 | 
|  
 | 
| -namespace cc {
 | 
| -class Layer;
 | 
| -}
 | 
| -
 | 
|  namespace content {
 | 
| -class Compositor;
 | 
|  class WebContents;
 | 
|  }
 | 
|  
 | 
| @@ -47,8 +38,7 @@ class AwWebContentsDelegate;
 | 
|  // level of indirection provided by the AwContentsContainer abstraction.
 | 
|  class AwContents : public FindHelper::Listener,
 | 
|                     public IconHelper::Listener,
 | 
| -                   public content::Compositor::Client,
 | 
| -                   public AwRenderViewHostExt::Client {
 | 
| +                   public BrowserViewRenderer::Client {
 | 
|   public:
 | 
|    enum OnNewPictureMode {
 | 
|      kOnNewPictureDisabled = 0,
 | 
| @@ -72,15 +62,6 @@ class AwContents : public FindHelper::Listener,
 | 
|      return render_view_host_ext_.get();
 | 
|    }
 | 
|  
 | 
| -  void DrawGL(AwDrawGLInfo* draw_info);
 | 
| -  bool DrawSW(JNIEnv* env,
 | 
| -              jobject obj,
 | 
| -              jobject canvas,
 | 
| -              jint clip_x,
 | 
| -              jint clip_y,
 | 
| -              jint clip_w,
 | 
| -              jint clip_h);
 | 
| -
 | 
|    void RunJavaScriptDialog(
 | 
|        content::JavaScriptMessageType message_type,
 | 
|        const GURL& origin_url,
 | 
| @@ -127,9 +108,17 @@ 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,
 | 
| @@ -150,8 +139,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.
 | 
| @@ -163,29 +150,17 @@ class AwContents : public FindHelper::Listener,
 | 
|    virtual void OnReceivedTouchIconUrl(const std::string& url,
 | 
|                                        const bool precomposed) OVERRIDE;
 | 
|  
 | 
| -  // content::Compositor::Client implementation.
 | 
| -  virtual void ScheduleComposite() OVERRIDE;
 | 
| -  virtual void OnSwapBuffersCompleted() OVERRIDE;
 | 
| +  // BrowserViewRenderer::Client implementation.
 | 
| +  virtual void Invalidate() OVERRIDE;
 | 
| +  virtual void OnNewPicture(
 | 
| +      const base::android::JavaRef<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;
 | 
| -
 | 
| -  // Returns the latest locally available picture if any.
 | 
| -  // If none is available will synchronously request the latest one
 | 
| -  // and block until the result is received.
 | 
| -  skia::RefPtr<SkPicture> GetLastCapturedPicture();
 | 
| -
 | 
|   private:
 | 
| -  void Invalidate();
 | 
|    void SetWebContents(content::WebContents* web_contents);
 | 
| -  void SetCompositorVisibility(bool visible);
 | 
| -  void ResetCompositor();
 | 
| -  void AttachLayerTree();
 | 
| -  bool RenderSW(SkCanvas* canvas);
 | 
| -  bool RenderPicture(SkCanvas* canvas);
 | 
|  
 | 
|    JavaObjectWeakGlobalRef java_ref_;
 | 
|    scoped_ptr<content::WebContents> web_contents_;
 | 
| @@ -194,6 +169,7 @@ class AwContents : public FindHelper::Listener,
 | 
|    scoped_ptr<FindHelper> find_helper_;
 | 
|    scoped_ptr<IconHelper> icon_helper_;
 | 
|    scoped_ptr<content::WebContents> pending_contents_;
 | 
| +  scoped_ptr<BrowserViewRenderer> browser_view_renderer_;
 | 
|  
 | 
|    // GURL is supplied by the content layer as requesting frame.
 | 
|    // Callback is supplied by the content layer, and is invoked with the result
 | 
| @@ -202,23 +178,6 @@ class AwContents : public FindHelper::Listener,
 | 
|    // The first element in the list is always the currently pending request.
 | 
|    std::list<OriginCallback> pending_geolocation_prompts_;
 | 
|  
 | 
| -  // 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_;
 | 
| -  float dpi_scale_;
 | 
| -  OnNewPictureMode on_new_picture_mode_;
 | 
| -
 | 
| -  // Used only for detecting Android View System context changes.
 | 
| -  // Not to be used between draw calls.
 | 
| -  EGLContext last_frame_context_;
 | 
| -
 | 
|    DISALLOW_COPY_AND_ASSIGN(AwContents);
 | 
|  };
 | 
|  
 | 
| 
 |