| 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.h" |
| 10 #include "ppapi/cpp/module.h" | 10 #include "ppapi/cpp/module.h" |
| (...skipping 23 matching lines...) Expand all Loading... |
| 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 |
| 38 uint32_t Scrollbar_Dev::GetThickness() { | 38 uint32_t Scrollbar_Dev::GetThickness() { |
| 39 if (!has_interface<PPB_Scrollbar_Dev>()) | 39 if (!has_interface<PPB_Scrollbar_Dev>()) |
| 40 return 0; | 40 return 0; |
| 41 return get_interface<PPB_Scrollbar_Dev>()->GetThickness(pp_resource()); | 41 return get_interface<PPB_Scrollbar_Dev>()->GetThickness(pp_resource()); |
| 42 } | 42 } |
| 43 | 43 |
| 44 bool Scrollbar_Dev::IsOverlay() { |
| 45 if (!has_interface<PPB_Scrollbar_Dev>()) |
| 46 return false; |
| 47 return |
| 48 PP_ToBool(get_interface<PPB_Scrollbar_Dev>()->IsOverlay(pp_resource())); |
| 49 } |
| 50 |
| 44 uint32_t Scrollbar_Dev::GetValue() { | 51 uint32_t Scrollbar_Dev::GetValue() { |
| 45 if (!has_interface<PPB_Scrollbar_Dev>()) | 52 if (!has_interface<PPB_Scrollbar_Dev>()) |
| 46 return 0; | 53 return 0; |
| 47 return get_interface<PPB_Scrollbar_Dev>()->GetValue(pp_resource()); | 54 return get_interface<PPB_Scrollbar_Dev>()->GetValue(pp_resource()); |
| 48 } | 55 } |
| 49 | 56 |
| 50 void Scrollbar_Dev::SetValue(uint32_t value) { | 57 void Scrollbar_Dev::SetValue(uint32_t value) { |
| 51 if (has_interface<PPB_Scrollbar_Dev>()) | 58 if (has_interface<PPB_Scrollbar_Dev>()) |
| 52 get_interface<PPB_Scrollbar_Dev>()->SetValue(pp_resource(), value); | 59 get_interface<PPB_Scrollbar_Dev>()->SetValue(pp_resource(), value); |
| 53 } | 60 } |
| (...skipping 17 matching lines...) Expand all Loading... |
| 71 } | 78 } |
| 72 | 79 |
| 73 void Scrollbar_Dev::ScrollBy(PP_ScrollBy_Dev unit, int32_t multiplier) { | 80 void Scrollbar_Dev::ScrollBy(PP_ScrollBy_Dev unit, int32_t multiplier) { |
| 74 if (has_interface<PPB_Scrollbar_Dev>()) | 81 if (has_interface<PPB_Scrollbar_Dev>()) |
| 75 get_interface<PPB_Scrollbar_Dev>()->ScrollBy(pp_resource(), | 82 get_interface<PPB_Scrollbar_Dev>()->ScrollBy(pp_resource(), |
| 76 unit, | 83 unit, |
| 77 multiplier); | 84 multiplier); |
| 78 } | 85 } |
| 79 | 86 |
| 80 } // namespace pp | 87 } // namespace pp |
| OLD | NEW |