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

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: Fix bad rebase. Created 4 years, 9 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 int route_id, 48 int route_id,
49 const GURL& page_url, 49 const GURL& page_url,
50 int host_render_view_routing_id); 50 int host_render_view_routing_id);
51 ~WebPluginProxy() override; 51 ~WebPluginProxy() override;
52 52
53 void set_delegate(WebPluginDelegateImpl* d) { delegate_ = d; } 53 void set_delegate(WebPluginDelegateImpl* d) { delegate_ = d; }
54 54
55 // WebPlugin overrides 55 // WebPlugin overrides
56 void Invalidate() override; 56 void Invalidate() override;
57 void InvalidateRect(const gfx::Rect& rect) override; 57 void InvalidateRect(const gfx::Rect& rect) override;
58 NPObject* GetWindowScriptNPObject() override;
59 NPObject* GetPluginElement() override;
60 bool FindProxyForUrl(const GURL& url, std::string* proxy_list) override; 58 bool FindProxyForUrl(const GURL& url, std::string* proxy_list) override;
61 void SetCookie(const GURL& url, 59 void SetCookie(const GURL& url,
62 const GURL& first_party_for_cookies, 60 const GURL& first_party_for_cookies,
63 const std::string& cookie) override; 61 const std::string& cookie) override;
64 std::string GetCookies(const GURL& url, 62 std::string GetCookies(const GURL& url,
65 const GURL& first_party_for_cookies) override; 63 const GURL& first_party_for_cookies) override;
66 void UpdateGeometry(const gfx::Rect& window_rect, 64 void UpdateGeometry(const gfx::Rect& window_rect,
67 const gfx::Rect& clip_rect, 65 const gfx::Rect& clip_rect,
68 const TransportDIB::Handle& windowless_buffer0, 66 const TransportDIB::Handle& windowless_buffer0,
69 const TransportDIB::Handle& windowless_buffer1, 67 const TransportDIB::Handle& windowless_buffer1,
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 return windowless_contexts_[windowless_buffer_index_].get(); 150 return windowless_contexts_[windowless_buffer_index_].get();
153 } 151 }
154 #else 152 #else
155 skia::RefPtr<SkCanvas> windowless_canvas() const { 153 skia::RefPtr<SkCanvas> windowless_canvas() const {
156 return windowless_canvases_[windowless_buffer_index_]; 154 return windowless_canvases_[windowless_buffer_index_];
157 } 155 }
158 #endif 156 #endif
159 157
160 scoped_refptr<PluginChannel> channel_; 158 scoped_refptr<PluginChannel> channel_;
161 int route_id_; 159 int route_id_;
162 NPObject* window_npobject_;
163 NPObject* plugin_element_;
164 WebPluginDelegateImpl* delegate_; 160 WebPluginDelegateImpl* delegate_;
165 gfx::Rect damaged_rect_; 161 gfx::Rect damaged_rect_;
166 bool waiting_for_paint_; 162 bool waiting_for_paint_;
167 // The url of the main frame hosting the plugin. 163 // The url of the main frame hosting the plugin.
168 GURL page_url_; 164 GURL page_url_;
169 165
170 // Variables used for desynchronized windowless plugin painting. See note in 166 // Variables used for desynchronized windowless plugin painting. See note in
171 // webplugin_delegate_proxy.h for how this works. The two sets of windowless_* 167 // webplugin_delegate_proxy.h for how this works. The two sets of windowless_*
172 // fields are for the front-buffer and back-buffer of a buffer flipping system 168 // fields are for the front-buffer and back-buffer of a buffer flipping system
173 // and windowless_buffer_index_ identifies which set we are using as the 169 // and windowless_buffer_index_ identifies which set we are using as the
174 // back-buffer at any given time. 170 // back-buffer at any given time.
175 int windowless_buffer_index_; 171 int windowless_buffer_index_;
176 #if defined(OS_MACOSX) 172 #if defined(OS_MACOSX)
177 scoped_ptr<TransportDIB> windowless_dibs_[2]; 173 scoped_ptr<TransportDIB> windowless_dibs_[2];
178 base::ScopedCFTypeRef<CGContextRef> windowless_contexts_[2]; 174 base::ScopedCFTypeRef<CGContextRef> windowless_contexts_[2];
179 scoped_ptr<WebPluginAcceleratedSurfaceProxy> accelerated_surface_; 175 scoped_ptr<WebPluginAcceleratedSurfaceProxy> accelerated_surface_;
180 #else 176 #else
181 skia::RefPtr<SkCanvas> windowless_canvases_[2]; 177 skia::RefPtr<SkCanvas> windowless_canvases_[2];
182 #endif 178 #endif
183 179
184 // Contains the routing id of the host render view. 180 // Contains the routing id of the host render view.
185 int host_render_view_routing_id_; 181 int host_render_view_routing_id_;
186 182
187 base::WeakPtrFactory<WebPluginProxy> weak_factory_; 183 base::WeakPtrFactory<WebPluginProxy> weak_factory_;
188 }; 184 };
189 185
190 } // namespace content 186 } // namespace content
191 187
192 #endif // CONTENT_PLUGIN_WEBPLUGIN_PROXY_H_ 188 #endif // CONTENT_PLUGIN_WEBPLUGIN_PROXY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698