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

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

Issue 1102743002: OverscrollGlow for mainThread-{CHROMIUM CHANGES} (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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 "base/android/build_info.h" 9 #include "base/android/build_info.h"
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 } 395 }
396 396
397 397
398 bool RenderWidgetHostViewAndroid::OnMessageReceived( 398 bool RenderWidgetHostViewAndroid::OnMessageReceived(
399 const IPC::Message& message) { 399 const IPC::Message& message) {
400 bool handled = true; 400 bool handled = true;
401 IPC_BEGIN_MESSAGE_MAP(RenderWidgetHostViewAndroid, message) 401 IPC_BEGIN_MESSAGE_MAP(RenderWidgetHostViewAndroid, message)
402 IPC_MESSAGE_HANDLER(ViewHostMsg_StartContentIntent, OnStartContentIntent) 402 IPC_MESSAGE_HANDLER(ViewHostMsg_StartContentIntent, OnStartContentIntent)
403 IPC_MESSAGE_HANDLER(ViewHostMsg_DidChangeBodyBackgroundColor, 403 IPC_MESSAGE_HANDLER(ViewHostMsg_DidChangeBodyBackgroundColor,
404 OnDidChangeBodyBackgroundColor) 404 OnDidChangeBodyBackgroundColor)
405 IPC_MESSAGE_HANDLER(ViewHostMsg_DidOverScrollOnMainThread,
406 OnDidOverScrollOnMainThread)
405 IPC_MESSAGE_HANDLER(ViewHostMsg_SetNeedsBeginFrames, 407 IPC_MESSAGE_HANDLER(ViewHostMsg_SetNeedsBeginFrames,
406 OnSetNeedsBeginFrames) 408 OnSetNeedsBeginFrames)
407 IPC_MESSAGE_HANDLER(ViewHostMsg_TextInputStateChanged, 409 IPC_MESSAGE_HANDLER(ViewHostMsg_TextInputStateChanged,
408 OnTextInputStateChanged) 410 OnTextInputStateChanged)
409 IPC_MESSAGE_HANDLER(ViewHostMsg_SmartClipDataExtracted, 411 IPC_MESSAGE_HANDLER(ViewHostMsg_SmartClipDataExtracted,
410 OnSmartClipDataExtracted) 412 OnSmartClipDataExtracted)
411 IPC_MESSAGE_HANDLER(ViewHostMsg_ShowUnhandledTapUIIfNeeded, 413 IPC_MESSAGE_HANDLER(ViewHostMsg_ShowUnhandledTapUIIfNeeded,
412 OnShowUnhandledTapUIIfNeeded) 414 OnShowUnhandledTapUIIfNeeded)
413 IPC_MESSAGE_UNHANDLED(handled = false) 415 IPC_MESSAGE_UNHANDLED(handled = false)
414 IPC_END_MESSAGE_MAP() 416 IPC_END_MESSAGE_MAP()
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after
756 void RenderWidgetHostViewAndroid::OnDidChangeBodyBackgroundColor( 758 void RenderWidgetHostViewAndroid::OnDidChangeBodyBackgroundColor(
757 SkColor color) { 759 SkColor color) {
758 if (cached_background_color_ == color) 760 if (cached_background_color_ == color)
759 return; 761 return;
760 762
761 cached_background_color_ = color; 763 cached_background_color_ = color;
762 if (content_view_core_) 764 if (content_view_core_)
763 content_view_core_->OnBackgroundColorChanged(color); 765 content_view_core_->OnBackgroundColorChanged(color);
764 } 766 }
765 767
768 void RenderWidgetHostViewAndroid::OnDidOverScrollOnMainThread(
jdduke (slow) 2015/04/24 16:57:23 Looks like we don't make any distinctino between m
MuVen 2015/04/27 09:49:15 Done.
769 gfx::Vector2dF unused_delta,
770 gfx::Vector2dF accumalted_root_overscroll,
771 gfx::Vector2dF flingVelocity,
772 gfx::PointF event_point) {
773 DidOverscrollParams params;
774 params.accumulated_overscroll = accumalted_root_overscroll;
775 params.latest_overscroll_delta = unused_delta;
776 params.current_fling_velocity = flingVelocity;
777 params.causal_event_viewport_point = event_point;
778 DidOverscroll(params);
779 }
780
766 void RenderWidgetHostViewAndroid::OnSetNeedsBeginFrames(bool enabled) { 781 void RenderWidgetHostViewAndroid::OnSetNeedsBeginFrames(bool enabled) {
767 TRACE_EVENT1("cc", "RenderWidgetHostViewAndroid::OnSetNeedsBeginFrames", 782 TRACE_EVENT1("cc", "RenderWidgetHostViewAndroid::OnSetNeedsBeginFrames",
768 "enabled", enabled); 783 "enabled", enabled);
769 if (enabled) 784 if (enabled)
770 RequestVSyncUpdate(PERSISTENT_BEGIN_FRAME); 785 RequestVSyncUpdate(PERSISTENT_BEGIN_FRAME);
771 else 786 else
772 outstanding_vsync_requests_ &= ~PERSISTENT_BEGIN_FRAME; 787 outstanding_vsync_requests_ &= ~PERSISTENT_BEGIN_FRAME;
773 } 788 }
774 789
775 void RenderWidgetHostViewAndroid::OnStartContentIntent( 790 void RenderWidgetHostViewAndroid::OnStartContentIntent(
(...skipping 1323 matching lines...) Expand 10 before | Expand all | Expand 10 after
2099 results->orientationAngle = display.RotationAsDegree(); 2114 results->orientationAngle = display.RotationAsDegree();
2100 results->orientationType = 2115 results->orientationType =
2101 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display); 2116 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display);
2102 gfx::DeviceDisplayInfo info; 2117 gfx::DeviceDisplayInfo info;
2103 results->depth = info.GetBitsPerPixel(); 2118 results->depth = info.GetBitsPerPixel();
2104 results->depthPerComponent = info.GetBitsPerComponent(); 2119 results->depthPerComponent = info.GetBitsPerComponent();
2105 results->isMonochrome = (results->depthPerComponent == 0); 2120 results->isMonochrome = (results->depthPerComponent == 0);
2106 } 2121 }
2107 2122
2108 } // namespace content 2123 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698