Chromium Code Reviews| Index: Source/web/WebPopupMenuImpl.h |
| diff --git a/Source/web/WebPopupMenuImpl.h b/Source/web/WebPopupMenuImpl.h |
| index f2decbb1b550a02fc0a1caf7e14b6504752a3931..dc2db53ca0c37378901c5280217ff6241b349a6e 100644 |
| --- a/Source/web/WebPopupMenuImpl.h |
| +++ b/Source/web/WebPopupMenuImpl.h |
| @@ -86,6 +86,7 @@ public: |
| virtual bool caretOrSelectionRange(size_t* location, size_t* length) OVERRIDE; |
| virtual void setTextDirection(WebTextDirection) OVERRIDE; |
| virtual bool isAcceleratedCompositingActive() const OVERRIDE { return false; } |
| + virtual bool isPagePopup() const OVERRIDE { return true; } |
| // WebPopupMenuImpl |
| void initialize(WebCore::FramelessScrollView* widget, const WebRect& bounds); |
| @@ -134,6 +135,20 @@ public: |
| WebCore::FramelessScrollView* m_widget; |
| }; |
| +inline WebPopupMenuImpl* toWebPopupMenuImpl(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<WebPopupMenuImpl*>(widget); |
| +} |
| + |
| +inline WebPopupMenuImpl* toWebPopupMenuImpl(WebCore::FramelessScrollViewClient* client) |
| +{ |
| + // We need not check for type of FramelessScrollViewClient, since WebPopupMenuImpl |
| + // is the only derived class from FramelessScrollViewClient. |
| + ASSERT_WITH_SECURITY_IMPLICATION(client); |
|
tkent
2013/10/08 05:24:04
null pointer has no security implication.
should a
|
| + return static_cast<WebPopupMenuImpl*>(client); |
| +} |
| + |
| } // namespace WebKit |
| #endif |