OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/browser/resources_util.h" | 5 #include "chrome/browser/resources_util.h" |
6 | 6 |
| 7 #include <stddef.h> |
| 8 |
7 #include <utility> | 9 #include <utility> |
8 | 10 |
9 #include "base/containers/hash_tables.h" | 11 #include "base/containers/hash_tables.h" |
10 #include "base/lazy_instance.h" | 12 #include "base/lazy_instance.h" |
| 13 #include "build/build_config.h" |
11 #include "grit/components_scaled_resources_map.h" | 14 #include "grit/components_scaled_resources_map.h" |
12 #include "grit/theme_resources_map.h" | 15 #include "grit/theme_resources_map.h" |
13 #include "grit/ui_resources_map.h" | 16 #include "grit/ui_resources_map.h" |
14 | 17 |
15 #if defined(OS_CHROMEOS) | 18 #if defined(OS_CHROMEOS) |
16 #include "grit/ui_chromeos_resources_map.h" | 19 #include "grit/ui_chromeos_resources_map.h" |
17 #endif | 20 #endif |
18 | 21 |
19 namespace { | 22 namespace { |
20 | 23 |
(...skipping 30 matching lines...) Expand all Loading... |
51 StringIntMap id_map_; | 54 StringIntMap id_map_; |
52 }; | 55 }; |
53 | 56 |
54 static base::LazyInstance<ThemeMap> g_theme_ids = LAZY_INSTANCE_INITIALIZER; | 57 static base::LazyInstance<ThemeMap> g_theme_ids = LAZY_INSTANCE_INITIALIZER; |
55 | 58 |
56 } // namespace | 59 } // namespace |
57 | 60 |
58 int ResourcesUtil::GetThemeResourceId(const std::string& resource_name) { | 61 int ResourcesUtil::GetThemeResourceId(const std::string& resource_name) { |
59 return g_theme_ids.Get().GetId(resource_name); | 62 return g_theme_ids.Get().GetId(resource_name); |
60 } | 63 } |
OLD | NEW |