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 1018 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1029 InputEventAckState ack_result) { | 1029 InputEventAckState ack_result) { |
1030 aura::WindowTreeHost* host = window_->GetHost(); | 1030 aura::WindowTreeHost* host = window_->GetHost(); |
1031 // |host| is NULL during tests. | 1031 // |host| is NULL during tests. |
1032 if (!host) | 1032 if (!host) |
1033 return; | 1033 return; |
1034 | 1034 |
1035 // The TouchScrollStarted event is generated & consumed downstream from the | 1035 // The TouchScrollStarted event is generated & consumed downstream from the |
1036 // TouchEventQueue. So we don't expect an ACK up here. | 1036 // TouchEventQueue. So we don't expect an ACK up here. |
1037 DCHECK(touch.event.GetType() != blink::WebInputEvent::kTouchScrollStarted); | 1037 DCHECK(touch.event.GetType() != blink::WebInputEvent::kTouchScrollStarted); |
1038 | 1038 |
1039 ui::EventResult result = (ack_result == INPUT_EVENT_ACK_STATE_CONSUMED) | 1039 ui::EventResult result; |
1040 ? ui::ER_HANDLED | 1040 switch (ack_result) { |
1041 : ui::ER_UNHANDLED; | 1041 case INPUT_EVENT_ACK_STATE_CONSUMED: |
1042 result = ui::ER_HANDLED; | |
1043 break; | |
1044 case INPUT_EVENT_ACK_STATE_IGNORED: | |
dtapuska
2017/05/25 15:40:12
I'm not sure we should map Ignored to ignored_non_
| |
1045 result = ui::ER_IGNORED_NON_BLOCKING; | |
1046 break; | |
1047 default: | |
1048 result = ui::ER_UNHANDLED; | |
1049 break; | |
1050 } | |
1042 | 1051 |
1043 blink::WebTouchPoint::State required_state; | 1052 blink::WebTouchPoint::State required_state; |
1044 switch (touch.event.GetType()) { | 1053 switch (touch.event.GetType()) { |
1045 case blink::WebInputEvent::kTouchStart: | 1054 case blink::WebInputEvent::kTouchStart: |
1046 required_state = blink::WebTouchPoint::kStatePressed; | 1055 required_state = blink::WebTouchPoint::kStatePressed; |
1047 break; | 1056 break; |
1048 case blink::WebInputEvent::kTouchEnd: | 1057 case blink::WebInputEvent::kTouchEnd: |
1049 required_state = blink::WebTouchPoint::kStateReleased; | 1058 required_state = blink::WebTouchPoint::kStateReleased; |
1050 break; | 1059 break; |
1051 case blink::WebInputEvent::kTouchMove: | 1060 case blink::WebInputEvent::kTouchMove: |
(...skipping 1355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2407 } | 2416 } |
2408 | 2417 |
2409 void RenderWidgetHostViewAura::UpdateNeedsBeginFramesInternal() { | 2418 void RenderWidgetHostViewAura::UpdateNeedsBeginFramesInternal() { |
2410 if (!delegated_frame_host_) | 2419 if (!delegated_frame_host_) |
2411 return; | 2420 return; |
2412 delegated_frame_host_->SetNeedsBeginFrames(needs_begin_frames_ || | 2421 delegated_frame_host_->SetNeedsBeginFrames(needs_begin_frames_ || |
2413 needs_flush_input_); | 2422 needs_flush_input_); |
2414 } | 2423 } |
2415 | 2424 |
2416 } // namespace content | 2425 } // namespace content |
OLD | NEW |