Chromium Code Reviews| 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 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 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 DisposeWidgetSoon(persisted_plugin_.Release()); |
| 154 } | 154 } |
| 155 persisted_plugin_ = plugin; | 155 persisted_plugin_ = plugin; |
| 156 } | 156 } |
| 157 | 157 |
| 158 void HTMLPlugInElement::SetFocused(bool focused) { | |
| 159 // Set focus as kWebFocusTypeNone. The WebFocusType does not matter since | |
| 160 // it is not sent to the plugin in pepper_webplugin_impl::UpdateFocus. | |
| 161 if (plugin_) | |
| 162 plugin_->SetFocused(focused, kWebFocusTypeNone); | |
|
dcheng
2017/04/11 05:36:55
Can we remove the second argument?
joelhockey
2017/04/11 07:08:23
Done, also removed WebFocusType from the trail of
| |
| 163 HTMLFrameOwnerElement::SetFocused(focused); | |
| 164 } | |
| 165 | |
| 158 bool HTMLPlugInElement::RequestObjectInternal( | 166 bool HTMLPlugInElement::RequestObjectInternal( |
| 159 const String& url, | 167 const String& url, |
| 160 const String& mime_type, | 168 const String& mime_type, |
| 161 const Vector<String>& param_names, | 169 const Vector<String>& param_names, |
| 162 const Vector<String>& param_values) { | 170 const Vector<String>& param_values) { |
| 163 if (url.IsEmpty() && mime_type.IsEmpty()) | 171 if (url.IsEmpty() && mime_type.IsEmpty()) |
| 164 return false; | 172 return false; |
| 165 | 173 |
| 166 if (ProtocolIsJavaScript(url)) | 174 if (ProtocolIsJavaScript(url)) |
| 167 return false; | 175 return false; |
| (...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 699 | 707 |
| 700 void HTMLPlugInElement::LazyReattachIfNeeded() { | 708 void HTMLPlugInElement::LazyReattachIfNeeded() { |
| 701 if (!UseFallbackContent() && NeedsPluginUpdate() && GetLayoutObject() && | 709 if (!UseFallbackContent() && NeedsPluginUpdate() && GetLayoutObject() && |
| 702 !IsImageType()) { | 710 !IsImageType()) { |
| 703 LazyReattachIfAttached(); | 711 LazyReattachIfAttached(); |
| 704 SetPersistedPlugin(nullptr); | 712 SetPersistedPlugin(nullptr); |
| 705 } | 713 } |
| 706 } | 714 } |
| 707 | 715 |
| 708 } // namespace blink | 716 } // namespace blink |
| OLD | NEW |