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/dev/graphics_3d_dev.h" |
9 #include "ppapi/cpp/dev/scrollbar_dev.h" | 10 #include "ppapi/cpp/dev/scrollbar_dev.h" |
10 #include "ppapi/cpp/dev/widget_dev.h" | 11 #include "ppapi/cpp/dev/widget_dev.h" |
11 #include "ppapi/cpp/graphics_2d.h" | 12 #include "ppapi/cpp/graphics_2d.h" |
12 #include "ppapi/cpp/image_data.h" | 13 #include "ppapi/cpp/image_data.h" |
13 #include "ppapi/cpp/logging.h" | 14 #include "ppapi/cpp/logging.h" |
14 #include "ppapi/cpp/module.h" | 15 #include "ppapi/cpp/module.h" |
15 #include "ppapi/cpp/module_impl.h" | 16 #include "ppapi/cpp/module_impl.h" |
16 #include "ppapi/cpp/point.h" | 17 #include "ppapi/cpp/point.h" |
17 #include "ppapi/cpp/resource.h" | 18 #include "ppapi/cpp/resource.h" |
18 #include "ppapi/cpp/var.h" | 19 #include "ppapi/cpp/var.h" |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 return Var(Var::PassRef(), | 80 return Var(Var::PassRef(), |
80 ppb_instance_f->GetOwnerElementObject(pp_instance())); | 81 ppb_instance_f->GetOwnerElementObject(pp_instance())); |
81 } | 82 } |
82 | 83 |
83 bool Instance::BindGraphics(const Graphics2D& graphics) { | 84 bool Instance::BindGraphics(const Graphics2D& graphics) { |
84 if (!ppb_instance_f) | 85 if (!ppb_instance_f) |
85 return false; | 86 return false; |
86 return ppb_instance_f->BindGraphics(pp_instance(), graphics.pp_resource()); | 87 return ppb_instance_f->BindGraphics(pp_instance(), graphics.pp_resource()); |
87 } | 88 } |
88 | 89 |
| 90 bool Instance::BindGraphics(const Graphics3D_Dev& graphics) { |
| 91 if (!ppb_instance_f) |
| 92 return false; |
| 93 return ppb_instance_f->BindGraphics(pp_instance(), graphics.pp_resource()); |
| 94 } |
| 95 |
89 bool Instance::IsFullFrame() { | 96 bool Instance::IsFullFrame() { |
90 if (!ppb_instance_f) | 97 if (!ppb_instance_f) |
91 return false; | 98 return false; |
92 return ppb_instance_f->IsFullFrame(pp_instance()); | 99 return ppb_instance_f->IsFullFrame(pp_instance()); |
93 } | 100 } |
94 | 101 |
95 Var Instance::ExecuteScript(const Var& script, Var* exception) { | 102 Var Instance::ExecuteScript(const Var& script, Var* exception) { |
96 if (!ppb_instance_f) | 103 if (!ppb_instance_f) |
97 return Var(); | 104 return Var(); |
98 return Var(Var::PassRef(), | 105 return Var(Var::PassRef(), |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 if (!that) | 141 if (!that) |
135 return NULL; | 142 return NULL; |
136 InterfaceNameToObjectMap::iterator found = | 143 InterfaceNameToObjectMap::iterator found = |
137 that->interface_name_to_objects_.find(interface_name); | 144 that->interface_name_to_objects_.find(interface_name); |
138 if (found == that->interface_name_to_objects_.end()) | 145 if (found == that->interface_name_to_objects_.end()) |
139 return NULL; | 146 return NULL; |
140 return found->second; | 147 return found->second; |
141 } | 148 } |
142 | 149 |
143 } // namespace pp | 150 } // namespace pp |
OLD | NEW |