OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/host_resolver_dev.h" | 5 #include "ppapi/cpp/dev/host_resolver_dev.h" |
6 | 6 |
7 #include "ppapi/c/pp_errors.h" | 7 #include "ppapi/c/pp_errors.h" |
8 #include "ppapi/cpp/completion_callback.h" | 8 #include "ppapi/cpp/completion_callback.h" |
9 #include "ppapi/cpp/instance_handle.h" | 9 #include "ppapi/cpp/instance_handle.h" |
10 #include "ppapi/cpp/module_impl.h" | 10 #include "ppapi/cpp/module_impl.h" |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 | 74 |
75 uint32_t HostResolver_Dev::GetNetAddressCount() const { | 75 uint32_t HostResolver_Dev::GetNetAddressCount() const { |
76 if (has_interface<PPB_HostResolver_Dev_0_1>()) { | 76 if (has_interface<PPB_HostResolver_Dev_0_1>()) { |
77 return get_interface<PPB_HostResolver_Dev_0_1>()->GetNetAddressCount( | 77 return get_interface<PPB_HostResolver_Dev_0_1>()->GetNetAddressCount( |
78 pp_resource()); | 78 pp_resource()); |
79 } | 79 } |
80 | 80 |
81 return 0; | 81 return 0; |
82 } | 82 } |
83 | 83 |
84 NetAddress_Dev HostResolver_Dev::GetNetAddress(uint32_t index) const { | 84 NetAddress HostResolver_Dev::GetNetAddress(uint32_t index) const { |
85 if (has_interface<PPB_HostResolver_Dev_0_1>()) { | 85 if (has_interface<PPB_HostResolver_Dev_0_1>()) { |
86 return NetAddress_Dev( | 86 return NetAddress( |
87 PASS_REF, | 87 PASS_REF, |
88 get_interface<PPB_HostResolver_Dev_0_1>()->GetNetAddress( | 88 get_interface<PPB_HostResolver_Dev_0_1>()->GetNetAddress( |
89 pp_resource(), index)); | 89 pp_resource(), index)); |
90 } | 90 } |
91 | 91 |
92 return NetAddress_Dev(); | 92 return NetAddress(); |
93 } | 93 } |
94 | 94 |
95 } // namespace pp | 95 } // namespace pp |
OLD | NEW |