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

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

Issue 23549009: Add toPluginDocument() convenience method that takes a reference in argument (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 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/core/html/HTMLPlugInImageElement.cpp ('k') | no next file » | 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 458dfc1039cf05e4fce7f61fc9203bf69dd03689..9764a9dbedfdd5eb0492732840001ec56ed370a3 100644
--- a/Source/core/html/PluginDocument.h
+++ b/Source/core/html/PluginDocument.h
@@ -73,6 +73,12 @@ inline const PluginDocument* toPluginDocument(const Document* document)
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*);
« no previous file with comments | « Source/core/html/HTMLPlugInImageElement.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698