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

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

Issue 2901453002: Move PreFinalizer to WebPluginContainerImpl. (Closed)
Patch Set: Created 3 years, 7 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
« no previous file with comments | « third_party/WebKit/Source/core/exported/WebPluginContainerBase.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 class MouseEvent; 54 class MouseEvent;
55 class ResourceError; 55 class ResourceError;
56 class ResourceResponse; 56 class ResourceResponse;
57 class TouchEvent; 57 class TouchEvent;
58 class WebPlugin; 58 class WebPlugin;
59 class WheelEvent; 59 class WheelEvent;
60 struct WebPrintParams; 60 struct WebPrintParams;
61 struct WebPrintPresetOptions; 61 struct WebPrintPresetOptions;
62 62
63 class WEB_EXPORT WebPluginContainerImpl final : public WebPluginContainerBase { 63 class WEB_EXPORT WebPluginContainerImpl final : public WebPluginContainerBase {
64 USING_PRE_FINALIZER(WebPluginContainerImpl, PreFinalize);
65
64 public: 66 public:
65 static WebPluginContainerImpl* Create(HTMLPlugInElement* element, 67 static WebPluginContainerImpl* Create(HTMLPlugInElement* element,
66 WebPlugin* web_plugin) { 68 WebPlugin* web_plugin) {
67 return new WebPluginContainerImpl(element, web_plugin); 69 return new WebPluginContainerImpl(element, web_plugin);
68 } 70 }
69 ~WebPluginContainerImpl() override; 71 ~WebPluginContainerImpl() override;
70 72
71 // PluginView methods 73 // PluginView methods
72 void SetParent(FrameView*) override; 74 void SetParent(FrameView*) override;
73 FrameView* Parent() const override { return parent_; }; 75 FrameView* Parent() const override { return parent_; };
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 bool ExecuteEditCommand(const WebString& name, 168 bool ExecuteEditCommand(const WebString& name,
167 const WebString& value) override; 169 const WebString& value) override;
168 170
169 // Resource load events for the plugin's source data: 171 // Resource load events for the plugin's source data:
170 void DidReceiveResponse(const ResourceResponse&) override; 172 void DidReceiveResponse(const ResourceResponse&) override;
171 void DidReceiveData(const char* data, int data_length) override; 173 void DidReceiveData(const char* data, int data_length) override;
172 void DidFinishLoading() override; 174 void DidFinishLoading() override;
173 void DidFailLoading(const ResourceError&) override; 175 void DidFailLoading(const ResourceError&) override;
174 176
175 DECLARE_VIRTUAL_TRACE(); 177 DECLARE_VIRTUAL_TRACE();
178 // USING_PRE_FINALIZER does not allow for virtual dispatch from the finalizer
179 // method. Here we call Dispose() which does the correct virtual dispatch.
180 void PreFinalize() { Dispose(); }
haraken 2017/05/22 04:54:56 Would it be clearer if: - Introduce DisposePlugin
176 void Dispose() override; 181 void Dispose() override;
177 182
178 private: 183 private:
179 // Sets |windowRect| to the content rect of the plugin in screen space. 184 // Sets |windowRect| to the content rect of the plugin in screen space.
180 // Sets |clippedAbsoluteRect| to the visible rect for the plugin, clipped to 185 // Sets |clippedAbsoluteRect| to the visible rect for the plugin, clipped to
181 // the visible screen of the root frame, in local space of the plugin. 186 // the visible screen of the root frame, in local space of the plugin.
182 // Sets |unclippedAbsoluteRect| to the visible rect for the plugin (but 187 // Sets |unclippedAbsoluteRect| to the visible rect for the plugin (but
183 // without also clipping to the screen), in local space of the plugin. 188 // without also clipping to the screen), in local space of the plugin.
184 void ComputeClipRectsForPlugin( 189 void ComputeClipRectsForPlugin(
185 const HTMLFrameOwnerElement* plugin_owner_element, 190 const HTMLFrameOwnerElement* plugin_owner_element,
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 // WebPluginContainerImpl is the only subclass of WebPluginContainer. 239 // WebPluginContainerImpl is the only subclass of WebPluginContainer.
235 DEFINE_TYPE_CASTS(WebPluginContainerImpl, 240 DEFINE_TYPE_CASTS(WebPluginContainerImpl,
236 WebPluginContainer, 241 WebPluginContainer,
237 container, 242 container,
238 true, 243 true,
239 true); 244 true);
240 245
241 } // namespace blink 246 } // namespace blink
242 247
243 #endif 248 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/exported/WebPluginContainerBase.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698