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 #include "android_webview/browser/renderer_host/aw_render_view_host_ext.h" | 5 #include "android_webview/browser/renderer_host/aw_render_view_host_ext.h" |
6 | 6 |
7 #include "android_webview/browser/aw_browser_context.h" | 7 #include "android_webview/browser/aw_browser_context.h" |
8 #include "android_webview/browser/scoped_allow_wait_for_legacy_web_view_api.h" | 8 #include "android_webview/browser/scoped_allow_wait_for_legacy_web_view_api.h" |
9 #include "android_webview/common/render_view_messages.h" | 9 #include "android_webview/common/render_view_messages.h" |
10 #include "base/android/scoped_java_ref.h" | 10 #include "base/android/scoped_java_ref.h" |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 } | 50 } |
51 | 51 |
52 bool AwRenderViewHostExt::HasNewHitTestData() const { | 52 bool AwRenderViewHostExt::HasNewHitTestData() const { |
53 return has_new_hit_test_data_; | 53 return has_new_hit_test_data_; |
54 } | 54 } |
55 | 55 |
56 void AwRenderViewHostExt::MarkHitTestDataRead() { | 56 void AwRenderViewHostExt::MarkHitTestDataRead() { |
57 has_new_hit_test_data_ = false; | 57 has_new_hit_test_data_ = false; |
58 } | 58 } |
59 | 59 |
60 void AwRenderViewHostExt::RequestNewHitTestDataAt(int view_x, int view_y) { | 60 void AwRenderViewHostExt::RequestNewHitTestDataAt(gfx::PointF touch_center, |
| 61 gfx::SizeF touch_area) { |
61 DCHECK(CalledOnValidThread()); | 62 DCHECK(CalledOnValidThread()); |
62 Send(new AwViewMsg_DoHitTest(web_contents()->GetRoutingID(), | 63 Send(new AwViewMsg_DoHitTest( |
63 view_x, | 64 web_contents()->GetRoutingID(), touch_center, touch_area)); |
64 view_y)); | |
65 } | 65 } |
66 | 66 |
67 const AwHitTestData& AwRenderViewHostExt::GetLastHitTestData() const { | 67 const AwHitTestData& AwRenderViewHostExt::GetLastHitTestData() const { |
68 DCHECK(CalledOnValidThread()); | 68 DCHECK(CalledOnValidThread()); |
69 return last_hit_test_data_; | 69 return last_hit_test_data_; |
70 } | 70 } |
71 | 71 |
72 void AwRenderViewHostExt::SetTextZoomFactor(float factor) { | 72 void AwRenderViewHostExt::SetTextZoomFactor(float factor) { |
73 DCHECK(CalledOnValidThread()); | 73 DCHECK(CalledOnValidThread()); |
74 Send(new AwViewMsg_SetTextZoomFactor(web_contents()->GetRoutingID(), factor)); | 74 Send(new AwViewMsg_SetTextZoomFactor(web_contents()->GetRoutingID(), factor)); |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 void AwRenderViewHostExt::OnPageScaleFactorChanged(float page_scale_factor) { | 165 void AwRenderViewHostExt::OnPageScaleFactorChanged(float page_scale_factor) { |
166 client_->OnWebLayoutPageScaleFactorChanged(page_scale_factor); | 166 client_->OnWebLayoutPageScaleFactorChanged(page_scale_factor); |
167 } | 167 } |
168 | 168 |
169 void AwRenderViewHostExt::OnContentsSizeChanged( | 169 void AwRenderViewHostExt::OnContentsSizeChanged( |
170 const gfx::Size& contents_size) { | 170 const gfx::Size& contents_size) { |
171 client_->OnWebLayoutContentsSizeChanged(contents_size); | 171 client_->OnWebLayoutContentsSizeChanged(contents_size); |
172 } | 172 } |
173 | 173 |
174 } // namespace android_webview | 174 } // namespace android_webview |
OLD | NEW |