| 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 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 363 if (m_closing || !m_page || !m_page->mainFrame() || !m_page->mainFrame()->vi
ew()) | 363 if (m_closing || !m_page || !m_page->mainFrame() || !m_page->mainFrame()->vi
ew()) |
| 364 return false; | 364 return false; |
| 365 LocalFrame& frame = *m_page->mainFrame(); | 365 LocalFrame& frame = *m_page->mainFrame(); |
| 366 return frame.eventHandler().handleGestureEvent(PlatformGestureEventBuilder(f
rame.view(), event)); | 366 return frame.eventHandler().handleGestureEvent(PlatformGestureEventBuilder(f
rame.view(), event)); |
| 367 } | 367 } |
| 368 | 368 |
| 369 bool WebPagePopupImpl::handleInputEvent(const WebInputEvent& event) | 369 bool WebPagePopupImpl::handleInputEvent(const WebInputEvent& event) |
| 370 { | 370 { |
| 371 if (m_closing) | 371 if (m_closing) |
| 372 return false; | 372 return false; |
| 373 return PageWidgetDelegate::handleInputEvent(m_page.get(), *this, event); | 373 return PageWidgetDelegate::handleInputEvent(m_page.get(), *this, event, true
, true); |
| 374 } | 374 } |
| 375 | 375 |
| 376 bool WebPagePopupImpl::handleKeyEvent(const PlatformKeyboardEvent& event) | 376 bool WebPagePopupImpl::handleKeyEvent(const PlatformKeyboardEvent& event) |
| 377 { | 377 { |
| 378 if (m_closing || !m_page->mainFrame() || !m_page->mainFrame()->view()) | 378 if (m_closing || !m_page->mainFrame() || !m_page->mainFrame()->view()) |
| 379 return false; | 379 return false; |
| 380 return m_page->mainFrame()->eventHandler().keyEvent(event); | 380 return m_page->mainFrame()->eventHandler().keyEvent(event); |
| 381 } | 381 } |
| 382 | 382 |
| 383 void WebPagePopupImpl::setFocus(bool enable) | 383 void WebPagePopupImpl::setFocus(bool enable) |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 426 // A WebPagePopupImpl instance usually has two references. | 426 // A WebPagePopupImpl instance usually has two references. |
| 427 // - One owned by the instance itself. It represents the visible widget. | 427 // - One owned by the instance itself. It represents the visible widget. |
| 428 // - One owned by a WebViewImpl. It's released when the WebViewImpl ask the | 428 // - One owned by a WebViewImpl. It's released when the WebViewImpl ask the |
| 429 // WebPagePopupImpl to close. | 429 // WebPagePopupImpl to close. |
| 430 // We need them because the closing operation is asynchronous and the widget | 430 // We need them because the closing operation is asynchronous and the widget |
| 431 // can be closed while the WebViewImpl is unaware of it. | 431 // can be closed while the WebViewImpl is unaware of it. |
| 432 return adoptRef(new WebPagePopupImpl(client)).leakRef(); | 432 return adoptRef(new WebPagePopupImpl(client)).leakRef(); |
| 433 } | 433 } |
| 434 | 434 |
| 435 } // namespace blink | 435 } // namespace blink |
| OLD | NEW |