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

Side by Side Diff: third_party/WebKit/Source/core/html/PluginDocument.cpp

Issue 2262053002: Allow rewriting of Flash embeds in PluginDocument. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLEmbedElement.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 172
173 DocumentParser* PluginDocument::createParser() 173 DocumentParser* PluginDocument::createParser()
174 { 174 {
175 return PluginDocumentParser::create(this); 175 return PluginDocumentParser::create(this);
176 } 176 }
177 177
178 Widget* PluginDocument::pluginWidget() 178 Widget* PluginDocument::pluginWidget()
179 { 179 {
180 if (m_pluginNode && m_pluginNode->layoutObject()) { 180 if (m_pluginNode && m_pluginNode->layoutObject()) {
181 CHECK(m_pluginNode->layoutObject()->isEmbeddedObject()); 181 CHECK(m_pluginNode->layoutObject()->isEmbeddedObject());
182 return toLayoutEmbeddedObject(m_pluginNode->layoutObject())->widget(); 182 Widget* widget = toLayoutEmbeddedObject(m_pluginNode->layoutObject())->w idget();
183 if (!widget || !widget->isPluginContainer())
184 return nullptr;
185 return widget;
183 } 186 }
184 return 0; 187 return 0;
185 } 188 }
186 189
187 Node* PluginDocument::pluginNode() 190 Node* PluginDocument::pluginNode()
188 { 191 {
189 return m_pluginNode.get(); 192 return m_pluginNode.get();
190 } 193 }
191 194
192 void PluginDocument::detachLayoutTree(const AttachContext& context) 195 void PluginDocument::detachLayoutTree(const AttachContext& context)
193 { 196 {
194 // Release the plugin node so that we don't have a circular reference. 197 // Release the plugin node so that we don't have a circular reference.
195 m_pluginNode = nullptr; 198 m_pluginNode = nullptr;
196 HTMLDocument::detachLayoutTree(context); 199 HTMLDocument::detachLayoutTree(context);
197 } 200 }
198 201
199 DEFINE_TRACE(PluginDocument) 202 DEFINE_TRACE(PluginDocument)
200 { 203 {
201 visitor->trace(m_pluginNode); 204 visitor->trace(m_pluginNode);
202 HTMLDocument::trace(visitor); 205 HTMLDocument::trace(visitor);
203 } 206 }
204 207
205 } // namespace blink 208 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLEmbedElement.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698