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

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

Issue 2179563003: Android: Remove ContentViewCore::GetLayer() from public interface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 1151 matching lines...) Expand 10 before | Expand all | Expand 10 after
1162 1162
1163 std::unique_ptr<ui::TouchHandleDrawable> 1163 std::unique_ptr<ui::TouchHandleDrawable>
1164 RenderWidgetHostViewAndroid::CreateDrawable() { 1164 RenderWidgetHostViewAndroid::CreateDrawable() {
1165 DCHECK(content_view_core_); 1165 DCHECK(content_view_core_);
1166 if (!using_browser_compositor_) 1166 if (!using_browser_compositor_)
1167 return PopupTouchHandleDrawable::Create( 1167 return PopupTouchHandleDrawable::Create(
1168 content_view_core_, ui::GetScaleFactorForNativeView(GetNativeView())); 1168 content_view_core_, ui::GetScaleFactorForNativeView(GetNativeView()));
1169 1169
1170 return std::unique_ptr< 1170 return std::unique_ptr<
1171 ui::TouchHandleDrawable>(new CompositedTouchHandleDrawable( 1171 ui::TouchHandleDrawable>(new CompositedTouchHandleDrawable(
1172 content_view_core_->GetLayer(), 1172 content_view_core_->GetViewAndroid()->GetLayer(),
1173 ui::GetScaleFactorForNativeView(GetNativeView()), 1173 ui::GetScaleFactorForNativeView(GetNativeView()),
1174 // Use the activity context (instead of the application context) to ensure 1174 // Use the activity context (instead of the application context) to ensure
1175 // proper handle theming. 1175 // proper handle theming.
1176 content_view_core_->GetContext().obj())); 1176 content_view_core_->GetContext().obj()));
1177 } 1177 }
1178 1178
1179 void RenderWidgetHostViewAndroid::SynchronousCopyContents( 1179 void RenderWidgetHostViewAndroid::SynchronousCopyContents(
1180 const gfx::Rect& src_subrect_in_pixel, 1180 const gfx::Rect& src_subrect_in_pixel,
1181 const gfx::Size& dst_size_in_pixel, 1181 const gfx::Size& dst_size_in_pixel,
1182 const ReadbackRequestCallback& callback, 1182 const ReadbackRequestCallback& callback,
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
1415 cc::BeginFrameArgs::Create(BEGINFRAME_FROM_HERE, frame_time, deadline, 1415 cc::BeginFrameArgs::Create(BEGINFRAME_FROM_HERE, frame_time, deadline,
1416 vsync_period, cc::BeginFrameArgs::NORMAL))); 1416 vsync_period, cc::BeginFrameArgs::NORMAL)));
1417 if (sync_compositor_) 1417 if (sync_compositor_)
1418 sync_compositor_->DidSendBeginFrame(); 1418 sync_compositor_->DidSendBeginFrame();
1419 } 1419 }
1420 1420
1421 bool RenderWidgetHostViewAndroid::Animate(base::TimeTicks frame_time) { 1421 bool RenderWidgetHostViewAndroid::Animate(base::TimeTicks frame_time) {
1422 bool needs_animate = false; 1422 bool needs_animate = false;
1423 if (overscroll_controller_) { 1423 if (overscroll_controller_) {
1424 needs_animate |= overscroll_controller_->Animate( 1424 needs_animate |= overscroll_controller_->Animate(
1425 frame_time, content_view_core_->GetLayer()); 1425 frame_time, content_view_core_->GetViewAndroid()->GetLayer());
1426 } 1426 }
1427 if (selection_controller_) 1427 if (selection_controller_)
1428 needs_animate |= selection_controller_->Animate(frame_time); 1428 needs_animate |= selection_controller_->Animate(frame_time);
1429 return needs_animate; 1429 return needs_animate;
1430 } 1430 }
1431 1431
1432 void RenderWidgetHostViewAndroid::RequestDisallowInterceptTouchEvent() { 1432 void RenderWidgetHostViewAndroid::RequestDisallowInterceptTouchEvent() {
1433 if (content_view_core_) 1433 if (content_view_core_)
1434 content_view_core_->RequestDisallowInterceptTouchEvent(); 1434 content_view_core_->RequestDisallowInterceptTouchEvent();
1435 } 1435 }
(...skipping 546 matching lines...) Expand 10 before | Expand all | Expand 10 after
1982 case ui::MotionEvent::ACTION_UP: 1982 case ui::MotionEvent::ACTION_UP:
1983 case ui::MotionEvent::ACTION_POINTER_UP: 1983 case ui::MotionEvent::ACTION_POINTER_UP:
1984 UMA_HISTOGRAM_CUSTOM_COUNTS("Event.Latency.OS.TOUCH_RELEASED", 1984 UMA_HISTOGRAM_CUSTOM_COUNTS("Event.Latency.OS.TOUCH_RELEASED",
1985 delta.InMicroseconds(), 1, 1000000, 50); 1985 delta.InMicroseconds(), 1, 1000000, 50);
1986 default: 1986 default:
1987 return; 1987 return;
1988 } 1988 }
1989 } 1989 }
1990 1990
1991 } // namespace content 1991 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698