| OLD | NEW |
| 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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 HTMLFrameOwnerElement::Trace(visitor); | 97 HTMLFrameOwnerElement::Trace(visitor); |
| 98 } | 98 } |
| 99 | 99 |
| 100 void HTMLPlugInElement::SetPlugin(PluginView* plugin) { | 100 void HTMLPlugInElement::SetPlugin(PluginView* plugin) { |
| 101 if (plugin == plugin_) | 101 if (plugin == plugin_) |
| 102 return; | 102 return; |
| 103 | 103 |
| 104 // Remove and dispose the old plugin if we had one. | 104 // Remove and dispose the old plugin if we had one. |
| 105 if (plugin_) { | 105 if (plugin_) { |
| 106 GetDocument().View()->RemovePlugin(plugin_); | 106 GetDocument().View()->RemovePlugin(plugin_); |
| 107 DisposeWidgetSoon(plugin_); | 107 DisposeFrameOrPluginSoon(plugin_); |
| 108 } | 108 } |
| 109 plugin_ = plugin; | 109 plugin_ = plugin; |
| 110 | 110 |
| 111 // TODO(joelhockey): I copied the rest of this method from | 111 // TODO(joelhockey): I copied the rest of this method from |
| 112 // HTMLFrameOwnerElement. There may be parts that can be removed | 112 // HTMLFrameOwnerElement. There may be parts that can be removed |
| 113 // such as the layoutPartItem.isNull check and DCHECKs. | 113 // such as the layoutPartItem.isNull check and DCHECKs. |
| 114 // Once widget tree is removed (FrameView::m_children), try to unify | 114 // Once widget tree is removed (FrameView::m_children), try to unify |
| 115 // this code with HTMLFrameOwnerElement::setWidget. | 115 // this code with HTMLFrameOwnerElement::setWidget. |
| 116 LayoutPart* layout_part = ToLayoutPart(GetLayoutObject()); | 116 LayoutPart* layout_part = ToLayoutPart(GetLayoutObject()); |
| 117 LayoutPartItem layout_part_item = LayoutPartItem(layout_part); | 117 LayoutPartItem layout_part_item = LayoutPartItem(layout_part); |
| (...skipping 25 matching lines...) Expand all Loading... |
| 143 cache->ChildrenChanged(layout_part); | 143 cache->ChildrenChanged(layout_part); |
| 144 } | 144 } |
| 145 return plugin_.Release(); | 145 return plugin_.Release(); |
| 146 } | 146 } |
| 147 | 147 |
| 148 void HTMLPlugInElement::SetPersistedPlugin(PluginView* plugin) { | 148 void HTMLPlugInElement::SetPersistedPlugin(PluginView* plugin) { |
| 149 if (persisted_plugin_ == plugin) | 149 if (persisted_plugin_ == plugin) |
| 150 return; | 150 return; |
| 151 if (persisted_plugin_) { | 151 if (persisted_plugin_) { |
| 152 persisted_plugin_->Hide(); | 152 persisted_plugin_->Hide(); |
| 153 DisposeWidgetSoon(persisted_plugin_.Release()); | 153 DisposeFrameOrPluginSoon(persisted_plugin_.Release()); |
| 154 } | 154 } |
| 155 persisted_plugin_ = plugin; | 155 persisted_plugin_ = plugin; |
| 156 } | 156 } |
| 157 | 157 |
| 158 void HTMLPlugInElement::SetFocused(bool focused, WebFocusType focus_type) { | 158 void HTMLPlugInElement::SetFocused(bool focused, WebFocusType focus_type) { |
| 159 if (plugin_) | 159 if (plugin_) |
| 160 plugin_->SetFocused(focused, focus_type); | 160 plugin_->SetFocused(focused, focus_type); |
| 161 HTMLFrameOwnerElement::SetFocused(focused, focus_type); | 161 HTMLFrameOwnerElement::SetFocused(focused, focus_type); |
| 162 } | 162 } |
| 163 | 163 |
| (...skipping 543 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 707 | 707 |
| 708 void HTMLPlugInElement::LazyReattachIfNeeded() { | 708 void HTMLPlugInElement::LazyReattachIfNeeded() { |
| 709 if (!UseFallbackContent() && NeedsPluginUpdate() && GetLayoutObject() && | 709 if (!UseFallbackContent() && NeedsPluginUpdate() && GetLayoutObject() && |
| 710 !IsImageType()) { | 710 !IsImageType()) { |
| 711 LazyReattachIfAttached(); | 711 LazyReattachIfAttached(); |
| 712 SetPersistedPlugin(nullptr); | 712 SetPersistedPlugin(nullptr); |
| 713 } | 713 } |
| 714 } | 714 } |
| 715 | 715 |
| 716 } // namespace blink | 716 } // namespace blink |
| OLD | NEW |