Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(284)

Side by Side Diff: chrome/browser/managed_mode/managed_user_theme.cc

Issue 292443002: linux_aura: Compile ash into chrome. (Closed) Base URL: https://chromium.googlesource.com/chromium/src
Patch Set: Rebase to ToT Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/managed_mode/managed_user_theme.h" 5 #include "chrome/browser/managed_mode/managed_user_theme.h"
6 6
7 #include "chrome/browser/themes/theme_properties.h" 7 #include "chrome/browser/themes/theme_properties.h"
8 #include "grit/theme_resources.h" 8 #include "grit/theme_resources.h"
9 #include "ui/base/resource/resource_bundle.h" 9 #include "ui/base/resource/resource_bundle.h"
10 #include "ui/gfx/image/image.h" 10 #include "ui/gfx/image/image.h"
11 11
12 namespace { 12 namespace {
13 13
14 const SkColor kDefaultColorFrameManagedUser = SkColorSetRGB(165, 197, 225); 14 const SkColor kDefaultColorFrameManagedUser = SkColorSetRGB(165, 197, 225);
15 const SkColor kDefaultColorFrameManagedUserInactive = 15 const SkColor kDefaultColorFrameManagedUserInactive =
16 SkColorSetRGB(180, 225, 247); 16 SkColorSetRGB(180, 225, 247);
17 const SkColor kDefaultColorManagedUserLabelBackground = 17 const SkColor kDefaultColorManagedUserLabelBackground =
18 SkColorSetRGB(108, 167, 210); 18 SkColorSetRGB(108, 167, 210);
19 19
20 // Map resource ids to the managed user resource ids. 20 // Map resource ids to the managed user resource ids.
21 int MapToManagedUserResourceIds(int id) { 21 int MapToManagedUserResourceIds(int id) {
22 switch (id) { 22 switch (id) {
23 case IDR_THEME_FRAME: 23 case IDR_THEME_FRAME:
24 #if defined(OS_WIN) 24 #if defined(USE_ASH) && !defined(OS_CHROMEOS)
25 case IDR_THEME_FRAME_WIN: 25 case IDR_THEME_FRAME_DESKTOP:
26 #endif 26 #endif
27 return IDR_MANAGED_USER_THEME_FRAME; 27 return IDR_MANAGED_USER_THEME_FRAME;
28 case IDR_THEME_FRAME_INACTIVE: 28 case IDR_THEME_FRAME_INACTIVE:
29 #if defined(OS_WIN) 29 #if defined(USE_ASH) && !defined(OS_CHROMEOS)
30 case IDR_THEME_FRAME_INACTIVE_WIN: 30 case IDR_THEME_FRAME_INACTIVE_DESKTOP:
31 #endif 31 #endif
32 return IDR_MANAGED_USER_THEME_FRAME_INACTIVE; 32 return IDR_MANAGED_USER_THEME_FRAME_INACTIVE;
33 case IDR_THEME_TAB_BACKGROUND: 33 case IDR_THEME_TAB_BACKGROUND:
34 case IDR_THEME_TAB_BACKGROUND_V: 34 case IDR_THEME_TAB_BACKGROUND_V:
35 #if defined(OS_WIN) 35 #if defined(USE_ASH) && !defined(OS_CHROMEOS)
36 case IDR_THEME_TAB_BACKGROUND_WIN: 36 case IDR_THEME_TAB_BACKGROUND_DESKTOP:
37 #endif 37 #endif
38 return IDR_MANAGED_USER_THEME_TAB_BACKGROUND; 38 return IDR_MANAGED_USER_THEME_TAB_BACKGROUND;
39 } 39 }
40 return id; 40 return id;
41 } 41 }
42 42
43 } // namespace 43 } // namespace
44 44
45 ManagedUserTheme::ManagedUserTheme() 45 ManagedUserTheme::ManagedUserTheme()
46 : CustomThemeSupplier(MANAGED_USER_THEME) {} 46 : CustomThemeSupplier(MANAGED_USER_THEME) {}
(...skipping 22 matching lines...) Expand all
69 if (!HasCustomImage(id)) 69 if (!HasCustomImage(id))
70 return gfx::Image(); 70 return gfx::Image();
71 71
72 id = MapToManagedUserResourceIds(id); 72 id = MapToManagedUserResourceIds(id);
73 return ResourceBundle::GetSharedInstance().GetNativeImageNamed(id); 73 return ResourceBundle::GetSharedInstance().GetNativeImageNamed(id);
74 } 74 }
75 75
76 bool ManagedUserTheme::HasCustomImage(int id) const { 76 bool ManagedUserTheme::HasCustomImage(int id) const {
77 return id != MapToManagedUserResourceIds(id); 77 return id != MapToManagedUserResourceIds(id);
78 } 78 }
OLDNEW
« no previous file with comments | « chrome/browser/fullscreen_aurax11.cc ('k') | chrome/browser/notifications/message_center_notification_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698