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 #include "chrome/browser/ui/views/theme_image_mapper.h" | 5 #include "chrome/browser/ui/views/theme_image_mapper.h" |
6 | 6 |
7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
8 #include "grit/theme_resources.h" | 8 #include "grit/theme_resources.h" |
9 | 9 |
10 namespace chrome { | 10 namespace chrome { |
11 | 11 |
12 // On platforms where there is both Ash and a desktop browser, provide DESKTOP | 12 // On platforms where there is both Ash and a desktop browser, provide DESKTOP |
13 // resources for the latter. | 13 // resources for the latter. |
14 int MapThemeImage(HostDesktopType desktop_type, int resource) { | 14 int MapThemeImage(HostDesktopType desktop_type, int resource) { |
15 #if !defined(OS_CHROMEOS) && !defined(OS_MACOSX) && !defined(OS_ANDROID) | 15 #if !defined(OS_CHROMEOS) && !defined(OS_MACOSX) |
16 if (desktop_type != HOST_DESKTOP_TYPE_NATIVE) | 16 if (desktop_type != HOST_DESKTOP_TYPE_NATIVE) |
17 return resource; | 17 return resource; |
18 | 18 |
19 switch (resource) { | 19 switch (resource) { |
20 case IDR_CONTENT_TOP_CENTER: | 20 case IDR_CONTENT_TOP_CENTER: |
21 return IDR_CONTENT_TOP_CENTER_DESKTOP; | 21 return IDR_CONTENT_TOP_CENTER_DESKTOP; |
22 case IDR_OTR_ICON: | 22 case IDR_OTR_ICON: |
23 return IDR_OTR_ICON_DESKTOP; | 23 return IDR_OTR_ICON_DESKTOP; |
24 case IDR_THEME_FRAME: | 24 case IDR_THEME_FRAME: |
25 return IDR_THEME_FRAME_DESKTOP; | 25 return IDR_THEME_FRAME_DESKTOP; |
(...skipping 11 matching lines...) Expand all Loading... |
37 return IDR_THEME_TOOLBAR_DESKTOP; | 37 return IDR_THEME_TOOLBAR_DESKTOP; |
38 default: | 38 default: |
39 break; | 39 break; |
40 } | 40 } |
41 #endif | 41 #endif |
42 | 42 |
43 return resource; | 43 return resource; |
44 } | 44 } |
45 | 45 |
46 } // namespace chrome | 46 } // namespace chrome |
OLD | NEW |