| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2014 Opera Software ASA. All rights reserved. | 3 * Copyright (C) 2014 Opera Software ASA. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
| 7 * met: | 7 * met: |
| 8 * | 8 * |
| 9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 class ResourceResponse; | 56 class ResourceResponse; |
| 57 class ScrollbarGroup; | 57 class ScrollbarGroup; |
| 58 class TouchEvent; | 58 class TouchEvent; |
| 59 class WebPlugin; | 59 class WebPlugin; |
| 60 class WebPluginLoadObserver; | 60 class WebPluginLoadObserver; |
| 61 class WebExternalTextureLayer; | 61 class WebExternalTextureLayer; |
| 62 class WheelEvent; | 62 class WheelEvent; |
| 63 class Widget; | 63 class Widget; |
| 64 struct WebPrintParams; | 64 struct WebPrintParams; |
| 65 | 65 |
| 66 class WebPluginContainerImpl FINAL : public PluginView, public WebPluginContaine
r, public FrameDestructionObserver { | 66 class WebPluginContainerImpl FINAL |
| 67 : public PluginView |
| 68 , public WebPluginContainer |
| 69 #if !ENABLE(OILPAN) |
| 70 , public FrameDestructionObserver |
| 71 #endif |
| 72 { |
| 67 public: | 73 public: |
| 68 static PassRefPtr<WebPluginContainerImpl> create(HTMLPlugInElement* element,
WebPlugin* webPlugin) | 74 static PassRefPtr<WebPluginContainerImpl> create(HTMLPlugInElement* element,
WebPlugin* webPlugin) |
| 69 { | 75 { |
| 70 return adoptRef(new WebPluginContainerImpl(element, webPlugin)); | 76 return adoptRef(new WebPluginContainerImpl(element, webPlugin)); |
| 71 } | 77 } |
| 72 | 78 |
| 73 // PluginView methods | 79 // PluginView methods |
| 74 virtual WebLayer* platformLayer() const OVERRIDE; | 80 virtual WebLayer* platformLayer() const OVERRIDE; |
| 75 virtual v8::Local<v8::Object> scriptableObject(v8::Isolate*) OVERRIDE; | 81 virtual v8::Local<v8::Object> scriptableObject(v8::Isolate*) OVERRIDE; |
| 76 virtual bool getFormValue(String&) OVERRIDE; | 82 virtual bool getFormValue(String&) OVERRIDE; |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 void calculateGeometry( | 191 void calculateGeometry( |
| 186 const IntRect& frameRect, | 192 const IntRect& frameRect, |
| 187 IntRect& windowRect, | 193 IntRect& windowRect, |
| 188 IntRect& clipRect, | 194 IntRect& clipRect, |
| 189 Vector<IntRect>& cutOutRects); | 195 Vector<IntRect>& cutOutRects); |
| 190 IntRect windowClipRect() const; | 196 IntRect windowClipRect() const; |
| 191 void windowCutOutRects( | 197 void windowCutOutRects( |
| 192 const IntRect& frameRect, | 198 const IntRect& frameRect, |
| 193 Vector<IntRect>& cutOutRects); | 199 Vector<IntRect>& cutOutRects); |
| 194 | 200 |
| 195 // FIXME: Oilpan: consider moving Widget to the heap and turn this | 201 #if ENABLE(OILPAN) |
| 196 // into a traced member. For the time being, it is a bare pointer | 202 // FIXME: Oilpan: consider moving Widget to the heap, allowing this |
| 197 // of its owning PlugInElement and managed as such. | 203 // container object to be a FrameDestructionObserver. And thereby |
| 204 // keep a traced member reference to the frame rather than as a |
| 205 // bare pointer. Instead, the owning object (HTMLFrameOwnerElement) |
| 206 // explicitly deletes this object when it is disconnected from its |
| 207 // frame. Any access to an invalid frame via this bare pointer |
| 208 // is therefore not possible. |
| 209 // |
| 210 // See the HTMLFrameOwnerElement::disconnectContentFrame comment for |
| 211 // (even) more. |
| 212 LocalFrame* m_frame; |
| 213 |
| 214 LocalFrame* frame() const { return m_frame; } |
| 215 #endif |
| 216 |
| 217 // FIXME: see above; for the time being, a bare pointer to the owning |
| 218 // HTMLPlugInElement and managed as such. |
| 198 HTMLPlugInElement* m_element; | 219 HTMLPlugInElement* m_element; |
| 199 WebPlugin* m_webPlugin; | 220 WebPlugin* m_webPlugin; |
| 200 Vector<WebPluginLoadObserver*> m_pluginLoadObservers; | 221 Vector<WebPluginLoadObserver*> m_pluginLoadObservers; |
| 201 | 222 |
| 202 WebLayer* m_webLayer; | 223 WebLayer* m_webLayer; |
| 203 | 224 |
| 204 // The associated scrollbar group object, created lazily. Used for Pepper | 225 // The associated scrollbar group object, created lazily. Used for Pepper |
| 205 // scrollbars. | 226 // scrollbars. |
| 206 OwnPtr<ScrollbarGroup> m_scrollbarGroup; | 227 OwnPtr<ScrollbarGroup> m_scrollbarGroup; |
| 207 | 228 |
| 208 TouchEventRequestType m_touchEventRequestType; | 229 TouchEventRequestType m_touchEventRequestType; |
| 209 bool m_wantsWheelEvents; | 230 bool m_wantsWheelEvents; |
| 210 }; | 231 }; |
| 211 | 232 |
| 212 DEFINE_TYPE_CASTS(WebPluginContainerImpl, Widget, widget, widget->isPluginContai
ner(), widget.isPluginContainer()); | 233 DEFINE_TYPE_CASTS(WebPluginContainerImpl, Widget, widget, widget->isPluginContai
ner(), widget.isPluginContainer()); |
| 213 // Unlike Widget, we need not worry about object type for container. | 234 // Unlike Widget, we need not worry about object type for container. |
| 214 // WebPluginContainerImpl is the only subclass of WebPluginContainer. | 235 // WebPluginContainerImpl is the only subclass of WebPluginContainer. |
| 215 DEFINE_TYPE_CASTS(WebPluginContainerImpl, WebPluginContainer, container, true, t
rue); | 236 DEFINE_TYPE_CASTS(WebPluginContainerImpl, WebPluginContainer, container, true, t
rue); |
| 216 | 237 |
| 217 } // namespace blink | 238 } // namespace blink |
| 218 | 239 |
| 219 #endif | 240 #endif |
| OLD | NEW |