Chromium Code Reviews| 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 "base/auto_reset.h" | 7 #include "base/auto_reset.h" |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/callback_helpers.h" | 10 #include "base/callback_helpers.h" |
| (...skipping 1122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1133 touch_editing_client_->GestureEventAck(event.type); | 1133 touch_editing_client_->GestureEventAck(event.type); |
| 1134 | 1134 |
| 1135 if (overscroll_controller_) { | 1135 if (overscroll_controller_) { |
| 1136 overscroll_controller_->ReceivedEventACK( | 1136 overscroll_controller_->ReceivedEventACK( |
| 1137 event, (INPUT_EVENT_ACK_STATE_CONSUMED == ack_result)); | 1137 event, (INPUT_EVENT_ACK_STATE_CONSUMED == ack_result)); |
| 1138 } | 1138 } |
| 1139 } | 1139 } |
| 1140 | 1140 |
| 1141 void RenderWidgetHostViewAura::ProcessAckedTouchEvent( | 1141 void RenderWidgetHostViewAura::ProcessAckedTouchEvent( |
| 1142 const TouchEventWithLatencyInfo& touch, InputEventAckState ack_result) { | 1142 const TouchEventWithLatencyInfo& touch, InputEventAckState ack_result) { |
| 1143 ScopedVector<ui::TouchEvent> events; | |
| 1144 if (!MakeUITouchEventsFromWebTouchEvents(touch, &events, | |
| 1145 SCREEN_COORDINATES)) | |
| 1146 return; | |
| 1147 | |
| 1148 aura::WindowTreeHost* host = window_->GetHost(); | 1143 aura::WindowTreeHost* host = window_->GetHost(); |
| 1149 // |host| is NULL during tests. | 1144 // |host| is NULL during tests. |
| 1150 if (!host) | 1145 if (!host) |
| 1151 return; | 1146 return; |
| 1152 | 1147 |
| 1153 ui::EventResult result = (ack_result == | 1148 ui::EventResult result = (ack_result == |
| 1154 INPUT_EVENT_ACK_STATE_CONSUMED) ? ui::ER_HANDLED : ui::ER_UNHANDLED; | 1149 INPUT_EVENT_ACK_STATE_CONSUMED) ? ui::ER_HANDLED : ui::ER_UNHANDLED; |
| 1155 for (ScopedVector<ui::TouchEvent>::iterator iter = events.begin(), | 1150 for (size_t i = 0; i < touch.event.touchesLength; ++i) |
| 1156 end = events.end(); iter != end; ++iter) { | 1151 host->dispatcher()->ProcessedTouchEvent(window_, result); |
|
sadrul
2014/08/26 20:09:07
With this change, we are going to be ack-ing more
tdresser
2014/08/27 17:40:24
Easy fix, hard test...
https://code.google.com/p/
| |
| 1157 host->dispatcher()->ProcessedTouchEvent((*iter), window_, result); | |
| 1158 } | |
| 1159 } | 1152 } |
| 1160 | 1153 |
| 1161 scoped_ptr<SyntheticGestureTarget> | 1154 scoped_ptr<SyntheticGestureTarget> |
| 1162 RenderWidgetHostViewAura::CreateSyntheticGestureTarget() { | 1155 RenderWidgetHostViewAura::CreateSyntheticGestureTarget() { |
| 1163 return scoped_ptr<SyntheticGestureTarget>( | 1156 return scoped_ptr<SyntheticGestureTarget>( |
| 1164 new SyntheticGestureTargetAura(host_)); | 1157 new SyntheticGestureTargetAura(host_)); |
| 1165 } | 1158 } |
| 1166 | 1159 |
| 1167 InputEventAckState RenderWidgetHostViewAura::FilterInputEvent( | 1160 InputEventAckState RenderWidgetHostViewAura::FilterInputEvent( |
| 1168 const blink::WebInputEvent& input_event) { | 1161 const blink::WebInputEvent& input_event) { |
| (...skipping 1319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2488 | 2481 |
| 2489 //////////////////////////////////////////////////////////////////////////////// | 2482 //////////////////////////////////////////////////////////////////////////////// |
| 2490 // RenderWidgetHostViewBase, public: | 2483 // RenderWidgetHostViewBase, public: |
| 2491 | 2484 |
| 2492 // static | 2485 // static |
| 2493 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) { | 2486 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) { |
| 2494 GetScreenInfoForWindow(results, NULL); | 2487 GetScreenInfoForWindow(results, NULL); |
| 2495 } | 2488 } |
| 2496 | 2489 |
| 2497 } // namespace content | 2490 } // namespace content |
| OLD | NEW |