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