OLD | NEW |
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 // From dev/ppb_printing_dev.idl modified Tue Aug 20 08:13:36 2013. | 5 // From dev/ppb_printing_dev.idl modified Tue Aug 20 08:13:36 2013. |
6 | 6 |
7 #include "ppapi/c/dev/ppb_printing_dev.h" | 7 #include "ppapi/c/dev/ppb_printing_dev.h" |
8 #include "ppapi/c/pp_completion_callback.h" | 8 #include "ppapi/c/pp_completion_callback.h" |
9 #include "ppapi/c/pp_errors.h" | 9 #include "ppapi/c/pp_errors.h" |
10 #include "ppapi/shared_impl/tracked_callback.h" | 10 #include "ppapi/shared_impl/tracked_callback.h" |
(...skipping 19 matching lines...) Expand all Loading... |
30 struct PP_CompletionCallback callback) { | 30 struct PP_CompletionCallback callback) { |
31 VLOG(4) << "PPB_Printing_Dev::GetDefaultPrintSettings()"; | 31 VLOG(4) << "PPB_Printing_Dev::GetDefaultPrintSettings()"; |
32 EnterResource<PPB_Printing_API> enter(resource, callback, true); | 32 EnterResource<PPB_Printing_API> enter(resource, callback, true); |
33 if (enter.failed()) | 33 if (enter.failed()) |
34 return enter.retval(); | 34 return enter.retval(); |
35 return enter.SetResult(enter.object()->GetDefaultPrintSettings( | 35 return enter.SetResult(enter.object()->GetDefaultPrintSettings( |
36 print_settings, | 36 print_settings, |
37 enter.callback())); | 37 enter.callback())); |
38 } | 38 } |
39 | 39 |
| 40 void SetPrintPresetOptionsFromDocument( |
| 41 PP_Resource resource, |
| 42 PP_PrintPresetOptions_Dev* print_options) { |
| 43 VLOG(4) << "PPB_Printing_Dev::SetPrintPresetOptionsFromDocument()"; |
| 44 EnterResource<PPB_Printing_API> enter(resource, true); |
| 45 if (enter.failed()) |
| 46 return; |
| 47 enter.object()->SetPrintPresetOptionsFromDocument(print_options); |
| 48 } |
| 49 |
40 const PPB_Printing_Dev_0_7 g_ppb_printing_dev_thunk_0_7 = { | 50 const PPB_Printing_Dev_0_7 g_ppb_printing_dev_thunk_0_7 = { |
41 &Create, | 51 &Create, |
42 &GetDefaultPrintSettings | 52 &GetDefaultPrintSettings |
43 }; | 53 }; |
44 | 54 |
| 55 const PPB_Printing_Dev_0_8 g_ppb_printing_dev_thunk_0_8 = { |
| 56 &Create, |
| 57 &GetDefaultPrintSettings, |
| 58 &SetPrintPresetOptionsFromDocument |
| 59 }; |
| 60 |
45 } // namespace | 61 } // namespace |
46 | 62 |
47 PPAPI_THUNK_EXPORT const PPB_Printing_Dev_0_7* | 63 PPAPI_THUNK_EXPORT const PPB_Printing_Dev_0_7* |
48 GetPPB_Printing_Dev_0_7_Thunk() { | 64 GetPPB_Printing_Dev_0_7_Thunk() { |
49 return &g_ppb_printing_dev_thunk_0_7; | 65 return &g_ppb_printing_dev_thunk_0_7; |
50 } | 66 } |
51 | 67 |
| 68 PPAPI_THUNK_EXPORT const PPB_Printing_Dev_0_8* |
| 69 GetPPB_Printing_Dev_0_8_Thunk() { |
| 70 return &g_ppb_printing_dev_thunk_0_8; |
| 71 } |
| 72 |
52 } // namespace thunk | 73 } // namespace thunk |
53 } // namespace ppapi | 74 } // namespace ppapi |
OLD | NEW |