Android: Remove references to ContentViewCore in RWHVA
Now we got only a handful of references to ContentViewCore object left in RenderWidgetHostViewAndroid. All but 3 are all null checks trying to see if content_view_core_ is set to null or not, which is equivalent to checking if the native view (ViewAndroid) of ContentViewCore and its own native view form a view tree or not. This can be replaced simply by a boolean flag. The only 3 are significant (i.e. invoking methods of CVC) ContentViewCore::GetViewAndroid() - RWHVA may not have an access to the parent native view. It should be passed to RWHVA instead. ContentViewCore::RequestDisallowInterceptTouchEvent() - It goes up to Java container view to invoke android.view.View.requestDisallowInterceptTouchEvent. One more move from CVC to ViewAndroidDelegate... ContentViewCore::GetWindowAndroid() : same WindowAndroid (or null if not attached to view tree) can be obtained via ViewAndroid::GetWindowAndroid(). Bug: 626765 Change-Id: I80088c6a9ca2ca0047184ac77f84f08f64ff0acb Reviewed-on: https://chromium-review.googlesource.com/958646 Commit-Queue: Jinsuk Kim <jinsukkim@chromium.org> Reviewed-by:Bo <boliu@chromium.org> Cr-Commit-Position: refs/heads/master@{#542999}
Showing
This diff is collapsed.
Please register or sign in to comment