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

Side by Side Diff: android_webview/browser/renderer_host/aw_render_view_host_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
« no previous file with comments | « no previous file | android_webview/browser/renderer_host/aw_render_view_host_ext.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_BROWSER_RENDER_HOST_RENDER_VIEW_HOST_EXT_H_ 5 #ifndef ANDROID_WEBVIEW_BROWSER_RENDER_HOST_RENDER_VIEW_HOST_EXT_H_
6 #define ANDROID_WEBVIEW_BROWSER_RENDER_HOST_RENDER_VIEW_HOST_EXT_H_ 6 #define ANDROID_WEBVIEW_BROWSER_RENDER_HOST_RENDER_VIEW_HOST_EXT_H_
7 7
8 #include "content/public/browser/web_contents_observer.h" 8 #include "content/public/browser/web_contents_observer.h"
9 9
10 #include "android_webview/common/aw_hit_test_data.h" 10 #include "android_webview/common/aw_hit_test_data.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 void RequestNewHitTestDataAt(int view_x, int view_y); 50 void RequestNewHitTestDataAt(int view_x, int view_y);
51 51
52 // Optimization to avoid unnecessary Java object creation on hit test. 52 // Optimization to avoid unnecessary Java object creation on hit test.
53 bool HasNewHitTestData() const; 53 bool HasNewHitTestData() const;
54 void MarkHitTestDataRead(); 54 void MarkHitTestDataRead();
55 55
56 // Return |last_hit_test_data_|. Note that this is unavoidably racy; 56 // Return |last_hit_test_data_|. Note that this is unavoidably racy;
57 // the corresponding public WebView API is as well. 57 // the corresponding public WebView API is as well.
58 const AwHitTestData& GetLastHitTestData() const; 58 const AwHitTestData& GetLastHitTestData() const;
59 59
60 // Enables updating picture piles on every new frame.
61 // OnPictureUpdated is called when a new picture is available,
62 // stored by renderer id in RendererPictureMap.
63 void EnableCapturePictureCallback(bool enabled);
64
65 // Captures the latest available picture pile synchronously.
66 void CapturePictureSync();
67
60 private: 68 private:
61 // content::WebContentsObserver implementation. 69 // content::WebContentsObserver implementation.
62 virtual void RenderViewGone(base::TerminationStatus status) OVERRIDE; 70 virtual void RenderViewGone(base::TerminationStatus status) OVERRIDE;
63 virtual void DidNavigateAnyFrame( 71 virtual void DidNavigateAnyFrame(
64 const content::LoadCommittedDetails& details, 72 const content::LoadCommittedDetails& details,
65 const content::FrameNavigateParams& params) OVERRIDE; 73 const content::FrameNavigateParams& params) OVERRIDE;
66 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; 74 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
67 75
68 void OnDocumentHasImagesResponse(int msg_id, bool has_images); 76 void OnDocumentHasImagesResponse(int msg_id, bool has_images);
69 void OnUpdateHitTestData(const AwHitTestData& hit_test_data); 77 void OnUpdateHitTestData(const AwHitTestData& hit_test_data);
70 void OnPictureUpdated(); 78 void OnPictureUpdated();
71 79
80 bool IsRenderViewReady() const;
81
72 std::map<int, DocumentHasImagesResult> pending_document_has_images_requests_; 82 std::map<int, DocumentHasImagesResult> pending_document_has_images_requests_;
73 83
74 // Master copy of hit test data on the browser side. This is updated 84 // Master copy of hit test data on the browser side. This is updated
75 // as a result of DoHitTest called explicitly or when the FocusedNodeChanged 85 // as a result of DoHitTest called explicitly or when the FocusedNodeChanged
76 // is called in AwRenderViewExt. 86 // is called in AwRenderViewExt.
77 AwHitTestData last_hit_test_data_; 87 AwHitTestData last_hit_test_data_;
78 88
79 bool has_new_hit_test_data_; 89 bool has_new_hit_test_data_;
80 90
81 Client* client_; 91 Client* client_;
82 92
83 DISALLOW_COPY_AND_ASSIGN(AwRenderViewHostExt); 93 DISALLOW_COPY_AND_ASSIGN(AwRenderViewHostExt);
84 }; 94 };
85 95
86 } // namespace android_webview 96 } // namespace android_webview
87 97
88 #endif // ANDROID_WEBVIEW_BROWSER_RENDER_HOST_RENDER_VIEW_HOST_EXT_H_ 98 #endif // ANDROID_WEBVIEW_BROWSER_RENDER_HOST_RENDER_VIEW_HOST_EXT_H_
OLDNEW
« no previous file with comments | « no previous file | android_webview/browser/renderer_host/aw_render_view_host_ext.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698