| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2008 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 #include "core/html/PluginDocument.h" | 26 #include "core/html/PluginDocument.h" |
| 27 | 27 |
| 28 #include "bindings/core/v8/ExceptionStatePlaceholder.h" | 28 #include "bindings/core/v8/ExceptionStatePlaceholder.h" |
| 29 #include "core/HTMLNames.h" | 29 #include "core/HTMLNames.h" |
| 30 #include "core/dom/RawDataDocumentParser.h" | 30 #include "core/dom/RawDataDocumentParser.h" |
| 31 #include "core/frame/FrameView.h" | 31 #include "core/frame/FrameView.h" |
| 32 #include "core/frame/LocalFrame.h" | 32 #include "core/frame/LocalFrame.h" |
| 33 #include "core/html/HTMLBodyElement.h" | 33 #include "core/html/HTMLBodyElement.h" |
| 34 #include "core/html/HTMLEmbedElement.h" | 34 #include "core/html/HTMLEmbedElement.h" |
| 35 #include "core/html/HTMLHtmlElement.h" | 35 #include "core/html/HTMLHtmlElement.h" |
| 36 #include "core/layout/LayoutEmbeddedObject.h" |
| 36 #include "core/loader/DocumentLoader.h" | 37 #include "core/loader/DocumentLoader.h" |
| 37 #include "core/loader/FrameLoader.h" | 38 #include "core/loader/FrameLoader.h" |
| 38 #include "core/loader/FrameLoaderClient.h" | 39 #include "core/loader/FrameLoaderClient.h" |
| 39 #include "core/plugins/PluginView.h" | 40 #include "core/plugins/PluginView.h" |
| 40 #include "core/rendering/RenderEmbeddedObject.h" | |
| 41 | 41 |
| 42 namespace blink { | 42 namespace blink { |
| 43 | 43 |
| 44 using namespace HTMLNames; | 44 using namespace HTMLNames; |
| 45 | 45 |
| 46 // FIXME: Share more code with MediaDocumentParser. | 46 // FIXME: Share more code with MediaDocumentParser. |
| 47 class PluginDocumentParser : public RawDataDocumentParser { | 47 class PluginDocumentParser : public RawDataDocumentParser { |
| 48 public: | 48 public: |
| 49 static PassRefPtrWillBeRawPtr<PluginDocumentParser> create(PluginDocument* d
ocument) | 49 static PassRefPtrWillBeRawPtr<PluginDocumentParser> create(PluginDocument* d
ocument) |
| 50 { | 50 { |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 | 161 |
| 162 PassRefPtrWillBeRawPtr<DocumentParser> PluginDocument::createParser() | 162 PassRefPtrWillBeRawPtr<DocumentParser> PluginDocument::createParser() |
| 163 { | 163 { |
| 164 return PluginDocumentParser::create(this); | 164 return PluginDocumentParser::create(this); |
| 165 } | 165 } |
| 166 | 166 |
| 167 Widget* PluginDocument::pluginWidget() | 167 Widget* PluginDocument::pluginWidget() |
| 168 { | 168 { |
| 169 if (m_pluginNode && m_pluginNode->renderer()) { | 169 if (m_pluginNode && m_pluginNode->renderer()) { |
| 170 ASSERT(m_pluginNode->renderer()->isEmbeddedObject()); | 170 ASSERT(m_pluginNode->renderer()->isEmbeddedObject()); |
| 171 return toRenderEmbeddedObject(m_pluginNode->renderer())->widget(); | 171 return toLayoutEmbeddedObject(m_pluginNode->renderer())->widget(); |
| 172 } | 172 } |
| 173 return 0; | 173 return 0; |
| 174 } | 174 } |
| 175 | 175 |
| 176 Node* PluginDocument::pluginNode() | 176 Node* PluginDocument::pluginNode() |
| 177 { | 177 { |
| 178 return m_pluginNode.get(); | 178 return m_pluginNode.get(); |
| 179 } | 179 } |
| 180 | 180 |
| 181 void PluginDocument::detach(const AttachContext& context) | 181 void PluginDocument::detach(const AttachContext& context) |
| 182 { | 182 { |
| 183 // Release the plugin node so that we don't have a circular reference. | 183 // Release the plugin node so that we don't have a circular reference. |
| 184 m_pluginNode = nullptr; | 184 m_pluginNode = nullptr; |
| 185 HTMLDocument::detach(context); | 185 HTMLDocument::detach(context); |
| 186 } | 186 } |
| 187 | 187 |
| 188 void PluginDocument::trace(Visitor* visitor) | 188 void PluginDocument::trace(Visitor* visitor) |
| 189 { | 189 { |
| 190 visitor->trace(m_pluginNode); | 190 visitor->trace(m_pluginNode); |
| 191 HTMLDocument::trace(visitor); | 191 HTMLDocument::trace(visitor); |
| 192 } | 192 } |
| 193 | 193 |
| 194 } | 194 } |
| OLD | NEW |