| OLD | NEW |
| 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/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 1248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1259 return; | 1259 return; |
| 1260 | 1260 |
| 1261 if (overscroll_effect_->OnOverscrolled(content_view_core_->GetLayer(), | 1261 if (overscroll_effect_->OnOverscrolled(content_view_core_->GetLayer(), |
| 1262 base::TimeTicks::Now(), | 1262 base::TimeTicks::Now(), |
| 1263 accumulated_overscroll, | 1263 accumulated_overscroll, |
| 1264 current_fling_velocity)) { | 1264 current_fling_velocity)) { |
| 1265 content_view_core_->SetNeedsAnimate(); | 1265 content_view_core_->SetNeedsAnimate(); |
| 1266 } | 1266 } |
| 1267 } | 1267 } |
| 1268 | 1268 |
| 1269 void RenderWidgetHostViewAndroid::DidStopFlinging() { |
| 1270 if (content_view_core_) |
| 1271 content_view_core_->DidStopFlinging(); |
| 1272 } |
| 1273 |
| 1269 void RenderWidgetHostViewAndroid::SetContentViewCore( | 1274 void RenderWidgetHostViewAndroid::SetContentViewCore( |
| 1270 ContentViewCoreImpl* content_view_core) { | 1275 ContentViewCoreImpl* content_view_core) { |
| 1271 RunAckCallbacks(); | 1276 RunAckCallbacks(); |
| 1272 | 1277 |
| 1273 if (are_layers_attached_) | 1278 if (are_layers_attached_) |
| 1274 RemoveLayers(); | 1279 RemoveLayers(); |
| 1275 | 1280 |
| 1276 if (content_view_core_ && !using_synchronous_compositor_) | 1281 if (content_view_core_ && !using_synchronous_compositor_) |
| 1277 content_view_core_->GetWindowAndroid()->RemoveObserver(this); | 1282 content_view_core_->GetWindowAndroid()->RemoveObserver(this); |
| 1278 | 1283 |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1420 // RenderWidgetHostView, public: | 1425 // RenderWidgetHostView, public: |
| 1421 | 1426 |
| 1422 // static | 1427 // static |
| 1423 RenderWidgetHostView* | 1428 RenderWidgetHostView* |
| 1424 RenderWidgetHostView::CreateViewForWidget(RenderWidgetHost* widget) { | 1429 RenderWidgetHostView::CreateViewForWidget(RenderWidgetHost* widget) { |
| 1425 RenderWidgetHostImpl* rwhi = RenderWidgetHostImpl::From(widget); | 1430 RenderWidgetHostImpl* rwhi = RenderWidgetHostImpl::From(widget); |
| 1426 return new RenderWidgetHostViewAndroid(rwhi, NULL); | 1431 return new RenderWidgetHostViewAndroid(rwhi, NULL); |
| 1427 } | 1432 } |
| 1428 | 1433 |
| 1429 } // namespace content | 1434 } // namespace content |
| OLD | NEW |