| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/browser_view_renderer.h" | 5 #include "android_webview/browser/browser_view_renderer.h" |
| 6 | 6 |
| 7 #include "android_webview/browser/browser_view_renderer_client.h" | 7 #include "android_webview/browser/browser_view_renderer_client.h" |
| 8 #include "android_webview/browser/child_frame.h" | 8 #include "android_webview/browser/child_frame.h" |
| 9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 553 DCHECK_LE(scroll_offset.x(), max_offset.x()); | 553 DCHECK_LE(scroll_offset.x(), max_offset.x()); |
| 554 DCHECK_LE(scroll_offset.y(), max_offset.y()); | 554 DCHECK_LE(scroll_offset.y(), max_offset.y()); |
| 555 | 555 |
| 556 client_->ScrollContainerViewTo(scroll_offset); | 556 client_->ScrollContainerViewTo(scroll_offset); |
| 557 } | 557 } |
| 558 | 558 |
| 559 gfx::Vector2dF BrowserViewRenderer::GetTotalRootLayerScrollOffset() { | 559 gfx::Vector2dF BrowserViewRenderer::GetTotalRootLayerScrollOffset() { |
| 560 return scroll_offset_dip_; | 560 return scroll_offset_dip_; |
| 561 } | 561 } |
| 562 | 562 |
| 563 bool BrowserViewRenderer::IsExternalScrollActive() const { | |
| 564 return client_->IsSmoothScrollingActive(); | |
| 565 } | |
| 566 | |
| 567 void BrowserViewRenderer::UpdateRootLayerState( | 563 void BrowserViewRenderer::UpdateRootLayerState( |
| 568 const gfx::Vector2dF& total_scroll_offset_dip, | 564 const gfx::Vector2dF& total_scroll_offset_dip, |
| 569 const gfx::Vector2dF& max_scroll_offset_dip, | 565 const gfx::Vector2dF& max_scroll_offset_dip, |
| 570 const gfx::SizeF& scrollable_size_dip, | 566 const gfx::SizeF& scrollable_size_dip, |
| 571 float page_scale_factor, | 567 float page_scale_factor, |
| 572 float min_page_scale_factor, | 568 float min_page_scale_factor, |
| 573 float max_page_scale_factor) { | 569 float max_page_scale_factor) { |
| 574 TRACE_EVENT_INSTANT1( | 570 TRACE_EVENT_INSTANT1( |
| 575 "android_webview", | 571 "android_webview", |
| 576 "BrowserViewRenderer::UpdateRootLayerState", | 572 "BrowserViewRenderer::UpdateRootLayerState", |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 748 base::StringAppendF(&str, | 744 base::StringAppendF(&str, |
| 749 "overscroll_rounding_error_: %s ", | 745 "overscroll_rounding_error_: %s ", |
| 750 overscroll_rounding_error_.ToString().c_str()); | 746 overscroll_rounding_error_.ToString().c_str()); |
| 751 base::StringAppendF( | 747 base::StringAppendF( |
| 752 &str, "on_new_picture_enable: %d ", on_new_picture_enable_); | 748 &str, "on_new_picture_enable: %d ", on_new_picture_enable_); |
| 753 base::StringAppendF(&str, "clear_view: %d ", clear_view_); | 749 base::StringAppendF(&str, "clear_view: %d ", clear_view_); |
| 754 return str; | 750 return str; |
| 755 } | 751 } |
| 756 | 752 |
| 757 } // namespace android_webview | 753 } // namespace android_webview |
| OLD | NEW |