Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(732)

Side by Side Diff: android_webview/renderer/aw_render_view_ext.h

Issue 11823027: [Android WebView] Implement the capture picture API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: removing any IPC DCHECKS. Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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_
OLDNEW
« no previous file with comments | « android_webview/public/browser/draw_sw.h ('k') | android_webview/renderer/aw_render_view_ext.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698