OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <list> | 9 #include <list> |
10 | 10 |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 void ImeCompositionCompleted(const string16& text); | 169 void ImeCompositionCompleted(const string16& text); |
170 #ifndef NP_NO_CARBON | 170 #ifndef NP_NO_CARBON |
171 // Informs the delegate that the plugin set a Carbon ThemeCursor. | 171 // Informs the delegate that the plugin set a Carbon ThemeCursor. |
172 void SetThemeCursor(ThemeCursor cursor); | 172 void SetThemeCursor(ThemeCursor cursor); |
173 // Informs the delegate that the plugin set a Carbon Cursor. | 173 // Informs the delegate that the plugin set a Carbon Cursor. |
174 void SetCarbonCursor(const Cursor* cursor); | 174 void SetCarbonCursor(const Cursor* cursor); |
175 #endif | 175 #endif |
176 // Informs the delegate that the plugin set a Cocoa NSCursor. | 176 // Informs the delegate that the plugin set a Cocoa NSCursor. |
177 void SetNSCursor(NSCursor* cursor); | 177 void SetNSCursor(NSCursor* cursor); |
178 | 178 |
| 179 // Indicates that the windowless plugins will draw directly to the window |
| 180 // context instead of a buffer context. |
| 181 void SetNoBufferContext(); |
| 182 |
179 #ifndef NP_NO_CARBON | 183 #ifndef NP_NO_CARBON |
180 // Indicates that it's time to send the plugin a null event. | 184 // Indicates that it's time to send the plugin a null event. |
181 void FireIdleEvent(); | 185 void FireIdleEvent(); |
182 #endif | 186 #endif |
183 | 187 |
184 // TODO(caryclark): This is a temporary workaround to allow the Darwin / Skia | 188 // TODO(caryclark): This is a temporary workaround to allow the Darwin / Skia |
185 // port to share code with the Darwin / CG port. Later, this will be removed | 189 // port to share code with the Darwin / CG port. Later, this will be removed |
186 // and all callers will use the Paint defined above. | 190 // and all callers will use the Paint defined above. |
187 void CGPaint(CGContextRef context, const gfx::Rect& rect); | 191 void CGPaint(CGContextRef context, const gfx::Rect& rect); |
188 | 192 |
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
421 // slower, since the call we use to scrape the window contents is much more | 425 // slower, since the call we use to scrape the window contents is much more |
422 // expensive than copying between GWorlds). | 426 // expensive than copying between GWorlds). |
423 void SetQuickDrawFastPathEnabled(bool enabled); | 427 void SetQuickDrawFastPathEnabled(bool enabled); |
424 #endif | 428 #endif |
425 | 429 |
426 // Adjusts the idle event rate for a Carbon plugin based on its current | 430 // Adjusts the idle event rate for a Carbon plugin based on its current |
427 // visibility. | 431 // visibility. |
428 void UpdateIdleEventRate(); | 432 void UpdateIdleEventRate(); |
429 #endif // !NP_NO_CARBON | 433 #endif // !NP_NO_CARBON |
430 | 434 |
| 435 bool use_buffer_context_; |
431 CGContextRef buffer_context_; // Weak ref. | 436 CGContextRef buffer_context_; // Weak ref. |
432 | 437 |
433 #ifndef NP_NO_CARBON | 438 #ifndef NP_NO_CARBON |
434 NP_CGContext np_cg_context_; | 439 NP_CGContext np_cg_context_; |
435 #endif | 440 #endif |
436 #ifndef NP_NO_QUICKDRAW | 441 #ifndef NP_NO_QUICKDRAW |
437 NP_Port qd_port_; | 442 NP_Port qd_port_; |
438 scoped_ptr<QuickDrawDrawingManager> qd_manager_; | 443 scoped_ptr<QuickDrawDrawingManager> qd_manager_; |
439 base::TimeTicks fast_path_enable_tick_; | 444 base::TimeTicks fast_path_enable_tick_; |
440 #endif | 445 #endif |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
517 // True if NPP_New did not return an error. | 522 // True if NPP_New did not return an error. |
518 bool creation_succeeded_; | 523 bool creation_succeeded_; |
519 | 524 |
520 DISALLOW_COPY_AND_ASSIGN(WebPluginDelegateImpl); | 525 DISALLOW_COPY_AND_ASSIGN(WebPluginDelegateImpl); |
521 }; | 526 }; |
522 | 527 |
523 } // namespace npapi | 528 } // namespace npapi |
524 } // namespace webkit | 529 } // namespace webkit |
525 | 530 |
526 #endif // WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_DELEGATE_IMPL_H_ | 531 #endif // WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_DELEGATE_IMPL_H_ |
OLD | NEW |