OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/android/in_process/synchronous_input_event_filter.h" | 5 #include "content/browser/android/in_process/synchronous_input_event_filter.h" |
6 | 6 |
7 #include "base/callback.h" | 7 #include "base/callback.h" |
8 #include "cc/input/input_handler.h" | 8 #include "cc/input/input_handler.h" |
9 #include "content/browser/android/in_process/synchronous_compositor_impl.h" | 9 #include "content/browser/android/in_process/synchronous_compositor_impl.h" |
10 #include "content/public/browser/browser_thread.h" | 10 #include "content/public/browser/browser_thread.h" |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 // The SynchronusCompositorImpl can be NULL if the WebContents that it's | 60 // The SynchronusCompositorImpl can be NULL if the WebContents that it's |
61 // bound to has already been deleted. | 61 // bound to has already been deleted. |
62 SynchronousCompositorImpl* compositor = | 62 SynchronousCompositorImpl* compositor = |
63 SynchronousCompositorImpl::FromRoutingID(routing_id); | 63 SynchronousCompositorImpl::FromRoutingID(routing_id); |
64 if (compositor) | 64 if (compositor) |
65 compositor->SetInputHandler(NULL); | 65 compositor->SetInputHandler(NULL); |
66 } | 66 } |
67 | 67 |
68 void SynchronousInputEventFilter::DidOverscroll( | 68 void SynchronousInputEventFilter::DidOverscroll( |
69 int routing_id, | 69 int routing_id, |
70 const cc::DidOverscrollParams& params) { | 70 const DidOverscrollParams& params) { |
71 // The SynchronusCompositorImpl can be NULL if the WebContents that it's | 71 // The SynchronusCompositorImpl can be NULL if the WebContents that it's |
72 // bound to has already been deleted. | 72 // bound to has already been deleted. |
73 SynchronousCompositorImpl* compositor = | 73 SynchronousCompositorImpl* compositor = |
74 SynchronousCompositorImpl::FromRoutingID(routing_id); | 74 SynchronousCompositorImpl::FromRoutingID(routing_id); |
75 if (compositor) | 75 if (compositor) |
76 compositor->DidOverscroll(params); | 76 compositor->DidOverscroll(params); |
77 } | 77 } |
78 | 78 |
79 void SynchronousInputEventFilter::DidStopFlinging(int routing_id) { | 79 void SynchronousInputEventFilter::DidStopFlinging(int routing_id) { |
80 // The SynchronusCompositorImpl can be NULL if the WebContents that it's | 80 // The SynchronusCompositorImpl can be NULL if the WebContents that it's |
81 // bound to has already been deleted. | 81 // bound to has already been deleted. |
82 SynchronousCompositorImpl* compositor = | 82 SynchronousCompositorImpl* compositor = |
83 SynchronousCompositorImpl::FromRoutingID(routing_id); | 83 SynchronousCompositorImpl::FromRoutingID(routing_id); |
84 if (compositor) | 84 if (compositor) |
85 compositor->DidStopFlinging(); | 85 compositor->DidStopFlinging(); |
86 } | 86 } |
87 | 87 |
88 } // namespace content | 88 } // namespace content |
OLD | NEW |