Chromium Code Reviews| Index: ppapi/cpp/var_dictionary.cc |
| diff --git a/ppapi/cpp/dev/var_dictionary_dev.cc b/ppapi/cpp/var_dictionary.cc |
| similarity index 39% |
| rename from ppapi/cpp/dev/var_dictionary_dev.cc |
| rename to ppapi/cpp/var_dictionary.cc |
| index 8fa3f6c10df9a29e66b2b912b4e7d457b738efc6..45c4ad9bddc9e400c280c77bff75b84702131652 100644 |
| --- a/ppapi/cpp/dev/var_dictionary_dev.cc |
| +++ b/ppapi/cpp/var_dictionary.cc |
| @@ -2,9 +2,9 @@ |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| -#include "ppapi/cpp/dev/var_dictionary_dev.h" |
| +#include "ppapi/cpp/var_dictionary.h" |
| -#include "ppapi/c/dev/ppb_var_dictionary_dev.h" |
| +#include "ppapi/c/ppb_var_dictionary.h" |
| #include "ppapi/cpp/logging.h" |
| #include "ppapi/cpp/module_impl.h" |
| @@ -12,20 +12,20 @@ namespace pp { |
| namespace { |
| -template <> const char* interface_name<PPB_VarDictionary_Dev_0_1>() { |
| - return PPB_VAR_DICTIONARY_DEV_INTERFACE_0_1; |
| +template <> const char* interface_name<PPB_VarDictionary_1_0>() { |
| + return PPB_VAR_DICTIONARY_INTERFACE_1_0; |
| } |
| } // namespace |
| -VarDictionary_Dev::VarDictionary_Dev() : Var(Null()) { |
| - if (has_interface<PPB_VarDictionary_Dev_0_1>()) |
| - var_ = get_interface<PPB_VarDictionary_Dev_0_1>()->Create(); |
| +VarDictionary::VarDictionary() : Var(Null()) { |
| + if (has_interface<PPB_VarDictionary_1_0>()) |
| + var_ = get_interface<PPB_VarDictionary_1_0>()->Create(); |
| else |
| PP_NOTREACHED(); |
| } |
| -VarDictionary_Dev::VarDictionary_Dev(const Var& var) : Var(var) { |
| +VarDictionary::VarDictionary(const Var& var) : Var(var) { |
| if (!var.is_dictionary()) { |
| PP_NOTREACHED(); |
| @@ -34,7 +34,7 @@ VarDictionary_Dev::VarDictionary_Dev(const Var& var) : Var(var) { |
| } |
| } |
| -VarDictionary_Dev::VarDictionary_Dev(const PP_Var& var) : Var(var) { |
| +VarDictionary::VarDictionary(const PP_Var& var) : Var(var) { |
| if (var.type != PP_VARTYPE_DICTIONARY) { |
| PP_NOTREACHED(); |
| @@ -43,20 +43,20 @@ VarDictionary_Dev::VarDictionary_Dev(const PP_Var& var) : Var(var) { |
| } |
| } |
| -VarDictionary_Dev::VarDictionary_Dev(const VarDictionary_Dev& other) |
| +VarDictionary::VarDictionary(const VarDictionary& other) |
| : Var(other) { |
| } |
| -VarDictionary_Dev::~VarDictionary_Dev() { |
| +VarDictionary::~VarDictionary() { |
| } |
| -VarDictionary_Dev& VarDictionary_Dev::operator=( |
| - const VarDictionary_Dev& other) { |
| +VarDictionary& VarDictionary::operator=( |
| + const VarDictionary& other) { |
| Var::operator=(other); |
| return *this; |
| } |
| -Var& VarDictionary_Dev::operator=(const Var& other) { |
| +Var& VarDictionary::operator=(const Var& other) { |
| if (other.is_dictionary()) { |
| Var::operator=(other); |
| } else { |
| @@ -66,45 +66,45 @@ Var& VarDictionary_Dev::operator=(const Var& other) { |
| return *this; |
| } |
| -Var VarDictionary_Dev::Get(const Var& key) const { |
| - if (!has_interface<PPB_VarDictionary_Dev_0_1>()) |
| +Var VarDictionary::Get(const Var& key) const { |
| + if (!has_interface<PPB_VarDictionary_1_0>()) |
| return Var(); |
| return Var( |
| PASS_REF, |
| - get_interface<PPB_VarDictionary_Dev_0_1>()->Get(var_, key.pp_var())); |
| + get_interface<PPB_VarDictionary_1_0>()->Get(var_, key.pp_var())); |
| } |
| -PP_Bool VarDictionary_Dev::Set(const Var& key, const Var& value) { |
| - if (!has_interface<PPB_VarDictionary_Dev_0_1>()) |
| +PP_Bool VarDictionary::Set(const Var& key, const Var& value) { |
|
noelallen1
2013/06/17 17:43:42
bool?
|
| + if (!has_interface<PPB_VarDictionary_1_0>()) |
| return PP_FALSE; |
| - return get_interface<PPB_VarDictionary_Dev_0_1>()->Set(var_, key.pp_var(), |
| + return get_interface<PPB_VarDictionary_1_0>()->Set(var_, key.pp_var(), |
| value.pp_var()); |
| } |
| -void VarDictionary_Dev::Delete(const Var& key) { |
| - if (has_interface<PPB_VarDictionary_Dev_0_1>()) |
| - get_interface<PPB_VarDictionary_Dev_0_1>()->Delete(var_, key.pp_var()); |
| +void VarDictionary::Delete(const Var& key) { |
| + if (has_interface<PPB_VarDictionary_1_0>()) |
| + get_interface<PPB_VarDictionary_1_0>()->Delete(var_, key.pp_var()); |
| } |
| -PP_Bool VarDictionary_Dev::HasKey(const Var& key) const { |
| - if (!has_interface<PPB_VarDictionary_Dev_0_1>()) |
| +PP_Bool VarDictionary::HasKey(const Var& key) const { |
|
noelallen1
2013/06/17 17:43:42
bool?
|
| + if (!has_interface<PPB_VarDictionary_1_0>()) |
| return PP_FALSE; |
| - return get_interface<PPB_VarDictionary_Dev_0_1>()->HasKey(var_, key.pp_var()); |
| + return get_interface<PPB_VarDictionary_1_0>()->HasKey(var_, key.pp_var()); |
| } |
| -VarArray_Dev VarDictionary_Dev::GetKeys() const { |
| - if (!has_interface<PPB_VarDictionary_Dev_0_1>()) |
| - return VarArray_Dev(); |
| +VarArray VarDictionary::GetKeys() const { |
| + if (!has_interface<PPB_VarDictionary_1_0>()) |
| + return VarArray(); |
| Var result(PASS_REF, |
| - get_interface<PPB_VarDictionary_Dev_0_1>()->GetKeys(var_)); |
| + get_interface<PPB_VarDictionary_1_0>()->GetKeys(var_)); |
| if (result.is_array()) |
| - return VarArray_Dev(result); |
| + return VarArray(result); |
| else |
| - return VarArray_Dev(); |
| + return VarArray(); |
| } |
| } // namespace pp |