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

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, 8 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 | « content/plugin/webplugin_delegate_stub.cc ('k') | content/plugin/webplugin_proxy.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 return windowless_contexts_[windowless_buffer_index_].get(); 138 return windowless_contexts_[windowless_buffer_index_].get();
141 } 139 }
142 #else 140 #else
143 skia::RefPtr<SkCanvas> windowless_canvas() const { 141 skia::RefPtr<SkCanvas> windowless_canvas() const {
144 return windowless_canvases_[windowless_buffer_index_]; 142 return windowless_canvases_[windowless_buffer_index_];
145 } 143 }
146 #endif 144 #endif
147 145
148 scoped_refptr<PluginChannel> channel_; 146 scoped_refptr<PluginChannel> channel_;
149 int route_id_; 147 int route_id_;
150 NPObject* window_npobject_;
151 NPObject* plugin_element_;
152 WebPluginDelegateImpl* delegate_; 148 WebPluginDelegateImpl* delegate_;
153 gfx::Rect damaged_rect_; 149 gfx::Rect damaged_rect_;
154 bool waiting_for_paint_; 150 bool waiting_for_paint_;
155 // The url of the main frame hosting the plugin. 151 // The url of the main frame hosting the plugin.
156 GURL page_url_; 152 GURL page_url_;
157 153
158 // Variables used for desynchronized windowless plugin painting. See note in 154 // Variables used for desynchronized windowless plugin painting. See note in
159 // webplugin_delegate_proxy.h for how this works. The two sets of windowless_* 155 // webplugin_delegate_proxy.h for how this works. The two sets of windowless_*
160 // fields are for the front-buffer and back-buffer of a buffer flipping system 156 // fields are for the front-buffer and back-buffer of a buffer flipping system
161 // and windowless_buffer_index_ identifies which set we are using as the 157 // and windowless_buffer_index_ identifies which set we are using as the
162 // back-buffer at any given time. 158 // back-buffer at any given time.
163 int windowless_buffer_index_; 159 int windowless_buffer_index_;
164 #if defined(OS_MACOSX) 160 #if defined(OS_MACOSX)
165 scoped_ptr<TransportDIB> windowless_dibs_[2]; 161 scoped_ptr<TransportDIB> windowless_dibs_[2];
166 base::ScopedCFTypeRef<CGContextRef> windowless_contexts_[2]; 162 base::ScopedCFTypeRef<CGContextRef> windowless_contexts_[2];
167 scoped_ptr<WebPluginAcceleratedSurfaceProxy> accelerated_surface_; 163 scoped_ptr<WebPluginAcceleratedSurfaceProxy> accelerated_surface_;
168 #else 164 #else
169 skia::RefPtr<SkCanvas> windowless_canvases_[2]; 165 skia::RefPtr<SkCanvas> windowless_canvases_[2];
170 #endif 166 #endif
171 167
172 // Contains the routing id of the host render view. 168 // Contains the routing id of the host render view.
173 int host_render_view_routing_id_; 169 int host_render_view_routing_id_;
174 170
175 base::WeakPtrFactory<WebPluginProxy> weak_factory_; 171 base::WeakPtrFactory<WebPluginProxy> weak_factory_;
176 }; 172 };
177 173
178 } // namespace content 174 } // namespace content
179 175
180 #endif // CONTENT_PLUGIN_WEBPLUGIN_PROXY_H_ 176 #endif // CONTENT_PLUGIN_WEBPLUGIN_PROXY_H_
OLDNEW
« no previous file with comments | « content/plugin/webplugin_delegate_stub.cc ('k') | content/plugin/webplugin_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698