| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/instance.h" | 5 #include "ppapi/cpp/instance.h" |
| 6 | 6 |
| 7 #include "ppapi/c/dev/ppp_printing_dev.h" | 7 #include "ppapi/c/dev/ppp_printing_dev.h" |
| 8 #include "ppapi/c/ppb_instance.h" | 8 #include "ppapi/c/ppb_instance.h" |
| 9 #include "ppapi/cpp/common.h" | 9 #include "ppapi/cpp/common.h" |
| 10 #include "ppapi/cpp/dev/context_3d_dev.h" | 10 #include "ppapi/cpp/dev/surface_3d_dev.h" |
| 11 #include "ppapi/cpp/graphics_2d.h" | 11 #include "ppapi/cpp/graphics_2d.h" |
| 12 #include "ppapi/cpp/image_data.h" | 12 #include "ppapi/cpp/image_data.h" |
| 13 #include "ppapi/cpp/logging.h" | 13 #include "ppapi/cpp/logging.h" |
| 14 #include "ppapi/cpp/module.h" | 14 #include "ppapi/cpp/module.h" |
| 15 #include "ppapi/cpp/module_impl.h" | 15 #include "ppapi/cpp/module_impl.h" |
| 16 #include "ppapi/cpp/point.h" | 16 #include "ppapi/cpp/point.h" |
| 17 #include "ppapi/cpp/resource.h" | 17 #include "ppapi/cpp/resource.h" |
| 18 #include "ppapi/cpp/var.h" | 18 #include "ppapi/cpp/var.h" |
| 19 | 19 |
| 20 namespace pp { | 20 namespace pp { |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 pp_instance())); | 84 pp_instance())); |
| 85 } | 85 } |
| 86 | 86 |
| 87 bool Instance::BindGraphics(const Graphics2D& graphics) { | 87 bool Instance::BindGraphics(const Graphics2D& graphics) { |
| 88 if (!has_interface<PPB_Instance>()) | 88 if (!has_interface<PPB_Instance>()) |
| 89 return false; | 89 return false; |
| 90 return PPBoolToBool(get_interface<PPB_Instance>()->BindGraphics( | 90 return PPBoolToBool(get_interface<PPB_Instance>()->BindGraphics( |
| 91 pp_instance(), graphics.pp_resource())); | 91 pp_instance(), graphics.pp_resource())); |
| 92 } | 92 } |
| 93 | 93 |
| 94 bool Instance::BindGraphics(const Context3D_Dev& graphics) { | 94 bool Instance::BindGraphics(const Surface3D_Dev& graphics) { |
| 95 if (!has_interface<PPB_Instance>()) | 95 if (!has_interface<PPB_Instance>()) |
| 96 return false; | 96 return false; |
| 97 return PPBoolToBool(get_interface<PPB_Instance>()->BindGraphics( | 97 return PPBoolToBool(get_interface<PPB_Instance>()->BindGraphics( |
| 98 pp_instance(), graphics.pp_resource())); | 98 pp_instance(), graphics.pp_resource())); |
| 99 } | 99 } |
| 100 | 100 |
| 101 bool Instance::IsFullFrame() { | 101 bool Instance::IsFullFrame() { |
| 102 if (!has_interface<PPB_Instance>()) | 102 if (!has_interface<PPB_Instance>()) |
| 103 return false; | 103 return false; |
| 104 return PPBoolToBool(get_interface<PPB_Instance>()->IsFullFrame( | 104 return PPBoolToBool(get_interface<PPB_Instance>()->IsFullFrame( |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 if (!that) | 149 if (!that) |
| 150 return NULL; | 150 return NULL; |
| 151 InterfaceNameToObjectMap::iterator found = | 151 InterfaceNameToObjectMap::iterator found = |
| 152 that->interface_name_to_objects_.find(interface_name); | 152 that->interface_name_to_objects_.find(interface_name); |
| 153 if (found == that->interface_name_to_objects_.end()) | 153 if (found == that->interface_name_to_objects_.end()) |
| 154 return NULL; | 154 return NULL; |
| 155 return found->second; | 155 return found->second; |
| 156 } | 156 } |
| 157 | 157 |
| 158 } // namespace pp | 158 } // namespace pp |
| OLD | NEW |