| 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_0, |
| 63 float touch_major_1) { |
| 61 DCHECK(CalledOnValidThread()); | 64 DCHECK(CalledOnValidThread()); |
| 62 Send(new AwViewMsg_DoHitTest(web_contents()->GetRoutingID(), | 65 Send(new AwViewMsg_DoHitTest(web_contents()->GetRoutingID(), |
| 63 view_x, | 66 view_x, |
| 64 view_y)); | 67 view_y, |
| 68 touch_major_0, |
| 69 touch_major_1)); |
| 65 } | 70 } |
| 66 | 71 |
| 67 const AwHitTestData& AwRenderViewHostExt::GetLastHitTestData() const { | 72 const AwHitTestData& AwRenderViewHostExt::GetLastHitTestData() const { |
| 68 DCHECK(CalledOnValidThread()); | 73 DCHECK(CalledOnValidThread()); |
| 69 return last_hit_test_data_; | 74 return last_hit_test_data_; |
| 70 } | 75 } |
| 71 | 76 |
| 72 void AwRenderViewHostExt::SetTextZoomFactor(float factor) { | 77 void AwRenderViewHostExt::SetTextZoomFactor(float factor) { |
| 73 DCHECK(CalledOnValidThread()); | 78 DCHECK(CalledOnValidThread()); |
| 74 Send(new AwViewMsg_SetTextZoomFactor(web_contents()->GetRoutingID(), factor)); | 79 Send(new AwViewMsg_SetTextZoomFactor(web_contents()->GetRoutingID(), factor)); |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 void AwRenderViewHostExt::OnPageScaleFactorChanged(float page_scale_factor) { | 178 void AwRenderViewHostExt::OnPageScaleFactorChanged(float page_scale_factor) { |
| 174 client_->OnWebLayoutPageScaleFactorChanged(page_scale_factor); | 179 client_->OnWebLayoutPageScaleFactorChanged(page_scale_factor); |
| 175 } | 180 } |
| 176 | 181 |
| 177 void AwRenderViewHostExt::OnContentsSizeChanged( | 182 void AwRenderViewHostExt::OnContentsSizeChanged( |
| 178 const gfx::Size& contents_size) { | 183 const gfx::Size& contents_size) { |
| 179 client_->OnWebLayoutContentsSizeChanged(contents_size); | 184 client_->OnWebLayoutContentsSizeChanged(contents_size); |
| 180 } | 185 } |
| 181 | 186 |
| 182 } // namespace android_webview | 187 } // namespace android_webview |
| OLD | NEW |