Chromium Code Reviews| Index: Source/web/WebPagePopupImpl.h |
| diff --git a/Source/web/WebPagePopupImpl.h b/Source/web/WebPagePopupImpl.h |
| index a3c1cfb567f0a31f1d09fa7dcbe5633adad60261..a3fe4913a23ab5241da815a7ca2f90a078362cf2 100644 |
| --- a/Source/web/WebPagePopupImpl.h |
| +++ b/Source/web/WebPagePopupImpl.h |
| @@ -73,6 +73,7 @@ private: |
| virtual void close() OVERRIDE; |
| virtual bool handleInputEvent(const WebInputEvent&) OVERRIDE; |
| virtual void setFocus(bool) OVERRIDE; |
| + virtual bool isPagePopup() OVERRIDE { return true; } |
| // PageWidgetEventHandler functions |
| virtual bool handleKeyEvent(const WebKeyboardEvent&) OVERRIDE; |
| @@ -95,5 +96,17 @@ private: |
| friend class PagePopupChromeClient; |
| }; |
| +inline WebPagePopupImpl* toWebPagePopupImpl(WebWidget* widget) |
| +{ |
| + ASSERT_WITH_SECURITY_IMPLICATION(widget && widget->isPagePopup()); |
|
tkent
2013/10/08 05:24:04
should accept null widget for consistency.
|
| + return static_cast<WebPagePopupImpl*>(widget); |
| +} |
| + |
| +inline WebPagePopupImpl* toWebPagePopupImpl(WebCore::PagePopup* popup) |
| +{ |
| + ASSERT_WITH_SECURITY_IMPLICATION(!popup); |
|
tkent
2013/10/08 05:24:04
Null pointer has no security implication.
should a
|
| + return static_cast<WebPagePopupImpl*>(popup); |
| +} |
| + |
| } // namespace WebKit |
| #endif // WebPagePopupImpl_h |