| 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 1276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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); |
| 1290 return DecideTouchStatus(touch_event_, point); | 1290 return DecideTouchStatus(touch_event_, point); |
| 1291 } | 1291 } |
| 1292 | 1292 |
| 1293 return ui::TOUCH_STATUS_UNKNOWN; | 1293 return ui::TOUCH_STATUS_UNKNOWN; |
| 1294 } | 1294 } |
| 1295 | 1295 |
| 1296 ui::GestureStatus RenderWidgetHostViewAura::OnGestureEvent( | 1296 ui::GestureStatus RenderWidgetHostViewAura::OnGestureEvent( |
| 1297 ui::GestureEventImpl* event) { | 1297 ui::GestureEvent* event) { |
| 1298 TRACE_EVENT0("browser", "RenderWidgetHostViewAura::OnGestureEvent"); | 1298 TRACE_EVENT0("browser", "RenderWidgetHostViewAura::OnGestureEvent"); |
| 1299 // Pinch gestures are currently disabled by default. See crbug.com/128477. | 1299 // Pinch gestures are currently disabled by default. See crbug.com/128477. |
| 1300 if ((event->type() == ui::ET_GESTURE_PINCH_BEGIN || | 1300 if ((event->type() == ui::ET_GESTURE_PINCH_BEGIN || |
| 1301 event->type() == ui::ET_GESTURE_PINCH_UPDATE || | 1301 event->type() == ui::ET_GESTURE_PINCH_UPDATE || |
| 1302 event->type() == ui::ET_GESTURE_PINCH_END) && !ShouldSendPinchGesture()) { | 1302 event->type() == ui::ET_GESTURE_PINCH_END) && !ShouldSendPinchGesture()) { |
| 1303 return ui::GESTURE_STATUS_CONSUMED; | 1303 return ui::GESTURE_STATUS_CONSUMED; |
| 1304 } | 1304 } |
| 1305 | 1305 |
| 1306 RenderViewHostDelegate* delegate = NULL; | 1306 RenderViewHostDelegate* delegate = NULL; |
| 1307 if (popup_type_ == WebKit::WebPopupTypeNone && !is_fullscreen_) | 1307 if (popup_type_ == WebKit::WebPopupTypeNone && !is_fullscreen_) |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1398 | 1398 |
| 1399 //////////////////////////////////////////////////////////////////////////////// | 1399 //////////////////////////////////////////////////////////////////////////////// |
| 1400 // RenderWidgetHostViewAura, aura::client::ActivationDelegate implementation: | 1400 // RenderWidgetHostViewAura, aura::client::ActivationDelegate implementation: |
| 1401 | 1401 |
| 1402 bool RenderWidgetHostViewAura::ShouldActivate(const ui::Event* event) { | 1402 bool RenderWidgetHostViewAura::ShouldActivate(const ui::Event* event) { |
| 1403 bool activate = false; | 1403 bool activate = false; |
| 1404 if (event) { | 1404 if (event) { |
| 1405 if (event->type() == ui::ET_MOUSE_PRESSED) { | 1405 if (event->type() == ui::ET_MOUSE_PRESSED) { |
| 1406 activate = true; | 1406 activate = true; |
| 1407 } else if (event->type() == ui::ET_GESTURE_BEGIN) { | 1407 } else if (event->type() == ui::ET_GESTURE_BEGIN) { |
| 1408 activate = static_cast<const ui::GestureEventImpl*>(event)-> | 1408 activate = static_cast<const ui::GestureEvent*>(event)-> |
| 1409 details().touch_points() == 1; | 1409 details().touch_points() == 1; |
| 1410 } | 1410 } |
| 1411 } | 1411 } |
| 1412 if (activate) | 1412 if (activate) |
| 1413 host_->OnPointerEventActivate(); | 1413 host_->OnPointerEventActivate(); |
| 1414 return is_fullscreen_; | 1414 return is_fullscreen_; |
| 1415 } | 1415 } |
| 1416 | 1416 |
| 1417 void RenderWidgetHostViewAura::OnActivated() { | 1417 void RenderWidgetHostViewAura::OnActivated() { |
| 1418 } | 1418 } |
| (...skipping 236 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 |