| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 324 // The main WebView receives key events and forward them to this via handleK
eyEvent(). | 324 // The main WebView receives key events and forward them to this via handleK
eyEvent(). |
| 325 ASSERT_NOT_REACHED(); | 325 ASSERT_NOT_REACHED(); |
| 326 return false; | 326 return false; |
| 327 } | 327 } |
| 328 | 328 |
| 329 bool WebPagePopupImpl::handleGestureEvent(const WebGestureEvent& event) | 329 bool WebPagePopupImpl::handleGestureEvent(const WebGestureEvent& event) |
| 330 { | 330 { |
| 331 if (m_closing || !m_page || !m_page->mainFrame() || !toLocalFrame(m_page->ma
inFrame())->view()) | 331 if (m_closing || !m_page || !m_page->mainFrame() || !toLocalFrame(m_page->ma
inFrame())->view()) |
| 332 return false; | 332 return false; |
| 333 LocalFrame& frame = *toLocalFrame(m_page->mainFrame()); | 333 LocalFrame& frame = *toLocalFrame(m_page->mainFrame()); |
| 334 return frame.eventHandler().handleGestureEvent(PlatformGestureEventBuilder(f
rame.view(), event)); | 334 PlatformGestureEventBuilder platformEvent(frame.view(), event); |
| 335 GestureEventWithHitTestResults targetedEvent = frame.eventHandler().targetGe
stureEvent(platformEvent); |
| 336 return frame.eventHandler().handleGestureEvent(targetedEvent); |
| 335 } | 337 } |
| 336 | 338 |
| 337 bool WebPagePopupImpl::handleInputEvent(const WebInputEvent& event) | 339 bool WebPagePopupImpl::handleInputEvent(const WebInputEvent& event) |
| 338 { | 340 { |
| 339 if (m_closing) | 341 if (m_closing) |
| 340 return false; | 342 return false; |
| 341 return PageWidgetDelegate::handleInputEvent(m_page.get(), *this, event); | 343 return PageWidgetDelegate::handleInputEvent(m_page.get(), *this, event); |
| 342 } | 344 } |
| 343 | 345 |
| 344 bool WebPagePopupImpl::handleKeyEvent(const PlatformKeyboardEvent& event) | 346 bool WebPagePopupImpl::handleKeyEvent(const PlatformKeyboardEvent& event) |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 394 // A WebPagePopupImpl instance usually has two references. | 396 // A WebPagePopupImpl instance usually has two references. |
| 395 // - One owned by the instance itself. It represents the visible widget. | 397 // - One owned by the instance itself. It represents the visible widget. |
| 396 // - One owned by a WebViewImpl. It's released when the WebViewImpl ask the | 398 // - One owned by a WebViewImpl. It's released when the WebViewImpl ask the |
| 397 // WebPagePopupImpl to close. | 399 // WebPagePopupImpl to close. |
| 398 // We need them because the closing operation is asynchronous and the widget | 400 // We need them because the closing operation is asynchronous and the widget |
| 399 // can be closed while the WebViewImpl is unaware of it. | 401 // can be closed while the WebViewImpl is unaware of it. |
| 400 return adoptRef(new WebPagePopupImpl(client)).leakRef(); | 402 return adoptRef(new WebPagePopupImpl(client)).leakRef(); |
| 401 } | 403 } |
| 402 | 404 |
| 403 } // namespace blink | 405 } // namespace blink |
| OLD | NEW |