Index: Source/web/ChromeClientImpl.h |
diff --git a/Source/web/ChromeClientImpl.h b/Source/web/ChromeClientImpl.h |
index 1a1e9965258cef52bb52f5dcf3ad9838d1f92bdd..3920766850a38bce646884250ec84cf1954ab3b7 100644 |
--- a/Source/web/ChromeClientImpl.h |
+++ b/Source/web/ChromeClientImpl.h |
@@ -188,6 +188,8 @@ public: |
virtual void didAssociateFormControls(const Vector<RefPtr<WebCore::Element> >&) OVERRIDE; |
private: |
+ virtual bool isChromeClient() const OVERRIDE { return true; } |
+ |
WebNavigationPolicy getNavigationPolicy(); |
void getPopupMenuInfo(WebCore::PopupContainer*, WebPopupMenuInfo*); |
void setCursor(const WebCursorInfo&); |
@@ -217,6 +219,13 @@ private: |
}; |
#endif |
+inline ChromeClientImpl* toChromeClientImpl(WebCore::ChromeClient* client) |
+{ |
+ // No need for null check, as the client returned by Page::client() is actually a reference. |
tkent
2013/10/08 22:22:39
So, we should have
inline ChromeClientImpl* toCh
|
+ ASSERT_WITH_SECURITY_IMPLICATION(client->isChromeClient()); |
+ return static_cast<ChromeClientImpl*>(client); |
+} |
+ |
} // namespace WebKit |
#endif |