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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_android.cc

Issue 2688113002: Make ViewRoot the top of the ViewAndroid tree (Closed)
Patch Set: comments Created 3 years, 10 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 (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 "content/browser/renderer_host/render_widget_host_view_android.h" 5 #include "content/browser/renderer_host/render_widget_host_view_android.h"
6 6
7 #include <android/bitmap.h> 7 #include <android/bitmap.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 795 matching lines...) Expand 10 before | Expand all | Expand 10 after
806 AddBeginFrameRequest(PERSISTENT_BEGIN_FRAME); 806 AddBeginFrameRequest(PERSISTENT_BEGIN_FRAME);
807 else 807 else
808 ClearBeginFrameRequest(PERSISTENT_BEGIN_FRAME); 808 ClearBeginFrameRequest(PERSISTENT_BEGIN_FRAME);
809 } 809 }
810 810
811 void RenderWidgetHostViewAndroid::OnStartContentIntent( 811 void RenderWidgetHostViewAndroid::OnStartContentIntent(
812 const GURL& content_url, bool is_main_frame) { 812 const GURL& content_url, bool is_main_frame) {
813 view_.StartContentIntent(content_url, is_main_frame); 813 view_.StartContentIntent(content_url, is_main_frame);
814 } 814 }
815 815
816 bool RenderWidgetHostViewAndroid::OnTouchEvent( 816 bool RenderWidgetHostViewAndroid::OnTouchEvent(const ui::MotionEvent& event) {
817 const ui::MotionEvent& event) {
818 if (!host_) 817 if (!host_)
819 return false; 818 return false;
820 819
821 ComputeEventLatencyOSTouchHistograms(event); 820 ComputeEventLatencyOSTouchHistograms(event);
822 821
823 // If a browser-based widget consumes the touch event, it's critical that 822 // If a browser-based widget consumes the touch event, it's critical that
824 // touch event interception be disabled. This avoids issues with 823 // touch event interception be disabled. This avoids issues with
825 // double-handling for embedder-detected gestures like side swipe. 824 // double-handling for embedder-detected gestures like side swipe.
826 if (selection_controller_ && 825 if (selection_controller_ &&
827 selection_controller_->WillHandleTouchEvent(event)) { 826 selection_controller_->WillHandleTouchEvent(event)) {
(...skipping 1170 matching lines...) Expand 10 before | Expand all | Expand 10 after
1998 ui::WindowAndroidCompositor* compositor = window_android->GetCompositor(); 1997 ui::WindowAndroidCompositor* compositor = window_android->GetCompositor();
1999 if (!compositor) 1998 if (!compositor)
2000 return; 1999 return;
2001 2000
2002 overscroll_controller_ = base::MakeUnique<OverscrollControllerAndroid>( 2001 overscroll_controller_ = base::MakeUnique<OverscrollControllerAndroid>(
2003 overscroll_refresh_handler, compositor, 2002 overscroll_refresh_handler, compositor,
2004 ui::GetScaleFactorForNativeView(GetNativeView())); 2003 ui::GetScaleFactorForNativeView(GetNativeView()));
2005 } 2004 }
2006 2005
2007 } // namespace content 2006 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698