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