Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(419)

Side by Side Diff: android_webview/browser/browser_view_renderer.cc

Issue 2263043002: android_webview: Let AwContents manage TouchHandleDrawable (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix build Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 <utility> 7 #include <utility>
8 8
9 #include "android_webview/browser/browser_view_renderer_client.h" 9 #include "android_webview/browser/browser_view_renderer_client.h"
10 #include "android_webview/browser/child_frame.h" 10 #include "android_webview/browser/child_frame.h"
(...skipping 682 matching lines...) Expand 10 before | Expand all | Expand 10 after
693 gfx::Vector2d rounded_overscroll_delta = gfx::ToRoundedVector2d( 693 gfx::Vector2d rounded_overscroll_delta = gfx::ToRoundedVector2d(
694 scaled_overscroll_delta + overscroll_rounding_error_); 694 scaled_overscroll_delta + overscroll_rounding_error_);
695 overscroll_rounding_error_ = 695 overscroll_rounding_error_ =
696 scaled_overscroll_delta - rounded_overscroll_delta; 696 scaled_overscroll_delta - rounded_overscroll_delta;
697 gfx::Vector2dF fling_velocity_pixels = 697 gfx::Vector2dF fling_velocity_pixels =
698 gfx::ScaleVector2d(current_fling_velocity, physical_pixel_scale); 698 gfx::ScaleVector2d(current_fling_velocity, physical_pixel_scale);
699 699
700 client_->DidOverscroll(rounded_overscroll_delta, fling_velocity_pixels); 700 client_->DidOverscroll(rounded_overscroll_delta, fling_velocity_pixels);
701 } 701 }
702 702
703 ui::TouchHandleDrawable* BrowserViewRenderer::CreateDrawable() {
704 return client_->CreateDrawable();
705 }
706
703 void BrowserViewRenderer::PostInvalidate( 707 void BrowserViewRenderer::PostInvalidate(
704 content::SynchronousCompositor* compositor) { 708 content::SynchronousCompositor* compositor) {
705 TRACE_EVENT_INSTANT0("android_webview", "BrowserViewRenderer::PostInvalidate", 709 TRACE_EVENT_INSTANT0("android_webview", "BrowserViewRenderer::PostInvalidate",
706 TRACE_EVENT_SCOPE_THREAD); 710 TRACE_EVENT_SCOPE_THREAD);
707 if (compositor != compositor_) 711 if (compositor != compositor_)
708 return; 712 return;
709 713
710 client_->PostInvalidate(); 714 client_->PostInvalidate();
711 } 715 }
712 716
(...skipping 19 matching lines...) Expand all
732 base::StringAppendF(&str, 736 base::StringAppendF(&str,
733 "overscroll_rounding_error_: %s ", 737 "overscroll_rounding_error_: %s ",
734 overscroll_rounding_error_.ToString().c_str()); 738 overscroll_rounding_error_.ToString().c_str());
735 base::StringAppendF( 739 base::StringAppendF(
736 &str, "on_new_picture_enable: %d ", on_new_picture_enable_); 740 &str, "on_new_picture_enable: %d ", on_new_picture_enable_);
737 base::StringAppendF(&str, "clear_view: %d ", clear_view_); 741 base::StringAppendF(&str, "clear_view: %d ", clear_view_);
738 return str; 742 return str;
739 } 743 }
740 744
741 } // namespace android_webview 745 } // namespace android_webview
OLDNEW
« no previous file with comments | « android_webview/browser/browser_view_renderer.h ('k') | android_webview/browser/browser_view_renderer_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698