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_PPAPI_PPAPI_PLUGIN_INSTANCE_H_ | 5 #ifndef WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INSTANCE_H_ |
6 #define WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INSTANCE_H_ | 6 #define WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INSTANCE_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
420 PPP_Printing_Dev_Combined(const PPP_Printing_Dev& base_if) | 420 PPP_Printing_Dev_Combined(const PPP_Printing_Dev& base_if) |
421 : PPP_Printing_Dev(base_if), | 421 : PPP_Printing_Dev(base_if), |
422 QuerySupportedFormats_0_3(NULL), | 422 QuerySupportedFormats_0_3(NULL), |
423 Begin_0_3(NULL) {} | 423 Begin_0_3(NULL) {} |
424 | 424 |
425 // Conversion constructor for version 0.3. Sets unsupported functions to | 425 // Conversion constructor for version 0.3. Sets unsupported functions to |
426 // NULL, so we know not to try to use them. | 426 // NULL, so we know not to try to use them. |
427 PPP_Printing_Dev_Combined(const PPP_Printing_Dev_0_3& old_if) | 427 PPP_Printing_Dev_Combined(const PPP_Printing_Dev_0_3& old_if) |
428 : PPP_Printing_Dev(), // NOTE: The parens are important, to zero- | 428 : PPP_Printing_Dev(), // NOTE: The parens are important, to zero- |
429 // initialize the struct. | 429 // initialize the struct. |
| 430 // Except older version of g++ doesn't! |
| 431 // So do it explicitly in the ctor. |
430 QuerySupportedFormats_0_3(old_if.QuerySupportedFormats), | 432 QuerySupportedFormats_0_3(old_if.QuerySupportedFormats), |
431 Begin_0_3(old_if.Begin) { | 433 Begin_0_3(old_if.Begin) { |
| 434 QuerySupportedFormats = NULL; |
| 435 Begin = NULL; |
432 PrintPages = old_if.PrintPages; | 436 PrintPages = old_if.PrintPages; |
433 End = old_if.End; | 437 End = old_if.End; |
434 } | 438 } |
435 | 439 |
436 // The 0.3 version of 'QuerySupportedFormats'. | 440 // The 0.3 version of 'QuerySupportedFormats'. |
437 PP_PrintOutputFormat_Dev_0_3* (*QuerySupportedFormats_0_3)( | 441 PP_PrintOutputFormat_Dev_0_3* (*QuerySupportedFormats_0_3)( |
438 PP_Instance instance, uint32_t* format_count); | 442 PP_Instance instance, uint32_t* format_count); |
439 // The 0.3 version of 'Begin'. | 443 // The 0.3 version of 'Begin'. |
440 int32_t (*Begin_0_3)(PP_Instance instance, | 444 int32_t (*Begin_0_3)(PP_Instance instance, |
441 const struct PP_PrintSettings_Dev_0_3* print_settings); | 445 const struct PP_PrintSettings_Dev_0_3* print_settings); |
442 | |
443 }; | 446 }; |
444 scoped_ptr<PPP_Printing_Dev_Combined> plugin_print_interface_; | 447 scoped_ptr<PPP_Printing_Dev_Combined> plugin_print_interface_; |
445 | 448 |
446 // The plugin 3D interface. | 449 // The plugin 3D interface. |
447 const PPP_Graphics3D_Dev* plugin_graphics_3d_interface_; | 450 const PPP_Graphics3D_Dev* plugin_graphics_3d_interface_; |
448 | 451 |
449 // Contains the cursor if it's set by the plugin. | 452 // Contains the cursor if it's set by the plugin. |
450 scoped_ptr<WebKit::WebCursorInfo> cursor_; | 453 scoped_ptr<WebKit::WebCursorInfo> cursor_; |
451 | 454 |
452 // Set to true if this plugin thinks it will always be on top. This allows us | 455 // Set to true if this plugin thinks it will always be on top. This allows us |
(...skipping 23 matching lines...) Expand all Loading... |
476 typedef std::map<NPObject*, ObjectVar*> NPObjectToObjectVarMap; | 479 typedef std::map<NPObject*, ObjectVar*> NPObjectToObjectVarMap; |
477 NPObjectToObjectVarMap np_object_to_object_var_; | 480 NPObjectToObjectVarMap np_object_to_object_var_; |
478 | 481 |
479 DISALLOW_COPY_AND_ASSIGN(PluginInstance); | 482 DISALLOW_COPY_AND_ASSIGN(PluginInstance); |
480 }; | 483 }; |
481 | 484 |
482 } // namespace ppapi | 485 } // namespace ppapi |
483 } // namespace webkit | 486 } // namespace webkit |
484 | 487 |
485 #endif // WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INSTANCE_H_ | 488 #endif // WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INSTANCE_H_ |
OLD | NEW |