| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #ifndef MOJO_PUBLIC_CPP_BINDINGS_MAP_TRAITS_WTF_HASH_MAP_H_ | 5 #ifndef MOJO_PUBLIC_CPP_BINDINGS_MAP_TRAITS_WTF_HASH_MAP_H_ |
| 6 #define MOJO_PUBLIC_CPP_BINDINGS_MAP_TRAITS_WTF_HASH_MAP_H_ | 6 #define MOJO_PUBLIC_CPP_BINDINGS_MAP_TRAITS_WTF_HASH_MAP_H_ |
| 7 | 7 |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "mojo/public/cpp/bindings/map_traits.h" | 9 #include "mojo/public/cpp/bindings/map_traits.h" |
| 10 #include "third_party/WebKit/Source/wtf/HashMap.h" | 10 #include "third_party/WebKit/Source/platform/wtf/HashMap.h" |
| 11 | 11 |
| 12 namespace mojo { | 12 namespace mojo { |
| 13 | 13 |
| 14 template <typename K, typename V> | 14 template <typename K, typename V> |
| 15 struct MapTraits<WTF::HashMap<K, V>> { | 15 struct MapTraits<WTF::HashMap<K, V>> { |
| 16 using Key = K; | 16 using Key = K; |
| 17 using Value = V; | 17 using Value = V; |
| 18 using Iterator = typename WTF::HashMap<K, V>::iterator; | 18 using Iterator = typename WTF::HashMap<K, V>::iterator; |
| 19 using ConstIterator = typename WTF::HashMap<K, V>::const_iterator; | 19 using ConstIterator = typename WTF::HashMap<K, V>::const_iterator; |
| 20 | 20 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 input.insert(std::forward<IK>(key), std::forward<IV>(value)); | 55 input.insert(std::forward<IK>(key), std::forward<IV>(value)); |
| 56 return true; | 56 return true; |
| 57 } | 57 } |
| 58 | 58 |
| 59 static void SetToEmpty(WTF::HashMap<K, V>* output) { output->Clear(); } | 59 static void SetToEmpty(WTF::HashMap<K, V>* output) { output->Clear(); } |
| 60 }; | 60 }; |
| 61 | 61 |
| 62 } // namespace mojo | 62 } // namespace mojo |
| 63 | 63 |
| 64 #endif // MOJO_PUBLIC_CPP_BINDINGS_MAP_TRAITS_WTF_HASH_MAP_H_ | 64 #endif // MOJO_PUBLIC_CPP_BINDINGS_MAP_TRAITS_WTF_HASH_MAP_H_ |
| OLD | NEW |