| 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_aura.h" | 5 #include "content/browser/renderer_host/render_widget_host_view_aura.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
| (...skipping 1236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1247 } | 1247 } |
| 1248 } | 1248 } |
| 1249 | 1249 |
| 1250 if (overscroll_controller_) | 1250 if (overscroll_controller_) |
| 1251 consumed |= overscroll_controller_->WillHandleEvent(input_event); | 1251 consumed |= overscroll_controller_->WillHandleEvent(input_event); |
| 1252 | 1252 |
| 1253 // Touch events should always propagate to the renderer. | 1253 // Touch events should always propagate to the renderer. |
| 1254 if (WebTouchEvent::isTouchEventType(input_event.type)) | 1254 if (WebTouchEvent::isTouchEventType(input_event.type)) |
| 1255 return INPUT_EVENT_ACK_STATE_NOT_CONSUMED; | 1255 return INPUT_EVENT_ACK_STATE_NOT_CONSUMED; |
| 1256 | 1256 |
| 1257 // Reporting consumed for a fling suggests that there's now an *active* fling | 1257 if (consumed && input_event.type == blink::WebInputEvent::GestureFlingStart) { |
| 1258 // that requires both animation and a fling-end notification. However, the | 1258 // Here we indicate that there was no consumer for this event, as |
| 1259 // OverscrollController consumes a fling to stop its propagation; it doesn't | 1259 // otherwise the fling animation system will try to run an animation |
| 1260 // actually tick a fling animation. Report no consumer to convey this. | 1260 // and will also expect a notification when the fling ends. Since |
| 1261 if (consumed && input_event.type == blink::WebInputEvent::GestureFlingStart) | 1261 // CrOS just uses the GestureFlingStart with zero-velocity as a means |
| 1262 // of indicating that touchpad scroll has ended, we don't actually want |
| 1263 // a fling animation. Note: Similar code exists in |
| 1264 // RenderWidgetHostViewChildFrame::FilterInputEvent() |
| 1262 return INPUT_EVENT_ACK_STATE_NO_CONSUMER_EXISTS; | 1265 return INPUT_EVENT_ACK_STATE_NO_CONSUMER_EXISTS; |
| 1266 } |
| 1263 | 1267 |
| 1264 return consumed ? INPUT_EVENT_ACK_STATE_CONSUMED | 1268 return consumed ? INPUT_EVENT_ACK_STATE_CONSUMED |
| 1265 : INPUT_EVENT_ACK_STATE_NOT_CONSUMED; | 1269 : INPUT_EVENT_ACK_STATE_NOT_CONSUMED; |
| 1266 } | 1270 } |
| 1267 | 1271 |
| 1268 BrowserAccessibilityManager* | 1272 BrowserAccessibilityManager* |
| 1269 RenderWidgetHostViewAura::CreateBrowserAccessibilityManager( | 1273 RenderWidgetHostViewAura::CreateBrowserAccessibilityManager( |
| 1270 BrowserAccessibilityDelegate* delegate, bool for_root_frame) { | 1274 BrowserAccessibilityDelegate* delegate, bool for_root_frame) { |
| 1271 BrowserAccessibilityManager* manager = NULL; | 1275 BrowserAccessibilityManager* manager = NULL; |
| 1272 #if defined(OS_WIN) | 1276 #if defined(OS_WIN) |
| (...skipping 1763 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3036 | 3040 |
| 3037 //////////////////////////////////////////////////////////////////////////////// | 3041 //////////////////////////////////////////////////////////////////////////////// |
| 3038 // RenderWidgetHostViewBase, public: | 3042 // RenderWidgetHostViewBase, public: |
| 3039 | 3043 |
| 3040 // static | 3044 // static |
| 3041 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) { | 3045 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) { |
| 3042 GetScreenInfoForWindow(results, NULL); | 3046 GetScreenInfoForWindow(results, NULL); |
| 3043 } | 3047 } |
| 3044 | 3048 |
| 3045 } // namespace content | 3049 } // namespace content |
| OLD | NEW |