Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6)

Side by Side Diff: third_party/WebKit/Source/web/WebPagePopupImpl.cpp

Issue 2576013002: Introducing WebCoalescedInputEvent and inclusion in content/common (Closed)
Patch Set: Fix a few DCHECK hits Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 489 matching lines...) Expand 10 before | Expand all | Expand 10 after
500 WebRect windowRect = windowRectInScreen(); 500 WebRect windowRect = windowRectInScreen();
501 return IntRect(0, 0, windowRect.width, windowRect.height) 501 return IntRect(0, 0, windowRect.width, windowRect.height)
502 .contains(IntPoint(pointInWindow.x, pointInWindow.y)); 502 .contains(IntPoint(pointInWindow.x, pointInWindow.y));
503 } 503 }
504 504
505 WebInputEventResult WebPagePopupImpl::handleInputEvent( 505 WebInputEventResult WebPagePopupImpl::handleInputEvent(
506 const WebInputEvent& event) { 506 const WebInputEvent& event) {
507 if (m_closing) 507 if (m_closing)
508 return WebInputEventResult::NotHandled; 508 return WebInputEventResult::NotHandled;
509 return PageWidgetDelegate::handleInputEvent( 509 return PageWidgetDelegate::handleInputEvent(
510 *this, event, m_page->deprecatedLocalMainFrame()); 510 *this, WebCoalescedInputEvent(event), m_page->deprecatedLocalMainFrame());
511 } 511 }
512 512
513 void WebPagePopupImpl::setFocus(bool enable) { 513 void WebPagePopupImpl::setFocus(bool enable) {
514 if (!m_page) 514 if (!m_page)
515 return; 515 return;
516 m_page->focusController().setFocused(enable); 516 m_page->focusController().setFocused(enable);
517 if (enable) 517 if (enable)
518 m_page->focusController().setActive(true); 518 m_page->focusController().setActive(true);
519 } 519 }
520 520
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
592 // A WebPagePopupImpl instance usually has two references. 592 // A WebPagePopupImpl instance usually has two references.
593 // - One owned by the instance itself. It represents the visible widget. 593 // - One owned by the instance itself. It represents the visible widget.
594 // - One owned by a WebViewImpl. It's released when the WebViewImpl ask the 594 // - One owned by a WebViewImpl. It's released when the WebViewImpl ask the
595 // WebPagePopupImpl to close. 595 // WebPagePopupImpl to close.
596 // We need them because the closing operation is asynchronous and the widget 596 // We need them because the closing operation is asynchronous and the widget
597 // can be closed while the WebViewImpl is unaware of it. 597 // can be closed while the WebViewImpl is unaware of it.
598 return adoptRef(new WebPagePopupImpl(client)).leakRef(); 598 return adoptRef(new WebPagePopupImpl(client)).leakRef();
599 } 599 }
600 600
601 } // namespace blink 601 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698