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

Side by Side Diff: content/plugin/webplugin_proxy.h

Issue 1483733002: Remove support for NPObjects. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 12 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 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_PLUGIN_WEBPLUGIN_PROXY_H_ 5 #ifndef CONTENT_PLUGIN_WEBPLUGIN_PROXY_H_
6 #define CONTENT_PLUGIN_WEBPLUGIN_PROXY_H_ 6 #define CONTENT_PLUGIN_WEBPLUGIN_PROXY_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 54
55 void set_delegate(WebPluginDelegateImpl* d) { delegate_ = d; } 55 void set_delegate(WebPluginDelegateImpl* d) { delegate_ = d; }
56 56
57 // WebPlugin overrides 57 // WebPlugin overrides
58 void SetWindow(gfx::PluginWindowHandle window) override; 58 void SetWindow(gfx::PluginWindowHandle window) override;
59 void SetAcceptsInputEvents(bool accepts) override; 59 void SetAcceptsInputEvents(bool accepts) override;
60 void WillDestroyWindow(gfx::PluginWindowHandle window) override; 60 void WillDestroyWindow(gfx::PluginWindowHandle window) override;
61 void CancelResource(unsigned long id) override; 61 void CancelResource(unsigned long id) override;
62 void Invalidate() override; 62 void Invalidate() override;
63 void InvalidateRect(const gfx::Rect& rect) override; 63 void InvalidateRect(const gfx::Rect& rect) override;
64 NPObject* GetWindowScriptNPObject() override;
65 NPObject* GetPluginElement() override;
66 bool FindProxyForUrl(const GURL& url, std::string* proxy_list) override; 64 bool FindProxyForUrl(const GURL& url, std::string* proxy_list) override;
67 void SetCookie(const GURL& url, 65 void SetCookie(const GURL& url,
68 const GURL& first_party_for_cookies, 66 const GURL& first_party_for_cookies,
69 const std::string& cookie) override; 67 const std::string& cookie) override;
70 std::string GetCookies(const GURL& url, 68 std::string GetCookies(const GURL& url,
71 const GURL& first_party_for_cookies) override; 69 const GURL& first_party_for_cookies) override;
72 void UpdateGeometry(const gfx::Rect& window_rect, 70 void UpdateGeometry(const gfx::Rect& window_rect,
73 const gfx::Rect& clip_rect, 71 const gfx::Rect& clip_rect,
74 const TransportDIB::Handle& windowless_buffer0, 72 const TransportDIB::Handle& windowless_buffer0,
75 const TransportDIB::Handle& windowless_buffer1, 73 const TransportDIB::Handle& windowless_buffer1,
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 skia::RefPtr<SkCanvas> windowless_canvas() const { 170 skia::RefPtr<SkCanvas> windowless_canvas() const {
173 return windowless_canvases_[windowless_buffer_index_]; 171 return windowless_canvases_[windowless_buffer_index_];
174 } 172 }
175 #endif 173 #endif
176 174
177 typedef base::hash_map<int, WebPluginResourceClient*> ResourceClientMap; 175 typedef base::hash_map<int, WebPluginResourceClient*> ResourceClientMap;
178 ResourceClientMap resource_clients_; 176 ResourceClientMap resource_clients_;
179 177
180 scoped_refptr<PluginChannel> channel_; 178 scoped_refptr<PluginChannel> channel_;
181 int route_id_; 179 int route_id_;
182 NPObject* window_npobject_;
183 NPObject* plugin_element_;
184 WebPluginDelegateImpl* delegate_; 180 WebPluginDelegateImpl* delegate_;
185 gfx::Rect damaged_rect_; 181 gfx::Rect damaged_rect_;
186 bool waiting_for_paint_; 182 bool waiting_for_paint_;
187 // The url of the main frame hosting the plugin. 183 // The url of the main frame hosting the plugin.
188 GURL page_url_; 184 GURL page_url_;
189 185
190 // Variables used for desynchronized windowless plugin painting. See note in 186 // Variables used for desynchronized windowless plugin painting. See note in
191 // webplugin_delegate_proxy.h for how this works. The two sets of windowless_* 187 // webplugin_delegate_proxy.h for how this works. The two sets of windowless_*
192 // fields are for the front-buffer and back-buffer of a buffer flipping system 188 // fields are for the front-buffer and back-buffer of a buffer flipping system
193 // and windowless_buffer_index_ identifies which set we are using as the 189 // and windowless_buffer_index_ identifies which set we are using as the
194 // back-buffer at any given time. 190 // back-buffer at any given time.
195 int windowless_buffer_index_; 191 int windowless_buffer_index_;
196 #if defined(OS_MACOSX) 192 #if defined(OS_MACOSX)
197 scoped_ptr<TransportDIB> windowless_dibs_[2]; 193 scoped_ptr<TransportDIB> windowless_dibs_[2];
198 base::ScopedCFTypeRef<CGContextRef> windowless_contexts_[2]; 194 base::ScopedCFTypeRef<CGContextRef> windowless_contexts_[2];
199 scoped_ptr<WebPluginAcceleratedSurfaceProxy> accelerated_surface_; 195 scoped_ptr<WebPluginAcceleratedSurfaceProxy> accelerated_surface_;
200 #else 196 #else
201 skia::RefPtr<SkCanvas> windowless_canvases_[2]; 197 skia::RefPtr<SkCanvas> windowless_canvases_[2];
202 #endif 198 #endif
203 199
204 // Contains the routing id of the host render view. 200 // Contains the routing id of the host render view.
205 int host_render_view_routing_id_; 201 int host_render_view_routing_id_;
206 202
207 base::WeakPtrFactory<WebPluginProxy> weak_factory_; 203 base::WeakPtrFactory<WebPluginProxy> weak_factory_;
208 }; 204 };
209 205
210 } // namespace content 206 } // namespace content
211 207
212 #endif // CONTENT_PLUGIN_WEBPLUGIN_PROXY_H_ 208 #endif // CONTENT_PLUGIN_WEBPLUGIN_PROXY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698