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

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

Issue 1686483002: Oilpan: Remove most WillBe types from the code base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Stefan Schimanski (1Stein@gmx.de) 4 * (C) 2000 Stefan Schimanski (1Stein@gmx.de)
5 * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. 5 * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 && !wouldLoadAsNetscapePlugin(m_url, m_serviceType) 159 && !wouldLoadAsNetscapePlugin(m_url, m_serviceType)
160 && !m_isDelayingLoadEvent) { 160 && !m_isDelayingLoadEvent) {
161 m_isDelayingLoadEvent = true; 161 m_isDelayingLoadEvent = true;
162 document().incrementLoadEventDelayCount(); 162 document().incrementLoadEventDelayCount();
163 document().loadPluginsSoon(); 163 document().loadPluginsSoon();
164 } 164 }
165 } 165 }
166 166
167 void HTMLPlugInElement::updateWidget() 167 void HTMLPlugInElement::updateWidget()
168 { 168 {
169 RefPtrWillBeRawPtr<HTMLPlugInElement> protector(this); 169 RawPtr<HTMLPlugInElement> protector(this);
170 updateWidgetInternal(); 170 updateWidgetInternal();
171 if (m_isDelayingLoadEvent) { 171 if (m_isDelayingLoadEvent) {
172 m_isDelayingLoadEvent = false; 172 m_isDelayingLoadEvent = false;
173 document().decrementLoadEventDelayCount(); 173 document().decrementLoadEventDelayCount();
174 } 174 }
175 } 175 }
176 176
177 void HTMLPlugInElement::removedFrom(ContainerNode* insertionPoint) 177 void HTMLPlugInElement::removedFrom(ContainerNode* insertionPoint)
178 { 178 {
179 // If we've persisted the plugin and we're removed from the tree then 179 // If we've persisted the plugin and we're removed from the tree then
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 // FIXME: Mouse down and scroll events are passed down to plugin via custom 358 // FIXME: Mouse down and scroll events are passed down to plugin via custom
359 // code in EventHandler; these code paths should be united. 359 // code in EventHandler; these code paths should be united.
360 360
361 LayoutObject* r = layoutObject(); 361 LayoutObject* r = layoutObject();
362 if (!r || !r->isLayoutPart()) 362 if (!r || !r->isLayoutPart())
363 return; 363 return;
364 if (r->isEmbeddedObject()) { 364 if (r->isEmbeddedObject()) {
365 if (LayoutEmbeddedItem(toLayoutEmbeddedObject(r)).showsUnavailablePlugin Indicator()) 365 if (LayoutEmbeddedItem(toLayoutEmbeddedObject(r)).showsUnavailablePlugin Indicator())
366 return; 366 return;
367 } 367 }
368 RefPtrWillBeRawPtr<Widget> widget = toLayoutPart(r)->widget(); 368 RawPtr<Widget> widget = toLayoutPart(r)->widget();
369 if (!widget) 369 if (!widget)
370 return; 370 return;
371 widget->handleEvent(event); 371 widget->handleEvent(event);
372 if (event->defaultHandled()) 372 if (event->defaultHandled())
373 return; 373 return;
374 HTMLFrameOwnerElement::defaultEventHandler(event); 374 HTMLFrameOwnerElement::defaultEventHandler(event);
375 } 375 }
376 376
377 LayoutPart* HTMLPlugInElement::layoutPartForJSBindings() const 377 LayoutPart* HTMLPlugInElement::layoutPartForJSBindings() const
378 { 378 {
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
509 509
510 VLOG(1) << this << " Plugin URL: " << m_url; 510 VLOG(1) << this << " Plugin URL: " << m_url;
511 VLOG(1) << "Loaded URL: " << url.getString(); 511 VLOG(1) << "Loaded URL: " << url.getString();
512 m_loadedUrl = url; 512 m_loadedUrl = url;
513 513
514 if (m_persistedPluginWidget) { 514 if (m_persistedPluginWidget) {
515 setWidget(m_persistedPluginWidget.release()); 515 setWidget(m_persistedPluginWidget.release());
516 } else { 516 } else {
517 bool loadManually = document().isPluginDocument() && !document().contain sPlugins(); 517 bool loadManually = document().isPluginDocument() && !document().contain sPlugins();
518 FrameLoaderClient::DetachedPluginPolicy policy = requireLayoutObject ? F rameLoaderClient::FailOnDetachedPlugin : FrameLoaderClient::AllowDetachedPlugin; 518 FrameLoaderClient::DetachedPluginPolicy policy = requireLayoutObject ? F rameLoaderClient::FailOnDetachedPlugin : FrameLoaderClient::AllowDetachedPlugin;
519 RefPtrWillBeRawPtr<Widget> widget = frame->loader().client()->createPlug in(this, url, paramNames, paramValues, mimeType, loadManually, policy); 519 RawPtr<Widget> widget = frame->loader().client()->createPlugin(this, url , paramNames, paramValues, mimeType, loadManually, policy);
520 if (!widget) { 520 if (!widget) {
521 if (!layoutItem.isNull() && !layoutItem.showsUnavailablePluginIndica tor()) 521 if (!layoutItem.isNull() && !layoutItem.showsUnavailablePluginIndica tor())
522 layoutItem.setPluginUnavailabilityReason(LayoutEmbeddedObject::P luginMissing); 522 layoutItem.setPluginUnavailabilityReason(LayoutEmbeddedObject::P luginMissing);
523 return false; 523 return false;
524 } 524 }
525 525
526 if (!layoutItem.isNull()) 526 if (!layoutItem.isNull())
527 setWidget(widget); 527 setWidget(widget);
528 else 528 else
529 setPersistedPluginWidget(widget.get()); 529 setPersistedPluginWidget(widget.get());
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
631 return openShadowRoot(); 631 return openShadowRoot();
632 } 632 }
633 633
634 void HTMLPlugInElement::lazyReattachIfNeeded() 634 void HTMLPlugInElement::lazyReattachIfNeeded()
635 { 635 {
636 if (!useFallbackContent() && needsWidgetUpdate() && layoutObject() && !isIma geType()) 636 if (!useFallbackContent() && needsWidgetUpdate() && layoutObject() && !isIma geType())
637 lazyReattachIfAttached(); 637 lazyReattachIfAttached();
638 } 638 }
639 639
640 } // namespace blink 640 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLPlugInElement.h ('k') | third_party/WebKit/Source/core/html/HTMLProgressElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698