summaryrefslogtreecommitdiff
path: root/Source/WebCore/html/PluginDocument.h
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
commit1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch)
tree46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/WebCore/html/PluginDocument.h
parent32761a6cee1d0dee366b885b7b9c777e67885688 (diff)
downloadWebKitGtk-tarball-master.tar.gz
Diffstat (limited to 'Source/WebCore/html/PluginDocument.h')
-rw-r--r--Source/WebCore/html/PluginDocument.h38
1 files changed, 16 insertions, 22 deletions
diff --git a/Source/WebCore/html/PluginDocument.h b/Source/WebCore/html/PluginDocument.h
index e6bf5bd3a..bd7ed6ca1 100644
--- a/Source/WebCore/html/PluginDocument.h
+++ b/Source/WebCore/html/PluginDocument.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2006, 2008, 2009, 2013 Apple Inc. All rights reserved.
+ * Copyright (C) 2006-2017 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -10,10 +10,10 @@
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
- * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
@@ -22,8 +22,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef PluginDocument_h
-#define PluginDocument_h
+#pragma once
#include "HTMLDocument.h"
@@ -34,38 +33,33 @@ class Widget;
class PluginDocument final : public HTMLDocument {
public:
- static PassRefPtr<PluginDocument> create(Frame* frame, const URL& url)
+ static Ref<PluginDocument> create(Frame* frame, const URL& url)
{
- return adoptRef(new PluginDocument(frame, url));
+ return adoptRef(*new PluginDocument(frame, url));
}
- void setPluginElement(PassRefPtr<HTMLPlugInElement>);
-
- Widget* pluginWidget();
+ WEBCORE_EXPORT Widget* pluginWidget();
HTMLPlugInElement* pluginElement() { return m_pluginElement.get(); }
+ void setPluginElement(HTMLPlugInElement&);
void detachFromPluginElement();
void cancelManualPluginLoad();
- bool shouldLoadPluginManually() { return m_shouldLoadPluginManually; }
+ bool shouldLoadPluginManually() const { return m_shouldLoadPluginManually; }
private:
PluginDocument(Frame*, const URL&);
- virtual PassRefPtr<DocumentParser> createParser() override;
-
- void setShouldLoadPluginManually(bool loadManually) { m_shouldLoadPluginManually = loadManually; }
+ Ref<DocumentParser> createParser() final;
- bool m_shouldLoadPluginManually;
RefPtr<HTMLPlugInElement> m_pluginElement;
+ bool m_shouldLoadPluginManually { true };
};
-inline bool isPluginDocument(const Document& document) { return document.isPluginDocument(); }
-void isPluginDocument(const PluginDocument&); // Catch unnecessary runtime check of type known at compile time.
-
-DOCUMENT_TYPE_CASTS(PluginDocument)
-
-}
+} // namespace WebCore
-#endif // PluginDocument_h
+SPECIALIZE_TYPE_TRAITS_BEGIN(WebCore::PluginDocument)
+ static bool isType(const WebCore::Document& document) { return document.isPluginDocument(); }
+ static bool isType(const WebCore::Node& node) { return is<WebCore::Document>(node) && isType(downcast<WebCore::Document>(node)); }
+SPECIALIZE_TYPE_TRAITS_END()