| 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::DidStartFlinging() { |
| 1270 if (content_view_core_) |
| 1271 content_view_core_->DidStartFlinging(); |
| 1272 } |
| 1273 |
| 1274 void RenderWidgetHostViewAndroid::DidStopFlinging() { |
| 1275 if (content_view_core_) |
| 1276 content_view_core_->DidStopFlinging(); |
| 1277 } |
| 1278 |
| 1269 void RenderWidgetHostViewAndroid::SetContentViewCore( | 1279 void RenderWidgetHostViewAndroid::SetContentViewCore( |
| 1270 ContentViewCoreImpl* content_view_core) { | 1280 ContentViewCoreImpl* content_view_core) { |
| 1271 RunAckCallbacks(); | 1281 RunAckCallbacks(); |
| 1272 | 1282 |
| 1273 if (are_layers_attached_) | 1283 if (are_layers_attached_) |
| 1274 RemoveLayers(); | 1284 RemoveLayers(); |
| 1275 | 1285 |
| 1276 if (content_view_core_ && !using_synchronous_compositor_) | 1286 if (content_view_core_ && !using_synchronous_compositor_) |
| 1277 content_view_core_->GetWindowAndroid()->RemoveObserver(this); | 1287 content_view_core_->GetWindowAndroid()->RemoveObserver(this); |
| 1278 | 1288 |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1420 // RenderWidgetHostView, public: | 1430 // RenderWidgetHostView, public: |
| 1421 | 1431 |
| 1422 // static | 1432 // static |
| 1423 RenderWidgetHostView* | 1433 RenderWidgetHostView* |
| 1424 RenderWidgetHostView::CreateViewForWidget(RenderWidgetHost* widget) { | 1434 RenderWidgetHostView::CreateViewForWidget(RenderWidgetHost* widget) { |
| 1425 RenderWidgetHostImpl* rwhi = RenderWidgetHostImpl::From(widget); | 1435 RenderWidgetHostImpl* rwhi = RenderWidgetHostImpl::From(widget); |
| 1426 return new RenderWidgetHostViewAndroid(rwhi, NULL); | 1436 return new RenderWidgetHostViewAndroid(rwhi, NULL); |
| 1427 } | 1437 } |
| 1428 | 1438 |
| 1429 } // namespace content | 1439 } // namespace content |
| OLD | NEW |