Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(81)

Unified Diff: Source/web/ChromeClientImpl.h

Issue 26450004: Cleanup: Adding more conversion helper interfaces. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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

Powered by Google App Engine
This is Rietveld 408576698