| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 CHROMECAST_COMMON_CAST_RESOURCE_DELEGATE_H_ | 5 #ifndef CHROMECAST_COMMON_CAST_RESOURCE_DELEGATE_H_ |
| 6 #define CHROMECAST_COMMON_CAST_RESOURCE_DELEGATE_H_ | 6 #define CHROMECAST_COMMON_CAST_RESOURCE_DELEGATE_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <unordered_map> |
| 10 | 11 |
| 11 #include "base/macros.h" | 12 #include "base/macros.h" |
| 12 #include "base/memory/ref_counted_memory.h" | 13 #include "base/memory/ref_counted_memory.h" |
| 13 #include "ui/base/resource/resource_bundle.h" | 14 #include "ui/base/resource/resource_bundle.h" |
| 14 | 15 |
| 15 namespace base { | 16 namespace base { |
| 16 class FilePath; | 17 class FilePath; |
| 17 } | 18 } |
| 18 | 19 |
| 19 namespace gfx { | 20 namespace gfx { |
| (...skipping 29 matching lines...) Expand all Loading... |
| 49 base::StringPiece* value) override; | 50 base::StringPiece* value) override; |
| 50 bool GetLocalizedString(int message_id, base::string16* value) override; | 51 bool GetLocalizedString(int message_id, base::string16* value) override; |
| 51 | 52 |
| 52 // Adds/removes/clears extra localized strings. | 53 // Adds/removes/clears extra localized strings. |
| 53 void AddExtraLocalizedString(int resource_id, | 54 void AddExtraLocalizedString(int resource_id, |
| 54 const base::string16& localized); | 55 const base::string16& localized); |
| 55 void RemoveExtraLocalizedString(int resource_id); | 56 void RemoveExtraLocalizedString(int resource_id); |
| 56 void ClearAllExtraLocalizedStrings(); | 57 void ClearAllExtraLocalizedStrings(); |
| 57 | 58 |
| 58 private: | 59 private: |
| 59 typedef base::hash_map<int, base::string16> ExtraLocaledStringMap; | 60 using ExtraLocaledStringMap = std::unordered_map<int, base::string16>; |
| 60 | 61 |
| 61 ExtraLocaledStringMap extra_localized_strings_; | 62 ExtraLocaledStringMap extra_localized_strings_; |
| 62 | 63 |
| 63 DISALLOW_COPY_AND_ASSIGN(CastResourceDelegate); | 64 DISALLOW_COPY_AND_ASSIGN(CastResourceDelegate); |
| 64 }; | 65 }; |
| 65 | 66 |
| 66 } // namespace chromecast | 67 } // namespace chromecast |
| 67 | 68 |
| 68 #endif // CHROMECAST_COMMON_CAST_RESOURCE_DELEGATE_H_ | 69 #endif // CHROMECAST_COMMON_CAST_RESOURCE_DELEGATE_H_ |
| OLD | NEW |