| 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_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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 void RequestNewHitTestDataAt(int view_x, int view_y); | 43 void RequestNewHitTestDataAt(int view_x, int view_y); |
| 44 | 44 |
| 45 // Optimization to avoid unnecessary Java object creation on hit test. | 45 // Optimization to avoid unnecessary Java object creation on hit test. |
| 46 bool HasNewHitTestData() const; | 46 bool HasNewHitTestData() const; |
| 47 void MarkHitTestDataRead(); | 47 void MarkHitTestDataRead(); |
| 48 | 48 |
| 49 // Return |last_hit_test_data_|. Note that this is unavoidably racy; | 49 // Return |last_hit_test_data_|. Note that this is unavoidably racy; |
| 50 // the corresponding public WebView API is as well. | 50 // the corresponding public WebView API is as well. |
| 51 const AwHitTestData& GetLastHitTestData() const; | 51 const AwHitTestData& GetLastHitTestData() const; |
| 52 | 52 |
| 53 // Enables receiving picture piles on every new frame. |
| 54 void EnableCapturePictureCallback(bool enabled); |
| 55 |
| 56 // Captures the latest available picture pile synchronously. |
| 57 void CapturePictureSync(); |
| 58 |
| 53 private: | 59 private: |
| 54 // content::WebContentsObserver implementation. | 60 // content::WebContentsObserver implementation. |
| 55 virtual void RenderViewGone(base::TerminationStatus status) OVERRIDE; | 61 virtual void RenderViewGone(base::TerminationStatus status) OVERRIDE; |
| 56 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 62 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
| 57 | 63 |
| 58 void OnDocumentHasImagesResponse(int msg_id, bool has_images); | 64 void OnDocumentHasImagesResponse(int msg_id, bool has_images); |
| 59 void OnUpdateHitTestData(const AwHitTestData& hit_test_data); | 65 void OnUpdateHitTestData(const AwHitTestData& hit_test_data); |
| 60 void OnPictureUpdated(); | 66 void OnPictureUpdated(); |
| 61 | 67 |
| 62 std::map<int, DocumentHasImagesResult> pending_document_has_images_requests_; | 68 std::map<int, DocumentHasImagesResult> pending_document_has_images_requests_; |
| 63 | 69 |
| 64 // Master copy of hit test data on the browser side. This is updated | 70 // Master copy of hit test data on the browser side. This is updated |
| 65 // as a result of DoHitTest called explicitly or when the FocusedNodeChanged | 71 // as a result of DoHitTest called explicitly or when the FocusedNodeChanged |
| 66 // is called in AwRenderViewExt. | 72 // is called in AwRenderViewExt. |
| 67 AwHitTestData last_hit_test_data_; | 73 AwHitTestData last_hit_test_data_; |
| 68 | 74 |
| 69 bool has_new_hit_test_data_; | 75 bool has_new_hit_test_data_; |
| 70 | 76 |
| 71 Client* client_; | 77 Client* client_; |
| 72 | 78 |
| 73 DISALLOW_COPY_AND_ASSIGN(AwRenderViewHostExt); | 79 DISALLOW_COPY_AND_ASSIGN(AwRenderViewHostExt); |
| 74 }; | 80 }; |
| 75 | 81 |
| 76 } // namespace android_webview | 82 } // namespace android_webview |
| 77 | 83 |
| 78 #endif // ANDROID_WEBVIEW_BROWSER_RENDER_HOST_RENDER_VIEW_HOST_EXT_H_ | 84 #endif // ANDROID_WEBVIEW_BROWSER_RENDER_HOST_RENDER_VIEW_HOST_EXT_H_ |
| OLD | NEW |