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::RectF touch_area) { |
61 DCHECK(CalledOnValidThread()); | 61 DCHECK(CalledOnValidThread()); |
62 Send(new AwViewMsg_DoHitTest(web_contents()->GetRoutingID(), | 62 Send(new AwViewMsg_DoHitTest(web_contents()->GetRoutingID(), touch_area)); |
63 view_x, | |
64 view_y)); | |
65 } | 63 } |
66 | 64 |
67 const AwHitTestData& AwRenderViewHostExt::GetLastHitTestData() const { | 65 const AwHitTestData& AwRenderViewHostExt::GetLastHitTestData() const { |
68 DCHECK(CalledOnValidThread()); | 66 DCHECK(CalledOnValidThread()); |
69 return last_hit_test_data_; | 67 return last_hit_test_data_; |
70 } | 68 } |
71 | 69 |
72 void AwRenderViewHostExt::SetTextZoomFactor(float factor) { | 70 void AwRenderViewHostExt::SetTextZoomFactor(float factor) { |
73 DCHECK(CalledOnValidThread()); | 71 DCHECK(CalledOnValidThread()); |
74 Send(new AwViewMsg_SetTextZoomFactor(web_contents()->GetRoutingID(), factor)); | 72 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) { | 163 void AwRenderViewHostExt::OnPageScaleFactorChanged(float page_scale_factor) { |
166 client_->OnWebLayoutPageScaleFactorChanged(page_scale_factor); | 164 client_->OnWebLayoutPageScaleFactorChanged(page_scale_factor); |
167 } | 165 } |
168 | 166 |
169 void AwRenderViewHostExt::OnContentsSizeChanged( | 167 void AwRenderViewHostExt::OnContentsSizeChanged( |
170 const gfx::Size& contents_size) { | 168 const gfx::Size& contents_size) { |
171 client_->OnWebLayoutContentsSizeChanged(contents_size); | 169 client_->OnWebLayoutContentsSizeChanged(contents_size); |
172 } | 170 } |
173 | 171 |
174 } // namespace android_webview | 172 } // namespace android_webview |
OLD | NEW |