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

Unified Diff: Source/web/ChromeClientImpl.h

Issue 26434002: Cleanup: Add more conversion helpers for usage. (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..9f59643e8b42f9a83fb688c8c8b7fad5a828f9e2 100644
--- a/Source/web/ChromeClientImpl.h
+++ b/Source/web/ChromeClientImpl.h
@@ -217,6 +217,14 @@ private:
};
#endif
+inline ChromeClientImpl* toChromeClientImpl(WebCore::ChromeClient* client)
+{
+ // 1. The client returned by Page::client() is a reference, hence never null.
+ // 2. There is no other class derived from ChromeClient other than ChromeClientImpl.
tkent 2013/10/08 05:24:04 It's incorrect. AFAIK, we have EmptyChromeClient,
+ // Hence, we don't need ASSERT here to check for either of the conditions.
+ return static_cast<ChromeClientImpl*>(client);
+}
+
} // namespace WebKit
#endif

Powered by Google App Engine
This is Rietveld 408576698