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/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
(...skipping 1560 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1571 if (window_->parent()->delegate()) | 1571 if (window_->parent()->delegate()) |
1572 window_->parent()->delegate()->OnMouseEvent(event); | 1572 window_->parent()->delegate()->OnMouseEvent(event); |
1573 | 1573 |
1574 // Return true so that we receive released/drag events. | 1574 // Return true so that we receive released/drag events. |
1575 return ui::ER_HANDLED; | 1575 return ui::ER_HANDLED; |
1576 } | 1576 } |
1577 | 1577 |
1578 ui::EventResult RenderWidgetHostViewAura::OnTouchEvent(ui::TouchEvent* event) { | 1578 ui::EventResult RenderWidgetHostViewAura::OnTouchEvent(ui::TouchEvent* event) { |
1579 TRACE_EVENT0("browser", "RenderWidgetHostViewAura::OnTouchEvent"); | 1579 TRACE_EVENT0("browser", "RenderWidgetHostViewAura::OnTouchEvent"); |
1580 // Update the touch event first. | 1580 // Update the touch event first. |
1581 WebKit::WebTouchPoint* point = UpdateWebTouchEvent(event, | 1581 WebKit::WebTouchPoint* point = UpdateWebTouchEventFromUIEvent(event, |
1582 &touch_event_); | 1582 &touch_event_); |
1583 | 1583 |
1584 // Forward the touch event only if a touch point was updated, and there's a | 1584 // Forward the touch event only if a touch point was updated, and there's a |
1585 // touch-event handler in the page, and no other touch-event is in the queue. | 1585 // touch-event handler in the page, and no other touch-event is in the queue. |
1586 ui::EventResult result = ui::ER_UNHANDLED; | 1586 ui::EventResult result = ui::ER_UNHANDLED; |
1587 if (point) { | 1587 if (point) { |
1588 if (host_->ShouldForwardTouchEvent()) { | 1588 if (host_->ShouldForwardTouchEvent()) { |
1589 host_->ForwardTouchEvent(touch_event_); | 1589 host_->ForwardTouchEvent(touch_event_); |
1590 result = ui::ER_CONSUMED; | 1590 result = ui::ER_CONSUMED; |
1591 } | 1591 } |
1592 UpdateWebTouchEventAfterDispatch(&touch_event_, point); | 1592 UpdateWebTouchEventAfterDispatch(&touch_event_, point); |
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1916 RenderWidgetHost* widget) { | 1916 RenderWidgetHost* widget) { |
1917 return new RenderWidgetHostViewAura(widget); | 1917 return new RenderWidgetHostViewAura(widget); |
1918 } | 1918 } |
1919 | 1919 |
1920 // static | 1920 // static |
1921 void RenderWidgetHostViewPort::GetDefaultScreenInfo(WebScreenInfo* results) { | 1921 void RenderWidgetHostViewPort::GetDefaultScreenInfo(WebScreenInfo* results) { |
1922 GetScreenInfoForWindow(results, NULL); | 1922 GetScreenInfoForWindow(results, NULL); |
1923 } | 1923 } |
1924 | 1924 |
1925 } // namespace content | 1925 } // namespace content |
OLD | NEW |