Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1028)

Side by Side Diff: Source/web/WebPluginContainerImpl.h

Issue 517043003: Move Frame to the Oilpan heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebased past r181814 conflict Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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. This frame reference is explicitly cleared
206 // when detaching.
haraken 2014/09/11 14:47:26 This comment is a bit misleading. Instead of clear
sof 2014/09/15 16:46:42 Thanks, misleading it is -- it describes the initi
207 LocalFrame* m_frame;
208
209 LocalFrame* frame() const { return m_frame; }
210 #endif
211
212 // FIXME: see above; for the time being, a bare pointer to the owning
213 // HTMLPlugInElement and managed as such.
198 HTMLPlugInElement* m_element; 214 HTMLPlugInElement* m_element;
199 WebPlugin* m_webPlugin; 215 WebPlugin* m_webPlugin;
200 Vector<WebPluginLoadObserver*> m_pluginLoadObservers; 216 Vector<WebPluginLoadObserver*> m_pluginLoadObservers;
201 217
202 WebLayer* m_webLayer; 218 WebLayer* m_webLayer;
203 219
204 // The associated scrollbar group object, created lazily. Used for Pepper 220 // The associated scrollbar group object, created lazily. Used for Pepper
205 // scrollbars. 221 // scrollbars.
206 OwnPtr<ScrollbarGroup> m_scrollbarGroup; 222 OwnPtr<ScrollbarGroup> m_scrollbarGroup;
207 223
208 TouchEventRequestType m_touchEventRequestType; 224 TouchEventRequestType m_touchEventRequestType;
209 bool m_wantsWheelEvents; 225 bool m_wantsWheelEvents;
210 }; 226 };
211 227
212 DEFINE_TYPE_CASTS(WebPluginContainerImpl, Widget, widget, widget->isPluginContai ner(), widget.isPluginContainer()); 228 DEFINE_TYPE_CASTS(WebPluginContainerImpl, Widget, widget, widget->isPluginContai ner(), widget.isPluginContainer());
213 // Unlike Widget, we need not worry about object type for container. 229 // Unlike Widget, we need not worry about object type for container.
214 // WebPluginContainerImpl is the only subclass of WebPluginContainer. 230 // WebPluginContainerImpl is the only subclass of WebPluginContainer.
215 DEFINE_TYPE_CASTS(WebPluginContainerImpl, WebPluginContainer, container, true, t rue); 231 DEFINE_TYPE_CASTS(WebPluginContainerImpl, WebPluginContainer, container, true, t rue);
216 232
217 } // namespace blink 233 } // namespace blink
218 234
219 #endif 235 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698