| 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 | 48 |
| 49 class GestureEvent; | 49 class GestureEvent; |
| 50 class HTMLPlugInElement; | 50 class HTMLPlugInElement; |
| 51 class IntRect; | 51 class IntRect; |
| 52 class KeyboardEvent; | 52 class KeyboardEvent; |
| 53 class MouseEvent; | 53 class MouseEvent; |
| 54 class ResourceError; | 54 class ResourceError; |
| 55 class ResourceResponse; | 55 class ResourceResponse; |
| 56 class TouchEvent; | 56 class TouchEvent; |
| 57 class WebPlugin; | 57 class WebPlugin; |
| 58 class WebPluginLoadObserver; | |
| 59 class WheelEvent; | 58 class WheelEvent; |
| 60 class Widget; | 59 class Widget; |
| 61 struct WebPrintParams; | 60 struct WebPrintParams; |
| 62 struct WebPrintPresetOptions; | 61 struct WebPrintPresetOptions; |
| 63 | 62 |
| 64 class WebPluginContainerImpl final : public PluginView, public WebPluginContaine
r, public LocalFrameLifecycleObserver { | 63 class WebPluginContainerImpl final : public PluginView, public WebPluginContaine
r, public LocalFrameLifecycleObserver { |
| 65 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(WebPluginContainerImpl); | 64 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(WebPluginContainerImpl); |
| 66 public: | 65 public: |
| 67 static PassRefPtrWillBeRawPtr<WebPluginContainerImpl> create(HTMLPlugInEleme
nt* element, WebPlugin* webPlugin) | 66 static PassRefPtrWillBeRawPtr<WebPluginContainerImpl> create(HTMLPlugInEleme
nt* element, WebPlugin* webPlugin) |
| 68 { | 67 { |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 void invalidate() override; | 100 void invalidate() override; |
| 102 void invalidateRect(const WebRect&) override; | 101 void invalidateRect(const WebRect&) override; |
| 103 void scrollRect(const WebRect&) override; | 102 void scrollRect(const WebRect&) override; |
| 104 void setNeedsLayout() override; | 103 void setNeedsLayout() override; |
| 105 void reportGeometry() override; | 104 void reportGeometry() override; |
| 106 void allowScriptObjects() override; | 105 void allowScriptObjects() override; |
| 107 void clearScriptObjects() override; | 106 void clearScriptObjects() override; |
| 108 NPObject* scriptableObjectForElement() override; | 107 NPObject* scriptableObjectForElement() override; |
| 109 v8::Local<v8::Object> v8ObjectForElement() override; | 108 v8::Local<v8::Object> v8ObjectForElement() override; |
| 110 WebString executeScriptURL(const WebURL&, bool popupsAllowed) override; | 109 WebString executeScriptURL(const WebURL&, bool popupsAllowed) override; |
| 111 void loadFrameRequest(const WebURLRequest&, const WebString& target, bool no
tifyNeeded, void* notifyData) override; | 110 void loadFrameRequest(const WebURLRequest&, const WebString& target) overrid
e; |
| 112 bool isRectTopmost(const WebRect&) override; | 111 bool isRectTopmost(const WebRect&) override; |
| 113 void requestTouchEventType(TouchEventRequestType) override; | 112 void requestTouchEventType(TouchEventRequestType) override; |
| 114 void setWantsWheelEvents(bool) override; | 113 void setWantsWheelEvents(bool) override; |
| 115 WebPoint rootFrameToLocalPoint(const WebPoint&) override; | 114 WebPoint rootFrameToLocalPoint(const WebPoint&) override; |
| 116 WebPoint localToRootFramePoint(const WebPoint&) override; | 115 WebPoint localToRootFramePoint(const WebPoint&) override; |
| 117 | 116 |
| 118 // Non-Oilpan, this cannot be null. With Oilpan, it will be | 117 // Non-Oilpan, this cannot be null. With Oilpan, it will be |
| 119 // null when in a disposed state, pending finalization during the next GC. | 118 // null when in a disposed state, pending finalization during the next GC. |
| 120 WebPlugin* plugin() override { return m_webPlugin; } | 119 WebPlugin* plugin() override { return m_webPlugin; } |
| 121 void setPlugin(WebPlugin*) override; | 120 void setPlugin(WebPlugin*) override; |
| (...skipping 24 matching lines...) Expand all Loading... |
| 146 // Copy the selected text. | 145 // Copy the selected text. |
| 147 void copy(); | 146 void copy(); |
| 148 | 147 |
| 149 // Pass the edit command to the plugin. | 148 // Pass the edit command to the plugin. |
| 150 bool executeEditCommand(const WebString& name); | 149 bool executeEditCommand(const WebString& name); |
| 151 bool executeEditCommand(const WebString& name, const WebString& value); | 150 bool executeEditCommand(const WebString& name, const WebString& value); |
| 152 | 151 |
| 153 // Resource load events for the plugin's source data: | 152 // Resource load events for the plugin's source data: |
| 154 void didReceiveResponse(const ResourceResponse&) override; | 153 void didReceiveResponse(const ResourceResponse&) override; |
| 155 void didReceiveData(const char *data, int dataLength) override; | 154 void didReceiveData(const char *data, int dataLength) override; |
| 156 void didFinishLoading() override; | 155 void didFinishLoading(); |
| 157 void didFailLoading(const ResourceError&) override; | 156 void didFailLoading(const ResourceError&); |
| 158 | |
| 159 #if !ENABLE(OILPAN) | |
| 160 void willDestroyPluginLoadObserver(WebPluginLoadObserver*); | |
| 161 #endif | |
| 162 | 157 |
| 163 DECLARE_VIRTUAL_TRACE(); | 158 DECLARE_VIRTUAL_TRACE(); |
| 164 void dispose() override; | 159 void dispose() override; |
| 165 | 160 |
| 166 #if ENABLE(OILPAN) | 161 #if ENABLE(OILPAN) |
| 167 LocalFrame* pluginFrame() const override { return frame(); } | 162 LocalFrame* pluginFrame() const override { return frame(); } |
| 168 void shouldDisposePlugin() override; | 163 void shouldDisposePlugin() override; |
| 169 #endif | 164 #endif |
| 170 | 165 |
| 171 private: | 166 private: |
| (...skipping 23 matching lines...) Expand all Loading... |
| 195 IntRect& windowRect, | 190 IntRect& windowRect, |
| 196 IntRect& clipRect, | 191 IntRect& clipRect, |
| 197 IntRect& unobscuredRect, | 192 IntRect& unobscuredRect, |
| 198 Vector<IntRect>& cutOutRects); | 193 Vector<IntRect>& cutOutRects); |
| 199 void windowCutOutRects( | 194 void windowCutOutRects( |
| 200 const IntRect& frameRect, | 195 const IntRect& frameRect, |
| 201 Vector<IntRect>& cutOutRects); | 196 Vector<IntRect>& cutOutRects); |
| 202 | 197 |
| 203 RawPtrWillBeMember<HTMLPlugInElement> m_element; | 198 RawPtrWillBeMember<HTMLPlugInElement> m_element; |
| 204 WebPlugin* m_webPlugin; | 199 WebPlugin* m_webPlugin; |
| 205 #if !ENABLE(OILPAN) | |
| 206 Vector<WebPluginLoadObserver*> m_pluginLoadObservers; | |
| 207 #endif | |
| 208 | 200 |
| 209 WebLayer* m_webLayer; | 201 WebLayer* m_webLayer; |
| 210 | 202 |
| 211 IntRect m_pendingInvalidationRect; | 203 IntRect m_pendingInvalidationRect; |
| 212 | 204 |
| 213 TouchEventRequestType m_touchEventRequestType; | 205 TouchEventRequestType m_touchEventRequestType; |
| 214 bool m_wantsWheelEvents; | 206 bool m_wantsWheelEvents; |
| 215 | 207 |
| 216 bool m_inDispose; | 208 bool m_inDispose; |
| 217 #if ENABLE(OILPAN) | 209 #if ENABLE(OILPAN) |
| 218 // Oilpan: if true, the plugin container must dispose | 210 // Oilpan: if true, the plugin container must dispose |
| 219 // of its plugin when being finalized. | 211 // of its plugin when being finalized. |
| 220 bool m_shouldDisposePlugin; | 212 bool m_shouldDisposePlugin; |
| 221 #endif | 213 #endif |
| 222 }; | 214 }; |
| 223 | 215 |
| 224 DEFINE_TYPE_CASTS(WebPluginContainerImpl, Widget, widget, widget->isPluginContai
ner(), widget.isPluginContainer()); | 216 DEFINE_TYPE_CASTS(WebPluginContainerImpl, Widget, widget, widget->isPluginContai
ner(), widget.isPluginContainer()); |
| 225 // Unlike Widget, we need not worry about object type for container. | 217 // Unlike Widget, we need not worry about object type for container. |
| 226 // WebPluginContainerImpl is the only subclass of WebPluginContainer. | 218 // WebPluginContainerImpl is the only subclass of WebPluginContainer. |
| 227 DEFINE_TYPE_CASTS(WebPluginContainerImpl, WebPluginContainer, container, true, t
rue); | 219 DEFINE_TYPE_CASTS(WebPluginContainerImpl, WebPluginContainer, container, true, t
rue); |
| 228 | 220 |
| 229 } // namespace blink | 221 } // namespace blink |
| 230 | 222 |
| 231 #endif | 223 #endif |
| OLD | NEW |