| 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 <vector> | 5 #include <vector> |
| 6 | 6 |
| 7 #include "ppapi/cpp/dev/scrollbar_dev.h" | 7 #include "ppapi/cpp/dev/scrollbar_dev.h" |
| 8 | 8 |
| 9 #include "ppapi/cpp/instance.h" | 9 #include "ppapi/cpp/instance_handle.h" |
| 10 #include "ppapi/cpp/module.h" | 10 #include "ppapi/cpp/module.h" |
| 11 #include "ppapi/cpp/module_impl.h" | 11 #include "ppapi/cpp/module_impl.h" |
| 12 #include "ppapi/cpp/rect.h" | 12 #include "ppapi/cpp/rect.h" |
| 13 | 13 |
| 14 namespace pp { | 14 namespace pp { |
| 15 | 15 |
| 16 namespace { | 16 namespace { |
| 17 | 17 |
| 18 template <> const char* interface_name<PPB_Scrollbar_Dev>() { | 18 template <> const char* interface_name<PPB_Scrollbar_Dev>() { |
| 19 return PPB_SCROLLBAR_DEV_INTERFACE; | 19 return PPB_SCROLLBAR_DEV_INTERFACE; |
| 20 } | 20 } |
| 21 | 21 |
| 22 } // namespace | 22 } // namespace |
| 23 | 23 |
| 24 Scrollbar_Dev::Scrollbar_Dev(PP_Resource resource) : Widget_Dev(resource) { | 24 Scrollbar_Dev::Scrollbar_Dev(PP_Resource resource) : Widget_Dev(resource) { |
| 25 } | 25 } |
| 26 | 26 |
| 27 Scrollbar_Dev::Scrollbar_Dev(const Instance& instance, bool vertical) { | 27 Scrollbar_Dev::Scrollbar_Dev(const InstanceHandle& instance, bool vertical) { |
| 28 if (!has_interface<PPB_Scrollbar_Dev>()) | 28 if (!has_interface<PPB_Scrollbar_Dev>()) |
| 29 return; | 29 return; |
| 30 PassRefFromConstructor(get_interface<PPB_Scrollbar_Dev>()->Create( | 30 PassRefFromConstructor(get_interface<PPB_Scrollbar_Dev>()->Create( |
| 31 instance.pp_instance(), PP_FromBool(vertical))); | 31 instance.pp_instance(), PP_FromBool(vertical))); |
| 32 } | 32 } |
| 33 | 33 |
| 34 Scrollbar_Dev::Scrollbar_Dev(const Scrollbar_Dev& other) | 34 Scrollbar_Dev::Scrollbar_Dev(const Scrollbar_Dev& other) |
| 35 : Widget_Dev(other) { | 35 : Widget_Dev(other) { |
| 36 } | 36 } |
| 37 | 37 |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 } | 78 } |
| 79 | 79 |
| 80 void Scrollbar_Dev::ScrollBy(PP_ScrollBy_Dev unit, int32_t multiplier) { | 80 void Scrollbar_Dev::ScrollBy(PP_ScrollBy_Dev unit, int32_t multiplier) { |
| 81 if (has_interface<PPB_Scrollbar_Dev>()) | 81 if (has_interface<PPB_Scrollbar_Dev>()) |
| 82 get_interface<PPB_Scrollbar_Dev>()->ScrollBy(pp_resource(), | 82 get_interface<PPB_Scrollbar_Dev>()->ScrollBy(pp_resource(), |
| 83 unit, | 83 unit, |
| 84 multiplier); | 84 multiplier); |
| 85 } | 85 } |
| 86 | 86 |
| 87 } // namespace pp | 87 } // namespace pp |
| OLD | NEW |