| 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 * Copyright (C) 2004, 2006, 2007, 2008, 2009, 2012 Apple Inc. All rights | 4 * Copyright (C) 2004, 2006, 2007, 2008, 2009, 2012 Apple Inc. All rights |
| 5 * reserved. | 5 * reserved. |
| 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. |
| 11 * | 11 * |
| 12 * This library is distributed in the hope that it will be useful, | 12 * This library is distributed in the hope that it will be useful, |
| 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 15 * Library General Public License for more details. | 15 * Library General Public License for more details. |
| 16 * | 16 * |
| 17 * You should have received a copy of the GNU Library General Public License | 17 * You should have received a copy of the GNU Library General Public License |
| 18 * along with this library; see the file COPYING.LIB. If not, write to | 18 * along with this library; see the file COPYING.LIB. If not, write to |
| 19 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 19 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
| 20 * Boston, MA 02110-1301, USA. | 20 * Boston, MA 02110-1301, USA. |
| 21 * | 21 * |
| 22 */ | 22 */ |
| 23 | 23 |
| 24 #ifndef HTMLPlugInElement_h | 24 #ifndef HTMLPlugInElement_h |
| 25 #define HTMLPlugInElement_h | 25 #define HTMLPlugInElement_h |
| 26 | 26 |
| 27 #include "core/CoreExport.h" | 27 #include "core/CoreExport.h" |
| 28 #include "core/html/HTMLFrameOwnerElement.h" | 28 #include "core/html/HTMLFrameOwnerElement.h" |
| 29 #include "platform/bindings/ActiveScriptWrappable.h" |
| 29 #include "platform/bindings/SharedPersistent.h" | 30 #include "platform/bindings/SharedPersistent.h" |
| 30 #include "v8/include/v8.h" | 31 #include "v8/include/v8.h" |
| 31 | 32 |
| 32 namespace blink { | 33 namespace blink { |
| 33 | 34 |
| 34 class HTMLImageLoader; | 35 class HTMLImageLoader; |
| 35 class LayoutPart; | 36 class LayoutPart; |
| 36 class LayoutEmbeddedItem; | 37 class LayoutEmbeddedItem; |
| 37 class PluginView; | 38 class PluginView; |
| 38 | 39 |
| 39 enum PreferPlugInsForImagesOption { | 40 enum PreferPlugInsForImagesOption { |
| 40 kShouldPreferPlugInsForImages, | 41 kShouldPreferPlugInsForImages, |
| 41 kShouldNotPreferPlugInsForImages | 42 kShouldNotPreferPlugInsForImages |
| 42 }; | 43 }; |
| 43 | 44 |
| 44 class CORE_EXPORT HTMLPlugInElement : public HTMLFrameOwnerElement { | 45 class CORE_EXPORT HTMLPlugInElement |
| 46 : public HTMLFrameOwnerElement, |
| 47 public ActiveScriptWrappable<HTMLPlugInElement> { |
| 48 USING_GARBAGE_COLLECTED_MIXIN(HTMLPlugInElement); |
| 49 |
| 45 public: | 50 public: |
| 46 ~HTMLPlugInElement() override; | 51 ~HTMLPlugInElement() override; |
| 47 DECLARE_VIRTUAL_TRACE(); | 52 DECLARE_VIRTUAL_TRACE(); |
| 48 | 53 |
| 54 bool HasPendingActivity() const final; |
| 55 |
| 49 void SetFocused(bool, WebFocusType) override; | 56 void SetFocused(bool, WebFocusType) override; |
| 50 void ResetInstance(); | 57 void ResetInstance(); |
| 51 // TODO(dcheng): Consider removing this, since HTMLEmbedElementLegacyCall | 58 // TODO(dcheng): Consider removing this, since HTMLEmbedElementLegacyCall |
| 52 // and HTMLObjectElementLegacyCall usage is extremely low. | 59 // and HTMLObjectElementLegacyCall usage is extremely low. |
| 53 v8::Local<v8::Object> PluginWrapper(); | 60 v8::Local<v8::Object> PluginWrapper(); |
| 54 // TODO(joelhockey): Clean up PluginWidget and OwnedPlugin (maybe also | 61 // TODO(joelhockey): Clean up PluginWidget and OwnedPlugin (maybe also |
| 55 // PluginWrapper). It would be good to remove and/or rename some of these. | 62 // PluginWrapper). It would be good to remove and/or rename some of these. |
| 56 // PluginWidget and OwnedPlugin both return the plugin that is stored as | 63 // PluginWidget and OwnedPlugin both return the plugin that is stored as |
| 57 // widget in HTMLFrameOwnerElement. However PluginWidget will synchronously | 64 // widget in HTMLFrameOwnerElement. However PluginWidget will synchronously |
| 58 // create the plugin if required by calling LayoutPartForJSBindings. | 65 // create the plugin if required by calling LayoutPartForJSBindings. |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 | 198 |
| 192 inline bool IsHTMLPlugInElement(const HTMLElement& element) { | 199 inline bool IsHTMLPlugInElement(const HTMLElement& element) { |
| 193 return element.IsPluginElement(); | 200 return element.IsPluginElement(); |
| 194 } | 201 } |
| 195 | 202 |
| 196 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLPlugInElement); | 203 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLPlugInElement); |
| 197 | 204 |
| 198 } // namespace blink | 205 } // namespace blink |
| 199 | 206 |
| 200 #endif // HTMLPlugInElement_h | 207 #endif // HTMLPlugInElement_h |
| OLD | NEW |