| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 ANDROID_WEBVIEW_RENDERER_AW_RENDER_VIEW_EXT_H_ | 5 #ifndef ANDROID_WEBVIEW_RENDERER_AW_RENDER_VIEW_EXT_H_ |
| 6 #define ANDROID_WEBVIEW_RENDERER_AW_RENDER_VIEW_EXT_H_ | 6 #define ANDROID_WEBVIEW_RENDERER_AW_RENDER_VIEW_EXT_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/timer/timer.h" |
| 10 #include "content/public/renderer/render_view_observer.h" | 11 #include "content/public/renderer/render_view_observer.h" |
| 11 #include "third_party/WebKit/public/web/WebPermissionClient.h" | 12 #include "third_party/WebKit/public/web/WebPermissionClient.h" |
| 12 #include "third_party/skia/include/core/SkColor.h" | 13 #include "third_party/skia/include/core/SkColor.h" |
| 13 #include "ui/gfx/size.h" | 14 #include "ui/gfx/size.h" |
| 14 | 15 |
| 15 namespace WebKit { | 16 namespace WebKit { |
| 16 | 17 |
| 17 class WebNode; | 18 class WebNode; |
| 18 class WebURL; | 19 class WebURL; |
| 19 | 20 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 32 private: | 33 private: |
| 33 AwRenderViewExt(content::RenderView* render_view); | 34 AwRenderViewExt(content::RenderView* render_view); |
| 34 virtual ~AwRenderViewExt(); | 35 virtual ~AwRenderViewExt(); |
| 35 | 36 |
| 36 // RenderView::Observer: | 37 // RenderView::Observer: |
| 37 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 38 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
| 38 virtual void DidCommitProvisionalLoad(WebKit::WebFrame* frame, | 39 virtual void DidCommitProvisionalLoad(WebKit::WebFrame* frame, |
| 39 bool is_new_navigation) OVERRIDE; | 40 bool is_new_navigation) OVERRIDE; |
| 40 virtual void FocusedNodeChanged(const WebKit::WebNode& node) OVERRIDE; | 41 virtual void FocusedNodeChanged(const WebKit::WebNode& node) OVERRIDE; |
| 41 virtual void DidCommitCompositorFrame() OVERRIDE; | 42 virtual void DidCommitCompositorFrame() OVERRIDE; |
| 43 virtual void DidUpdateLayout() OVERRIDE; |
| 42 virtual void Navigate(const GURL& url) OVERRIDE; | 44 virtual void Navigate(const GURL& url) OVERRIDE; |
| 43 | 45 |
| 44 void OnDocumentHasImagesRequest(int id); | 46 void OnDocumentHasImagesRequest(int id); |
| 45 | 47 |
| 46 void OnDoHitTest(int view_x, int view_y); | 48 void OnDoHitTest(int view_x, int view_y); |
| 47 | 49 |
| 48 void OnSetTextZoomLevel(double zoom_level); | 50 void OnSetTextZoomLevel(double zoom_level); |
| 49 | 51 |
| 50 void OnResetScrollAndScaleState(); | 52 void OnResetScrollAndScaleState(); |
| 51 | 53 |
| 52 void OnSetInitialPageScale(double page_scale_factor); | 54 void OnSetInitialPageScale(double page_scale_factor); |
| 53 | 55 |
| 54 void OnSetFixedLayoutSize(const gfx::Size& size); | 56 void OnSetFixedLayoutSize(const gfx::Size& size); |
| 55 | 57 |
| 56 void OnSetBackgroundColor(SkColor c); | 58 void OnSetBackgroundColor(SkColor c); |
| 57 | 59 |
| 58 void UpdatePageScaleFactor(); | 60 void UpdatePageScaleFactor(); |
| 59 | 61 |
| 62 void CheckContentsSize(); |
| 63 |
| 60 // WebKit::WebPermissionClient implementation. | 64 // WebKit::WebPermissionClient implementation. |
| 61 virtual bool allowDisplayingInsecureContent( | 65 virtual bool allowDisplayingInsecureContent( |
| 62 WebKit::WebFrame* frame, | 66 WebKit::WebFrame* frame, |
| 63 bool enabled_per_settings, | 67 bool enabled_per_settings, |
| 64 const WebKit::WebSecurityOrigin& origin, | 68 const WebKit::WebSecurityOrigin& origin, |
| 65 const WebKit::WebURL& url) OVERRIDE; | 69 const WebKit::WebURL& url) OVERRIDE; |
| 66 virtual bool allowRunningInsecureContent( | 70 virtual bool allowRunningInsecureContent( |
| 67 WebKit::WebFrame* frame, | 71 WebKit::WebFrame* frame, |
| 68 bool enabled_per_settings, | 72 bool enabled_per_settings, |
| 69 const WebKit::WebSecurityOrigin& origin, | 73 const WebKit::WebSecurityOrigin& origin, |
| 70 const WebKit::WebURL& url) OVERRIDE; | 74 const WebKit::WebURL& url) OVERRIDE; |
| 71 | 75 |
| 72 bool capture_picture_enabled_; | 76 bool capture_picture_enabled_; |
| 73 | 77 |
| 74 float page_scale_factor_; | 78 float page_scale_factor_; |
| 75 | 79 |
| 80 gfx::Size last_sent_contents_size_; |
| 81 base::OneShotTimer<AwRenderViewExt> check_contents_size_timer_; |
| 82 |
| 76 DISALLOW_COPY_AND_ASSIGN(AwRenderViewExt); | 83 DISALLOW_COPY_AND_ASSIGN(AwRenderViewExt); |
| 77 }; | 84 }; |
| 78 | 85 |
| 79 } // namespace android_webview | 86 } // namespace android_webview |
| 80 | 87 |
| 81 #endif // ANDROID_WEBVIEW_RENDERER_AW_RENDER_VIEW_EXT_H_ | 88 #endif // ANDROID_WEBVIEW_RENDERER_AW_RENDER_VIEW_EXT_H_ |
| OLD | NEW |