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/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 namespace android_webview { | 23 namespace android_webview { |
24 | 24 |
25 // Render process side of AwRenderViewHostExt, this provides cross-process | 25 // Render process side of AwRenderViewHostExt, this provides cross-process |
26 // implementation of miscellaneous WebView functions that we need to poke | 26 // implementation of miscellaneous WebView functions that we need to poke |
27 // WebKit directly to implement (and that aren't needed in the chrome app). | 27 // WebKit directly to implement (and that aren't needed in the chrome app). |
28 class AwRenderViewExt : public content::RenderViewObserver, | 28 class AwRenderViewExt : public content::RenderViewObserver, |
29 public WebKit::WebPermissionClient { | 29 public WebKit::WebPermissionClient { |
30 public: | 30 public: |
31 static void RenderViewCreated(content::RenderView* render_view); | 31 static void RenderViewCreated(content::RenderView* render_view); |
32 | 32 |
| 33 // Required to be public by IPC_MESSAGE_HANDLER for sync messages. |
| 34 using content::RenderViewObserver::Send; |
| 35 |
33 private: | 36 private: |
34 AwRenderViewExt(content::RenderView* render_view); | 37 AwRenderViewExt(content::RenderView* render_view); |
35 virtual ~AwRenderViewExt(); | 38 virtual ~AwRenderViewExt(); |
36 | 39 |
37 // RenderView::Observer: | 40 // RenderView::Observer: |
38 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 41 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
39 virtual void DidCommitProvisionalLoad(WebKit::WebFrame* frame, | 42 virtual void DidCommitProvisionalLoad(WebKit::WebFrame* frame, |
40 bool is_new_navigation) OVERRIDE; | 43 bool is_new_navigation) OVERRIDE; |
41 virtual void FocusedNodeChanged(const WebKit::WebNode& node) OVERRIDE; | 44 virtual void FocusedNodeChanged(const WebKit::WebNode& node) OVERRIDE; |
42 | 45 |
43 void OnDocumentHasImagesRequest(int id); | 46 void OnDocumentHasImagesRequest(int id); |
44 | 47 |
45 void OnDoHitTest(int view_x, int view_y); | 48 void OnDoHitTest(int view_x, int view_y); |
46 | 49 |
47 void OnEnableCapturePictureCallback(bool enable); | 50 void OnEnableCapturePictureCallback(bool enable); |
48 | 51 |
49 void OnPictureUpdate(skia::RefPtr<SkPicture> picture); | 52 void OnPictureUpdate(skia::RefPtr<SkPicture> picture); |
50 | 53 |
| 54 void OnCapturePictureSync(); |
| 55 |
51 // WebKit::WebPermissionClient implementation. | 56 // WebKit::WebPermissionClient implementation. |
52 virtual bool allowImage(WebKit::WebFrame* frame, | 57 virtual bool allowImage(WebKit::WebFrame* frame, |
53 bool enabledPerSettings, | 58 bool enabledPerSettings, |
54 const WebKit::WebURL& imageURL) OVERRIDE; | 59 const WebKit::WebURL& imageURL) OVERRIDE; |
55 | 60 |
56 DISALLOW_COPY_AND_ASSIGN(AwRenderViewExt); | 61 DISALLOW_COPY_AND_ASSIGN(AwRenderViewExt); |
57 }; | 62 }; |
58 | 63 |
59 } // namespace android_webview | 64 } // namespace android_webview |
60 | 65 |
61 #endif // ANDROID_WEBVIEW_RENDERER_AW_RENDER_VIEW_EXT_H_ | 66 #endif // ANDROID_WEBVIEW_RENDERER_AW_RENDER_VIEW_EXT_H_ |
OLD | NEW |