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 #include "ppapi/cpp/dev/printing_dev.h" | 5 #include "ppapi/cpp/dev/printing_dev.h" |
6 | 6 |
7 #include "ppapi/cpp/instance.h" | 7 #include "ppapi/cpp/instance.h" |
8 #include "ppapi/cpp/instance_handle.h" | 8 #include "ppapi/cpp/instance_handle.h" |
9 #include "ppapi/cpp/module.h" | 9 #include "ppapi/cpp/module.h" |
10 #include "ppapi/cpp/module_impl.h" | 10 #include "ppapi/cpp/module_impl.h" |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 const PPP_Printing_Dev ppp_printing = { | 63 const PPP_Printing_Dev ppp_printing = { |
64 &QuerySupportedFormats, | 64 &QuerySupportedFormats, |
65 &Begin, | 65 &Begin, |
66 &PrintPages, | 66 &PrintPages, |
67 &End, | 67 &End, |
68 &IsScalingDisabled | 68 &IsScalingDisabled |
69 }; | 69 }; |
70 | 70 |
71 } // namespace | 71 } // namespace |
72 | 72 |
73 Printing_Dev::Printing_Dev(const InstanceHandle& instance) | 73 Printing_Dev::Printing_Dev(Instance* instance) |
74 : associated_instance_(instance) { | 74 : associated_instance_(instance) { |
75 Module::Get()->AddPluginInterface(kPPPPrintingInterface, &ppp_printing); | 75 Module::Get()->AddPluginInterface(kPPPPrintingInterface, &ppp_printing); |
76 Instance::AddPerInstanceObject(instance, kPPPPrintingInterface, this); | 76 instance->AddPerInstanceObject(kPPPPrintingInterface, this); |
77 } | 77 } |
78 | 78 |
79 Printing_Dev::~Printing_Dev() { | 79 Printing_Dev::~Printing_Dev() { |
80 Instance::RemovePerInstanceObject(associated_instance_, | 80 Instance::RemovePerInstanceObject(associated_instance_, |
81 kPPPPrintingInterface, this); | 81 kPPPPrintingInterface, this); |
82 } | 82 } |
83 | 83 |
84 } // namespace pp | 84 } // namespace pp |
OLD | NEW |