[email protected] | b165655 | 2014-06-09 19:59:38 | [diff] [blame] | 1 | // Copyright 2014 The Chromium Authors. All rights reserved. |
2 | // Use of this source code is governed by a BSD-style license that can be | ||||
3 | // found in the LICENSE file. | ||||
4 | |||||
5 | #ifndef ANDROID_WEBVIEW_RENDERER_AW_RENDER_FRAME_EXT_H_ | ||||
6 | #define ANDROID_WEBVIEW_RENDERER_AW_RENDER_FRAME_EXT_H_ | ||||
7 | |||||
avi | de7d5c2 | 2015-12-20 05:48:44 | [diff] [blame] | 8 | #include "base/macros.h" |
[email protected] | b165655 | 2014-06-09 19:59:38 | [diff] [blame] | 9 | #include "content/public/renderer/render_frame_observer.h" |
hush | 28fab0866 | 2016-01-14 18:42:51 | [diff] [blame] | 10 | #include "ui/gfx/geometry/point_f.h" |
11 | #include "ui/gfx/geometry/size.h" | ||||
12 | #include "ui/gfx/geometry/size_f.h" | ||||
avi | 0363eb92 | 2016-03-10 23:53:46 | [diff] [blame] | 13 | #include "url/origin.h" |
hush | 28fab0866 | 2016-01-14 18:42:51 | [diff] [blame] | 14 | |
15 | namespace blink { | ||||
16 | enum WebMeaningfulLayout; | ||||
lfg | caab514 | 2016-02-26 19:06:52 | [diff] [blame] | 17 | class WebFrameWidget; |
hush | 28fab0866 | 2016-01-14 18:42:51 | [diff] [blame] | 18 | class WebView; |
19 | } | ||||
[email protected] | b165655 | 2014-06-09 19:59:38 | [diff] [blame] | 20 | |
21 | namespace android_webview { | ||||
22 | |||||
23 | // Render process side of AwRenderViewHostExt, this provides cross-process | ||||
24 | // implementation of miscellaneous WebView functions that we need to poke | ||||
25 | // WebKit directly to implement (and that aren't needed in the chrome app). | ||||
26 | class AwRenderFrameExt : public content::RenderFrameObserver { | ||||
27 | public: | ||||
28 | AwRenderFrameExt(content::RenderFrame* render_frame); | ||||
29 | |||||
30 | private: | ||||
dcheng | 9f9f934 | 2015-02-04 01:50:17 | [diff] [blame] | 31 | ~AwRenderFrameExt() override; |
[email protected] | b165655 | 2014-06-09 19:59:38 | [diff] [blame] | 32 | |
hush | 28fab0866 | 2016-01-14 18:42:51 | [diff] [blame] | 33 | // RenderFrameObserver: |
mlamouri | 9ef14c2 | 2015-02-27 13:30:54 | [diff] [blame] | 34 | void DidCommitProvisionalLoad(bool is_new_navigation, |
35 | bool is_same_page_navigation) override; | ||||
hush | 28fab0866 | 2016-01-14 18:42:51 | [diff] [blame] | 36 | |
37 | bool OnMessageReceived(const IPC::Message& message) override; | ||||
38 | void FocusedNodeChanged(const blink::WebNode& node) override; | ||||
xjz | 694b50a9 | 2016-06-07 21:49:37 | [diff] [blame^] | 39 | void OnDestruct() override; |
hush | 28fab0866 | 2016-01-14 18:42:51 | [diff] [blame] | 40 | |
hush | d0baa9b | 2016-05-11 19:30:04 | [diff] [blame] | 41 | void OnDocumentHasImagesRequest(uint32_t id); |
hush | 28fab0866 | 2016-01-14 18:42:51 | [diff] [blame] | 42 | void OnDoHitTest(const gfx::PointF& touch_center, |
43 | const gfx::SizeF& touch_area); | ||||
44 | |||||
45 | void OnSetTextZoomFactor(float zoom_factor); | ||||
46 | |||||
47 | void OnResetScrollAndScaleState(); | ||||
48 | |||||
49 | void OnSetInitialPageScale(double page_scale_factor); | ||||
50 | |||||
51 | void OnSetBackgroundColor(SkColor c); | ||||
52 | |||||
jam | b81a4cf | 2016-02-09 05:20:36 | [diff] [blame] | 53 | void OnSmoothScroll(int target_x, int target_y, int duration_ms); |
hush | 28fab0866 | 2016-01-14 18:42:51 | [diff] [blame] | 54 | |
55 | blink::WebView* GetWebView(); | ||||
lfg | caab514 | 2016-02-26 19:06:52 | [diff] [blame] | 56 | blink::WebFrameWidget* GetWebFrameWidget(); |
hush | 28fab0866 | 2016-01-14 18:42:51 | [diff] [blame] | 57 | |
avi | 0363eb92 | 2016-03-10 23:53:46 | [diff] [blame] | 58 | url::Origin last_origin_; |
59 | |||||
[email protected] | b165655 | 2014-06-09 19:59:38 | [diff] [blame] | 60 | DISALLOW_COPY_AND_ASSIGN(AwRenderFrameExt); |
61 | }; | ||||
62 | |||||
63 | } | ||||
64 | |||||
65 | #endif // ANDROID_WEBVIEW_RENDERER_AW_RENDER_FRAME_EXT_H_ | ||||
66 | |||||
67 |