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

Unified Diff: Source/core/html/PluginDocument.h

Issue 107073003: Introduce DEFINE_DOCUMENT_TYPE_CASTS, and use it (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years 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/core/html/ImageDocument.h ('k') | Source/core/svg/SVGDocument.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/PluginDocument.h
diff --git a/Source/core/html/PluginDocument.h b/Source/core/html/PluginDocument.h
index 9764a9dbedfdd5eb0492732840001ec56ed370a3..590cb30303ff9aeebb2cf4f5cb706e5e7581296e 100644
--- a/Source/core/html/PluginDocument.h
+++ b/Source/core/html/PluginDocument.h
@@ -61,26 +61,7 @@ private:
RefPtr<Node> m_pluginNode;
};
-inline PluginDocument* toPluginDocument(Document* document)
-{
- ASSERT_WITH_SECURITY_IMPLICATION(!document || document->isPluginDocument());
- return static_cast<PluginDocument*>(document);
-}
-
-inline const PluginDocument* toPluginDocument(const Document* document)
-{
- ASSERT_WITH_SECURITY_IMPLICATION(!document || document->isPluginDocument());
- return static_cast<const PluginDocument*>(document);
-}
-
-inline PluginDocument& toPluginDocument(Document& document)
-{
- ASSERT_WITH_SECURITY_IMPLICATION(document.isPluginDocument());
- return static_cast<PluginDocument&>(document);
-}
-
-// This will catch anyone doing an unnecessary cast.
-void toPluginDocument(const PluginDocument*);
+DEFINE_DOCUMENT_TYPE_CASTS(PluginDocument);
}
« no previous file with comments | « Source/core/html/ImageDocument.h ('k') | Source/core/svg/SVGDocument.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698