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

Side by Side Diff: webkit/plugins/npapi/webplugin_delegate_impl.h

Issue 12487003: Fix painting glitch with text and NPAPI plugins. This was a regression from r167042. The problem wa… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix silverlight Created 7 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 | Annotate | Revision Log
« no previous file with comments | « webkit/plugins/npapi/plugin_instance.cc ('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 // 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 WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_DELEGATE_IMPL_H_ 5 #ifndef WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_DELEGATE_IMPL_H_
6 #define WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_DELEGATE_IMPL_H_ 6 #define WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_DELEGATE_IMPL_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 uint32 last_modified) OVERRIDE; 128 uint32 last_modified) OVERRIDE;
129 virtual void DidReceiveManualData(const char* buffer, int length) OVERRIDE; 129 virtual void DidReceiveManualData(const char* buffer, int length) OVERRIDE;
130 virtual void DidFinishManualLoading() OVERRIDE; 130 virtual void DidFinishManualLoading() OVERRIDE;
131 virtual void DidManualLoadFail() OVERRIDE; 131 virtual void DidManualLoadFail() OVERRIDE;
132 virtual WebPluginResourceClient* CreateResourceClient( 132 virtual WebPluginResourceClient* CreateResourceClient(
133 unsigned long resource_id, const GURL& url, int notify_id) OVERRIDE; 133 unsigned long resource_id, const GURL& url, int notify_id) OVERRIDE;
134 virtual WebPluginResourceClient* CreateSeekableResourceClient( 134 virtual WebPluginResourceClient* CreateSeekableResourceClient(
135 unsigned long resource_id, int range_request_id) OVERRIDE; 135 unsigned long resource_id, int range_request_id) OVERRIDE;
136 // End of WebPluginDelegate implementation. 136 // End of WebPluginDelegate implementation.
137 137
138 bool IsWindowless() const { return windowless_ ; } 138 gfx::PluginWindowHandle windowed_handle() const { return windowed_handle_; }
139 bool IsWindowless() const { return windowless_; }
140 PluginInstance* instance() { return instance_.get(); }
139 gfx::Rect GetRect() const { return window_rect_; } 141 gfx::Rect GetRect() const { return window_rect_; }
140 gfx::Rect GetClipRect() const { return clip_rect_; } 142 gfx::Rect GetClipRect() const { return clip_rect_; }
141 143
142 // Returns the path for the library implementing this plugin. 144 // Returns the path for the library implementing this plugin.
143 base::FilePath GetPluginPath(); 145 base::FilePath GetPluginPath();
144 146
145 // Returns a combination of PluginQuirks. 147 // Returns a combination of PluginQuirks.
146 int GetQuirks() const { return quirks_; } 148 int GetQuirks() const { return quirks_; }
147 149
148 // Informs the plugin that the view it is in has gained or lost focus. 150 // Informs the plugin that the view it is in has gained or lost focus.
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 // Indicates that the windowless plugins will draw directly to the window 193 // Indicates that the windowless plugins will draw directly to the window
192 // context instead of a buffer context. 194 // context instead of a buffer context.
193 void SetNoBufferContext(); 195 void SetNoBufferContext();
194 196
195 // TODO(caryclark): This is a temporary workaround to allow the Darwin / Skia 197 // TODO(caryclark): This is a temporary workaround to allow the Darwin / Skia
196 // port to share code with the Darwin / CG port. Later, this will be removed 198 // port to share code with the Darwin / CG port. Later, this will be removed
197 // and all callers will use the Paint defined above. 199 // and all callers will use the Paint defined above.
198 void CGPaint(CGContextRef context, const gfx::Rect& rect); 200 void CGPaint(CGContextRef context, const gfx::Rect& rect);
199 #endif // OS_MACOSX && !USE_AURA 201 #endif // OS_MACOSX && !USE_AURA
200 202
201 gfx::PluginWindowHandle windowed_handle() const {
202 return windowed_handle_;
203 }
204
205 #if defined(OS_MACOSX) 203 #if defined(OS_MACOSX)
206 // Allow setting a "fake" window handle to associate this plug-in with 204 // Allow setting a "fake" window handle to associate this plug-in with
207 // an IOSurface in the browser. Used for accelerated drawing surfaces. 205 // an IOSurface in the browser. Used for accelerated drawing surfaces.
208 void set_windowed_handle(gfx::PluginWindowHandle handle); 206 void set_windowed_handle(gfx::PluginWindowHandle handle);
209 #endif 207 #endif
210 208
211 #if defined(USE_X11) 209 #if defined(USE_X11)
212 void SetWindowlessShmPixmap(XID shm_pixmap) { 210 void SetWindowlessShmPixmap(XID shm_pixmap) {
213 windowless_shm_pixmap_ = shm_pixmap; 211 windowless_shm_pixmap_ = shm_pixmap;
214 } 212 }
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 bool PlatformSetPluginHasFocus(bool focused); 287 bool PlatformSetPluginHasFocus(bool focused);
290 288
291 //----------------------------------------- 289 //-----------------------------------------
292 // used for windowed and windowless plugins 290 // used for windowed and windowless plugins
293 291
294 // Does platform-specific event handling. Arguments and return are identical 292 // Does platform-specific event handling. Arguments and return are identical
295 // to HandleInputEvent. 293 // to HandleInputEvent.
296 bool PlatformHandleInputEvent(const WebKit::WebInputEvent& event, 294 bool PlatformHandleInputEvent(const WebKit::WebInputEvent& event,
297 WebKit::WebCursorInfo* cursor_info); 295 WebKit::WebCursorInfo* cursor_info);
298 296
299 PluginInstance* instance() { return instance_.get(); }
300
301 // Closes down and destroys our plugin instance. 297 // Closes down and destroys our plugin instance.
302 void DestroyInstance(); 298 void DestroyInstance();
303 299
304 300
305 // used for windowed plugins 301 // used for windowed plugins
306 // Note: on Mac OS X, the only time the windowed handle is non-zero 302 // Note: on Mac OS X, the only time the windowed handle is non-zero
307 // is the case of accelerated rendering, which uses a fake window handle to 303 // is the case of accelerated rendering, which uses a fake window handle to
308 // identify itself back to the browser. It still performs all of its 304 // identify itself back to the browser. It still performs all of its
309 // work offscreen. 305 // work offscreen.
310 gfx::PluginWindowHandle windowed_handle_; 306 gfx::PluginWindowHandle windowed_handle_;
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
508 // True if NPP_New did not return an error. 504 // True if NPP_New did not return an error.
509 bool creation_succeeded_; 505 bool creation_succeeded_;
510 506
511 DISALLOW_COPY_AND_ASSIGN(WebPluginDelegateImpl); 507 DISALLOW_COPY_AND_ASSIGN(WebPluginDelegateImpl);
512 }; 508 };
513 509
514 } // namespace npapi 510 } // namespace npapi
515 } // namespace webkit 511 } // namespace webkit
516 512
517 #endif // WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_DELEGATE_IMPL_H_ 513 #endif // WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_DELEGATE_IMPL_H_
OLDNEW
« no previous file with comments | « webkit/plugins/npapi/plugin_instance.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698