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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 // Sets the zoom level for text only. Used in layout modes other than | 53 // Sets the zoom level for text only. Used in layout modes other than |
54 // Text Autosizing. | 54 // Text Autosizing. |
55 void SetTextZoomLevel(double level); | 55 void SetTextZoomLevel(double level); |
56 | 56 |
| 57 void ResetScrollAndScaleState(); |
| 58 |
57 private: | 59 private: |
58 // content::WebContentsObserver implementation. | 60 // content::WebContentsObserver implementation. |
59 virtual void RenderViewGone(base::TerminationStatus status) OVERRIDE; | 61 virtual void RenderViewGone(base::TerminationStatus status) OVERRIDE; |
60 virtual void DidNavigateAnyFrame( | 62 virtual void DidNavigateAnyFrame( |
61 const content::LoadCommittedDetails& details, | 63 const content::LoadCommittedDetails& details, |
62 const content::FrameNavigateParams& params) OVERRIDE; | 64 const content::FrameNavigateParams& params) OVERRIDE; |
63 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 65 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
64 | 66 |
65 void OnDocumentHasImagesResponse(int msg_id, bool has_images); | 67 void OnDocumentHasImagesResponse(int msg_id, bool has_images); |
66 void OnUpdateHitTestData(const AwHitTestData& hit_test_data); | 68 void OnUpdateHitTestData(const AwHitTestData& hit_test_data); |
67 void OnPictureUpdated(); | 69 void OnPictureUpdated(); |
68 | 70 |
69 bool IsRenderViewReady() const; | 71 bool IsRenderViewReady() const; |
70 | 72 |
71 std::map<int, DocumentHasImagesResult> pending_document_has_images_requests_; | 73 std::map<int, DocumentHasImagesResult> pending_document_has_images_requests_; |
72 | 74 |
73 // Master copy of hit test data on the browser side. This is updated | 75 // Master copy of hit test data on the browser side. This is updated |
74 // as a result of DoHitTest called explicitly or when the FocusedNodeChanged | 76 // as a result of DoHitTest called explicitly or when the FocusedNodeChanged |
75 // is called in AwRenderViewExt. | 77 // is called in AwRenderViewExt. |
76 AwHitTestData last_hit_test_data_; | 78 AwHitTestData last_hit_test_data_; |
77 | 79 |
78 bool has_new_hit_test_data_; | 80 bool has_new_hit_test_data_; |
79 | 81 |
80 DISALLOW_COPY_AND_ASSIGN(AwRenderViewHostExt); | 82 DISALLOW_COPY_AND_ASSIGN(AwRenderViewHostExt); |
81 }; | 83 }; |
82 | 84 |
83 } // namespace android_webview | 85 } // namespace android_webview |
84 | 86 |
85 #endif // ANDROID_WEBVIEW_BROWSER_RENDER_HOST_RENDER_VIEW_HOST_EXT_H_ | 87 #endif // ANDROID_WEBVIEW_BROWSER_RENDER_HOST_RENDER_VIEW_HOST_EXT_H_ |
OLD | NEW |