| 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 165 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  176 } |  176 } | 
|  177  |  177  | 
|  178 DocumentParser* PluginDocument::createParser() { |  178 DocumentParser* PluginDocument::createParser() { | 
|  179   return PluginDocumentParser::create(this); |  179   return PluginDocumentParser::create(this); | 
|  180 } |  180 } | 
|  181  |  181  | 
|  182 FrameViewBase* PluginDocument::pluginWidget() { |  182 FrameViewBase* PluginDocument::pluginWidget() { | 
|  183   if (m_pluginNode && m_pluginNode->layoutObject()) { |  183   if (m_pluginNode && m_pluginNode->layoutObject()) { | 
|  184     CHECK(m_pluginNode->layoutObject()->isEmbeddedObject()); |  184     CHECK(m_pluginNode->layoutObject()->isEmbeddedObject()); | 
|  185     FrameViewBase* frameViewBase = |  185     FrameViewBase* frameViewBase = | 
|  186         toLayoutEmbeddedObject(m_pluginNode->layoutObject())->widget(); |  186         toLayoutEmbeddedObject(m_pluginNode->layoutObject())->frameViewBase(); | 
|  187     if (!frameViewBase || !frameViewBase->isPluginContainer()) |  187     if (!frameViewBase || !frameViewBase->isPluginContainer()) | 
|  188       return nullptr; |  188       return nullptr; | 
|  189     return frameViewBase; |  189     return frameViewBase; | 
|  190   } |  190   } | 
|  191   return 0; |  191   return 0; | 
|  192 } |  192 } | 
|  193  |  193  | 
|  194 Node* PluginDocument::pluginNode() { |  194 Node* PluginDocument::pluginNode() { | 
|  195   return m_pluginNode.get(); |  195   return m_pluginNode.get(); | 
|  196 } |  196 } | 
|  197  |  197  | 
|  198 void PluginDocument::shutdown() { |  198 void PluginDocument::shutdown() { | 
|  199   // Release the plugin node so that we don't have a circular reference. |  199   // Release the plugin node so that we don't have a circular reference. | 
|  200   m_pluginNode = nullptr; |  200   m_pluginNode = nullptr; | 
|  201   HTMLDocument::shutdown(); |  201   HTMLDocument::shutdown(); | 
|  202 } |  202 } | 
|  203  |  203  | 
|  204 DEFINE_TRACE(PluginDocument) { |  204 DEFINE_TRACE(PluginDocument) { | 
|  205   visitor->trace(m_pluginNode); |  205   visitor->trace(m_pluginNode); | 
|  206   HTMLDocument::trace(visitor); |  206   HTMLDocument::trace(visitor); | 
|  207 } |  207 } | 
|  208  |  208  | 
|  209 }  // namespace blink |  209 }  // namespace blink | 
| OLD | NEW |