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

Unified Diff: Source/web/WebFrameImpl.h

Issue 23671002: Refactoring: Add toWebFrameImpl() interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Corrected as per review commments. Created 7 years, 4 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
« no previous file with comments | « Source/web/WebDOMMessageEvent.cpp ('k') | Source/web/WebFrameImpl.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebFrameImpl.h
diff --git a/Source/web/WebFrameImpl.h b/Source/web/WebFrameImpl.h
index b6e0b4193994e9e27f2f64b6fb4b05eb72fc664d..104f8497aa3281da92443b7c2d7f0a33399a3d2f 100644
--- a/Source/web/WebFrameImpl.h
+++ b/Source/web/WebFrameImpl.h
@@ -499,6 +499,19 @@ private:
bool m_inSameDocumentHistoryLoad;
};
+inline WebFrameImpl* toWebFrameImpl(WebFrame* webFrame)
+{
+ return static_cast<WebFrameImpl*>(webFrame);
+}
+
+inline const WebFrameImpl* toWebFrameImpl(const WebFrame* webFrame)
+{
+ return static_cast<const WebFrameImpl*>(webFrame);
+}
+
+// This will catch anyone doing an unnecessary cast.
+void toWebFrameImpl(const WebFrameImpl*);
+
} // namespace WebKit
#endif
« no previous file with comments | « Source/web/WebDOMMessageEvent.cpp ('k') | Source/web/WebFrameImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698