| 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 <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 #include "ui/touch_selection/touch_selection_controller.h" | 92 #include "ui/touch_selection/touch_selection_controller.h" |
| 93 | 93 |
| 94 namespace content { | 94 namespace content { |
| 95 | 95 |
| 96 namespace { | 96 namespace { |
| 97 | 97 |
| 98 void SatisfyCallback(cc::SurfaceManager* manager, | 98 void SatisfyCallback(cc::SurfaceManager* manager, |
| 99 const cc::SurfaceSequence& sequence) { | 99 const cc::SurfaceSequence& sequence) { |
| 100 std::vector<uint32_t> sequences; | 100 std::vector<uint32_t> sequences; |
| 101 sequences.push_back(sequence.sequence); | 101 sequences.push_back(sequence.sequence); |
| 102 manager->DidSatisfySequences(sequence.id_namespace, &sequences); | 102 manager->DidSatisfySequences(sequence.client_id, &sequences); |
| 103 } | 103 } |
| 104 | 104 |
| 105 void RequireCallback(cc::SurfaceManager* manager, | 105 void RequireCallback(cc::SurfaceManager* manager, |
| 106 const cc::SurfaceId& id, | 106 const cc::SurfaceId& id, |
| 107 const cc::SurfaceSequence& sequence) { | 107 const cc::SurfaceSequence& sequence) { |
| 108 cc::Surface* surface = manager->GetSurfaceForId(id); | 108 cc::Surface* surface = manager->GetSurfaceForId(id); |
| 109 if (!surface) { | 109 if (!surface) { |
| 110 LOG(ERROR) << "Attempting to require callback on nonexistent surface"; | 110 LOG(ERROR) << "Attempting to require callback on nonexistent surface"; |
| 111 return; | 111 return; |
| 112 } | 112 } |
| (...skipping 1558 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1671 | 1671 |
| 1672 if (overscroll_controller_) | 1672 if (overscroll_controller_) |
| 1673 overscroll_controller_->OnOverscrolled(params); | 1673 overscroll_controller_->OnOverscrolled(params); |
| 1674 } | 1674 } |
| 1675 | 1675 |
| 1676 void RenderWidgetHostViewAndroid::DidStopFlinging() { | 1676 void RenderWidgetHostViewAndroid::DidStopFlinging() { |
| 1677 if (content_view_core_) | 1677 if (content_view_core_) |
| 1678 content_view_core_->DidStopFlinging(); | 1678 content_view_core_->DidStopFlinging(); |
| 1679 } | 1679 } |
| 1680 | 1680 |
| 1681 uint32_t RenderWidgetHostViewAndroid::GetSurfaceIdNamespace() { | 1681 uint32_t RenderWidgetHostViewAndroid::GetSurfaceClientId() { |
| 1682 if (id_allocator_) | 1682 if (id_allocator_) |
| 1683 return id_allocator_->id_namespace(); | 1683 return id_allocator_->client_id(); |
| 1684 return 0; | 1684 return 0; |
| 1685 } | 1685 } |
| 1686 | 1686 |
| 1687 void RenderWidgetHostViewAndroid::SetContentViewCore( | 1687 void RenderWidgetHostViewAndroid::SetContentViewCore( |
| 1688 ContentViewCoreImpl* content_view_core) { | 1688 ContentViewCoreImpl* content_view_core) { |
| 1689 DCHECK(!content_view_core || !content_view_core_ || | 1689 DCHECK(!content_view_core || !content_view_core_ || |
| 1690 (content_view_core_ == content_view_core)); | 1690 (content_view_core_ == content_view_core)); |
| 1691 RemoveLayers(); | 1691 RemoveLayers(); |
| 1692 StopObservingRootWindow(); | 1692 StopObservingRootWindow(); |
| 1693 | 1693 |
| (...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1993 case ui::MotionEvent::ACTION_UP: | 1993 case ui::MotionEvent::ACTION_UP: |
| 1994 case ui::MotionEvent::ACTION_POINTER_UP: | 1994 case ui::MotionEvent::ACTION_POINTER_UP: |
| 1995 UMA_HISTOGRAM_CUSTOM_COUNTS("Event.Latency.OS.TOUCH_RELEASED", | 1995 UMA_HISTOGRAM_CUSTOM_COUNTS("Event.Latency.OS.TOUCH_RELEASED", |
| 1996 delta.InMicroseconds(), 1, 1000000, 50); | 1996 delta.InMicroseconds(), 1, 1000000, 50); |
| 1997 default: | 1997 default: |
| 1998 return; | 1998 return; |
| 1999 } | 1999 } |
| 2000 } | 2000 } |
| 2001 | 2001 |
| 2002 } // namespace content | 2002 } // namespace content |
| OLD | NEW |