OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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/renderer/browser_plugin/browser_plugin.h" | 5 #include "content/renderer/browser_plugin/browser_plugin.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/location.h" | 8 #include "base/location.h" |
9 #include "base/single_thread_task_runner.h" | 9 #include "base/single_thread_task_runner.h" |
10 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
(...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
494 | 494 |
495 bool BrowserPlugin::acceptsInputEvents() { | 495 bool BrowserPlugin::acceptsInputEvents() { |
496 return true; | 496 return true; |
497 } | 497 } |
498 | 498 |
499 bool BrowserPlugin::handleInputEvent(const blink::WebInputEvent& event, | 499 bool BrowserPlugin::handleInputEvent(const blink::WebInputEvent& event, |
500 blink::WebCursorInfo& cursor_info) { | 500 blink::WebCursorInfo& cursor_info) { |
501 if (guest_crashed_ || !attached()) | 501 if (guest_crashed_ || !attached()) |
502 return false; | 502 return false; |
503 | 503 |
| 504 DCHECK(!blink::WebInputEvent::isTouchEventType(event.type)); |
| 505 |
504 if (event.type == blink::WebInputEvent::MouseWheel) { | 506 if (event.type == blink::WebInputEvent::MouseWheel) { |
505 auto wheel_event = static_cast<const blink::WebMouseWheelEvent&>(event); | 507 auto wheel_event = static_cast<const blink::WebMouseWheelEvent&>(event); |
506 if (wheel_event.resendingPluginId == browser_plugin_instance_id_) | 508 if (wheel_event.resendingPluginId == browser_plugin_instance_id_) |
507 return false; | 509 return false; |
508 } | 510 } |
509 | 511 |
510 if (blink::WebInputEvent::isGestureEventType(event.type)) { | 512 if (blink::WebInputEvent::isGestureEventType(event.type)) { |
511 auto gesture_event = static_cast<const blink::WebGestureEvent&>(event); | 513 auto gesture_event = static_cast<const blink::WebGestureEvent&>(event); |
512 if (gesture_event.resendingPluginId == browser_plugin_instance_id_) | 514 if (gesture_event.resendingPluginId == browser_plugin_instance_id_) |
513 return false; | 515 return false; |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
661 bool BrowserPlugin::HandleMouseLockedInputEvent( | 663 bool BrowserPlugin::HandleMouseLockedInputEvent( |
662 const blink::WebMouseEvent& event) { | 664 const blink::WebMouseEvent& event) { |
663 BrowserPluginManager::Get()->Send( | 665 BrowserPluginManager::Get()->Send( |
664 new BrowserPluginHostMsg_HandleInputEvent(browser_plugin_instance_id_, | 666 new BrowserPluginHostMsg_HandleInputEvent(browser_plugin_instance_id_, |
665 view_rect_, | 667 view_rect_, |
666 &event)); | 668 &event)); |
667 return true; | 669 return true; |
668 } | 670 } |
669 | 671 |
670 } // namespace content | 672 } // namespace content |
OLD | NEW |