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 1258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1269 // Needed to propagate mouse event to native_tab_contents_view_aura. | 1269 // Needed to propagate mouse event to native_tab_contents_view_aura. |
1270 // TODO(pkotwicz): Find a better way of doing this. | 1270 // TODO(pkotwicz): Find a better way of doing this. |
1271 if (window_->parent()->delegate()) | 1271 if (window_->parent()->delegate()) |
1272 window_->parent()->delegate()->OnMouseEvent(event); | 1272 window_->parent()->delegate()->OnMouseEvent(event); |
1273 | 1273 |
1274 // Return true so that we receive released/drag events. | 1274 // Return true so that we receive released/drag events. |
1275 return true; | 1275 return true; |
1276 } | 1276 } |
1277 | 1277 |
1278 ui::TouchStatus RenderWidgetHostViewAura::OnTouchEvent( | 1278 ui::TouchStatus RenderWidgetHostViewAura::OnTouchEvent( |
1279 ui::TouchEventImpl* event) { | 1279 ui::TouchEvent* event) { |
1280 TRACE_EVENT0("browser", "RenderWidgetHostViewAura::OnTouchEvent"); | 1280 TRACE_EVENT0("browser", "RenderWidgetHostViewAura::OnTouchEvent"); |
1281 // Update the touch event first. | 1281 // Update the touch event first. |
1282 WebKit::WebTouchPoint* point = UpdateWebTouchEvent(event, | 1282 WebKit::WebTouchPoint* point = UpdateWebTouchEvent(event, |
1283 &touch_event_); | 1283 &touch_event_); |
1284 | 1284 |
1285 // Forward the touch event only if a touch point was updated, and there's a | 1285 // Forward the touch event only if a touch point was updated, and there's a |
1286 // touch-event handler in the page. | 1286 // touch-event handler in the page. |
1287 if (point && host_->has_touch_handler()) { | 1287 if (point && host_->has_touch_handler()) { |
1288 host_->ForwardTouchEvent(touch_event_); | 1288 host_->ForwardTouchEvent(touch_event_); |
1289 UpdateWebTouchEventAfterDispatch(&touch_event_, point); | 1289 UpdateWebTouchEventAfterDispatch(&touch_event_, point); |
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1655 RenderWidgetHost* widget) { | 1655 RenderWidgetHost* widget) { |
1656 return new RenderWidgetHostViewAura(widget); | 1656 return new RenderWidgetHostViewAura(widget); |
1657 } | 1657 } |
1658 | 1658 |
1659 // static | 1659 // static |
1660 void RenderWidgetHostViewPort::GetDefaultScreenInfo(WebScreenInfo* results) { | 1660 void RenderWidgetHostViewPort::GetDefaultScreenInfo(WebScreenInfo* results) { |
1661 GetScreenInfoForWindow(results, NULL); | 1661 GetScreenInfoForWindow(results, NULL); |
1662 } | 1662 } |
1663 | 1663 |
1664 } // namespace content | 1664 } // namespace content |
OLD | NEW |