#ifndef ANDROID_WEBVIEW_RENDERER_AW_RENDER_VIEW_EXT_H_
#define ANDROID_WEBVIEW_RENDERER_AW_RENDER_VIEW_EXT_H_
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "base/timer/timer.h"
#include "content/public/renderer/render_view_observer.h"
#include "third_party/skia/include/core/SkColor.h"
#include "ui/gfx/size.h"
namespace blink {
class WebNode;
class WebURL;
}
namespace android_webview {
class AwRenderViewExt : public content::RenderViewObserver {
public:
static void RenderViewCreated(content::RenderView* render_view);
private:
AwRenderViewExt(content::RenderView* render_view);
virtual ~AwRenderViewExt();
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
virtual void DidCommitProvisionalLoad(blink::WebFrame* frame,
bool is_new_navigation) OVERRIDE;
virtual void FocusedNodeChanged(const blink::WebNode& node) OVERRIDE;
virtual void DidCommitCompositorFrame() OVERRIDE;
virtual void DidUpdateLayout() OVERRIDE;
virtual void Navigate(const GURL& url) OVERRIDE;
void OnDocumentHasImagesRequest(int id);
void OnDoHitTest(int view_x, int view_y);
void OnSetTextZoomFactor(float zoom_factor);
void OnResetScrollAndScaleState();
void OnSetInitialPageScale(double page_scale_factor);
void OnSetFixedLayoutSize(const gfx::Size& size);
void OnSetBackgroundColor(SkColor c);
void UpdatePageScaleFactor();
void CheckContentsSize();
bool capture_picture_enabled_;
float page_scale_factor_;
gfx::Size last_sent_contents_size_;
base::OneShotTimer<AwRenderViewExt> check_contents_size_timer_;
DISALLOW_COPY_AND_ASSIGN(AwRenderViewExt);
};
}
#endif