| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "base/bind_helpers.h" | 5 #include "base/bind_helpers.h" |
| 6 #include "base/command_line.h" | 6 #include "base/command_line.h" |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
| 9 #include "content/browser/browser_plugin/browser_plugin_guest.h" | 9 #include "content/browser/browser_plugin/browser_plugin_guest.h" |
| 10 #include "content/browser/frame_host/render_widget_host_view_guest.h" | 10 #include "content/browser/frame_host/render_widget_host_view_guest.h" |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 // subsequent touch points of that touchdown to the appropriate guest until | 102 // subsequent touch points of that touchdown to the appropriate guest until |
| 103 // that touch point is released. | 103 // that touch point is released. |
| 104 ScopedVector<ui::TouchEvent> events; | 104 ScopedVector<ui::TouchEvent> events; |
| 105 if (!MakeUITouchEventsFromWebTouchEvents(touch, &events, LOCAL_COORDINATES)) | 105 if (!MakeUITouchEventsFromWebTouchEvents(touch, &events, LOCAL_COORDINATES)) |
| 106 return; | 106 return; |
| 107 | 107 |
| 108 ui::EventResult result = (ack_result == | 108 ui::EventResult result = (ack_result == |
| 109 INPUT_EVENT_ACK_STATE_CONSUMED) ? ui::ER_HANDLED : ui::ER_UNHANDLED; | 109 INPUT_EVENT_ACK_STATE_CONSUMED) ? ui::ER_HANDLED : ui::ER_UNHANDLED; |
| 110 for (ScopedVector<ui::TouchEvent>::iterator iter = events.begin(), | 110 for (ScopedVector<ui::TouchEvent>::iterator iter = events.begin(), |
| 111 end = events.end(); iter != end; ++iter) { | 111 end = events.end(); iter != end; ++iter) { |
| 112 if (!ui::GestureRecognizer::Get()->ProcessTouchEventPreDispatch(*(*iter), |
| 113 this)) { |
| 114 continue; |
| 115 } |
| 112 scoped_ptr<ui::GestureRecognizer::Gestures> gestures; | 116 scoped_ptr<ui::GestureRecognizer::Gestures> gestures; |
| 113 gestures.reset(gesture_recognizer_->ProcessTouchEventForGesture( | 117 gestures.reset(ui::GestureRecognizer::Get()->ProcessTouchEventPostDispatch( |
| 114 *(*iter), result, this)); | 118 *(*iter), result, this)); |
| 115 ProcessGestures(gestures.get()); | 119 ProcessGestures(gestures.get()); |
| 116 } | 120 } |
| 117 } | 121 } |
| 118 #endif | 122 #endif |
| 119 | 123 |
| 120 gfx::Rect RenderWidgetHostViewGuest::GetViewBounds() const { | 124 gfx::Rect RenderWidgetHostViewGuest::GetViewBounds() const { |
| 121 if (!guest_) | 125 if (!guest_) |
| 122 return gfx::Rect(); | 126 return gfx::Rect(); |
| 123 | 127 |
| (...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 548 return kN32_SkColorType; | 552 return kN32_SkColorType; |
| 549 } | 553 } |
| 550 | 554 |
| 551 RenderWidgetHostViewBase* | 555 RenderWidgetHostViewBase* |
| 552 RenderWidgetHostViewGuest::GetGuestRenderWidgetHostView() const { | 556 RenderWidgetHostViewGuest::GetGuestRenderWidgetHostView() const { |
| 553 return static_cast<RenderWidgetHostViewBase*>( | 557 return static_cast<RenderWidgetHostViewBase*>( |
| 554 guest_->GetEmbedderRenderWidgetHostView()); | 558 guest_->GetEmbedderRenderWidgetHostView()); |
| 555 } | 559 } |
| 556 | 560 |
| 557 } // namespace content | 561 } // namespace content |
| OLD | NEW |