Chromium Code Reviews| Index: Source/web/WebPopupMenuImpl.h |
| diff --git a/Source/web/WebPopupMenuImpl.h b/Source/web/WebPopupMenuImpl.h |
| index f2decbb1b550a02fc0a1caf7e14b6504752a3931..1b7548d86368e53c0ae38da6f60e8589b0d78c92 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; } |
|
tkent
2013/10/10 02:17:58
isPagePopup -> isPopupMenu
r.kasibhatla
2013/10/10 04:22:41
Done.
|
| // WebPopupMenuImpl |
| void initialize(WebCore::FramelessScrollView* widget, const WebRect& bounds); |
| @@ -134,6 +135,19 @@ public: |
| WebCore::FramelessScrollView* m_widget; |
| }; |
| +inline WebPopupMenuImpl* toWebPopupMenuImpl(WebWidget* widget) |
| +{ |
| + ASSERT_WITH_SECURITY_IMPLICATION(!widget || widget->isPagePopup()); |
|
tkent
2013/10/10 02:17:58
isPagePopup -> isPopupMenu
r.kasibhatla
2013/10/10 04:22:41
Done.
|
| + return static_cast<WebPopupMenuImpl*>(widget); |
| +} |
| + |
| +inline WebPopupMenuImpl* toWebPopupMenuImpl(WebCore::FramelessScrollViewClient* client) |
| +{ |
| + // WebPopupMenuImpl is the only implementation of FramelessScrollViewClient, |
| + // so no need for further checking. |
| + return static_cast<WebPopupMenuImpl*>(client); |
| +} |
| + |
| } // namespace WebKit |
| #endif |