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

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

Issue 2723993002: Rename platform/Widget to platform/FrameViewBase in core. (Closed)
Patch Set: Created 3 years, 9 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
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 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 if (PluginView* view = pluginView()) 151 if (PluginView* view = pluginView())
152 view->didReceiveData(data, length); 152 view->didReceiveData(data, length);
153 } 153 }
154 154
155 void PluginDocumentParser::finish() { 155 void PluginDocumentParser::finish() {
156 m_embedElement = nullptr; 156 m_embedElement = nullptr;
157 RawDataDocumentParser::finish(); 157 RawDataDocumentParser::finish();
158 } 158 }
159 159
160 PluginView* PluginDocumentParser::pluginView() const { 160 PluginView* PluginDocumentParser::pluginView() const {
161 if (Widget* widget = toPluginDocument(document())->pluginWidget()) { 161 if (FrameViewBase* frameViewBase =
162 SECURITY_DCHECK(widget->isPluginContainer()); 162 toPluginDocument(document())->pluginWidget()) {
163 return toPluginView(widget); 163 SECURITY_DCHECK(frameViewBase->isPluginContainer());
164 return toPluginView(frameViewBase);
164 } 165 }
165 return 0; 166 return 0;
166 } 167 }
167 168
168 PluginDocument::PluginDocument(const DocumentInit& initializer) 169 PluginDocument::PluginDocument(const DocumentInit& initializer)
169 : HTMLDocument(initializer, PluginDocumentClass) { 170 : HTMLDocument(initializer, PluginDocumentClass) {
170 setCompatibilityMode(QuirksMode); 171 setCompatibilityMode(QuirksMode);
171 lockCompatibilityMode(); 172 lockCompatibilityMode();
172 UseCounter::count(*this, UseCounter::PluginDocument); 173 UseCounter::count(*this, UseCounter::PluginDocument);
173 if (!isInMainFrame()) 174 if (!isInMainFrame())
174 UseCounter::count(*this, UseCounter::PluginDocumentInFrame); 175 UseCounter::count(*this, UseCounter::PluginDocumentInFrame);
175 } 176 }
176 177
177 DocumentParser* PluginDocument::createParser() { 178 DocumentParser* PluginDocument::createParser() {
178 return PluginDocumentParser::create(this); 179 return PluginDocumentParser::create(this);
179 } 180 }
180 181
181 Widget* PluginDocument::pluginWidget() { 182 FrameViewBase* PluginDocument::pluginWidget() {
182 if (m_pluginNode && m_pluginNode->layoutObject()) { 183 if (m_pluginNode && m_pluginNode->layoutObject()) {
183 CHECK(m_pluginNode->layoutObject()->isEmbeddedObject()); 184 CHECK(m_pluginNode->layoutObject()->isEmbeddedObject());
184 Widget* widget = 185 FrameViewBase* frameViewBase =
185 toLayoutEmbeddedObject(m_pluginNode->layoutObject())->widget(); 186 toLayoutEmbeddedObject(m_pluginNode->layoutObject())->widget();
186 if (!widget || !widget->isPluginContainer()) 187 if (!frameViewBase || !frameViewBase->isPluginContainer())
187 return nullptr; 188 return nullptr;
188 return widget; 189 return frameViewBase;
189 } 190 }
190 return 0; 191 return 0;
191 } 192 }
192 193
193 Node* PluginDocument::pluginNode() { 194 Node* PluginDocument::pluginNode() {
194 return m_pluginNode.get(); 195 return m_pluginNode.get();
195 } 196 }
196 197
197 void PluginDocument::shutdown() { 198 void PluginDocument::shutdown() {
198 // 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.
199 m_pluginNode = nullptr; 200 m_pluginNode = nullptr;
200 HTMLDocument::shutdown(); 201 HTMLDocument::shutdown();
201 } 202 }
202 203
203 DEFINE_TRACE(PluginDocument) { 204 DEFINE_TRACE(PluginDocument) {
204 visitor->trace(m_pluginNode); 205 visitor->trace(m_pluginNode);
205 HTMLDocument::trace(visitor); 206 HTMLDocument::trace(visitor);
206 } 207 }
207 208
208 } // namespace blink 209 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp ('k') | third_party/WebKit/Source/core/input/EventHandler.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698