Chromium Code Reviews| Index: Source/web/WebPagePopupImpl.h |
| diff --git a/Source/web/WebPagePopupImpl.h b/Source/web/WebPagePopupImpl.h |
| index a3c1cfb567f0a31f1d09fa7dcbe5633adad60261..245481d5d1ab1b2838b4c4e5be96b64206f3c9fb 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; } |
|
tkent
2013/10/10 05:14:29
OVERRIDE -> const OVERRIDE
|
| // PageWidgetEventHandler functions |
| virtual bool handleKeyEvent(const WebKeyboardEvent&) OVERRIDE; |
| @@ -95,5 +96,18 @@ private: |
| friend class PagePopupChromeClient; |
| }; |
| +inline WebPagePopupImpl* toWebPagePopupImpl(WebWidget* widget) |
| +{ |
| + ASSERT_WITH_SECURITY_IMPLICATION(!widget || widget->isPagePopup()); |
| + return static_cast<WebPagePopupImpl*>(widget); |
| +} |
| + |
| +inline WebPagePopupImpl* toWebPagePopupImpl(WebCore::PagePopup* popup) |
| +{ |
| + // WebPagePopupImpl is the only implementation of WebCore::PagePopup, so |
| + // no further checking required. |
| + return static_cast<WebPagePopupImpl*>(popup); |
| +} |
| + |
| } // namespace WebKit |
| #endif // WebPagePopupImpl_h |