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

Side by Side Diff: chrome/browser/renderer_preferences_util.cc

Issue 7850026: Aura under Linux (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: White spaces Created 9 years, 3 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/renderer_preferences_util.h" 5 #include "chrome/browser/renderer_preferences_util.h"
6 6
7 #include "chrome/browser/prefs/pref_service.h" 7 #include "chrome/browser/prefs/pref_service.h"
8 #include "chrome/browser/profiles/profile.h" 8 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/common/pref_names.h" 9 #include "chrome/common/pref_names.h"
10 10
11 #if defined(TOOLKIT_USES_GTK) 11 #if defined(TOOLKIT_USES_GTK) && !defined(USE_AURA)
12 #include "chrome/browser/ui/gtk/gtk_theme_service.h" 12 #include "chrome/browser/ui/gtk/gtk_theme_service.h"
13 #include "chrome/browser/ui/gtk/gtk_util.h" 13 #include "chrome/browser/ui/gtk/gtk_util.h"
14 #endif 14 #endif
15 15
16 namespace renderer_preferences_util { 16 namespace renderer_preferences_util {
17 17
18 void UpdateFromSystemSettings(RendererPreferences* prefs, Profile* profile) { 18 void UpdateFromSystemSettings(RendererPreferences* prefs, Profile* profile) {
19 #if defined(TOOLKIT_USES_GTK) 19 #if defined(TOOLKIT_USES_GTK) && !defined(USE_AURA)
20 gtk_util::UpdateGtkFontSettings(prefs); 20 gtk_util::UpdateGtkFontSettings(prefs);
21 21
22 #if !defined(OS_CHROMEOS) 22 #if !defined(OS_CHROMEOS) && !defined(USE_AURA)
23 GtkThemeService* theme_service = GtkThemeService::GetFrom(profile); 23 GtkThemeService* theme_service = GtkThemeService::GetFrom(profile);
24 24
25 prefs->focus_ring_color = theme_service->get_focus_ring_color(); 25 prefs->focus_ring_color = theme_service->get_focus_ring_color();
26 prefs->thumb_active_color = theme_service->get_thumb_active_color(); 26 prefs->thumb_active_color = theme_service->get_thumb_active_color();
27 prefs->thumb_inactive_color = theme_service->get_thumb_inactive_color(); 27 prefs->thumb_inactive_color = theme_service->get_thumb_inactive_color();
28 prefs->track_color = theme_service->get_track_color(); 28 prefs->track_color = theme_service->get_track_color();
29 prefs->active_selection_bg_color = 29 prefs->active_selection_bg_color =
30 theme_service->get_active_selection_bg_color(); 30 theme_service->get_active_selection_bg_color();
31 prefs->active_selection_fg_color = 31 prefs->active_selection_fg_color =
32 theme_service->get_active_selection_fg_color(); 32 theme_service->get_active_selection_fg_color();
33 prefs->inactive_selection_bg_color = 33 prefs->inactive_selection_bg_color =
34 theme_service->get_inactive_selection_bg_color(); 34 theme_service->get_inactive_selection_bg_color();
35 prefs->inactive_selection_fg_color = 35 prefs->inactive_selection_fg_color =
36 theme_service->get_inactive_selection_fg_color(); 36 theme_service->get_inactive_selection_fg_color();
37 #else 37 #else
38 prefs->focus_ring_color = SkColorSetRGB(0x50, 0x7A, 0xD5); 38 prefs->focus_ring_color = SkColorSetRGB(0x50, 0x7A, 0xD5);
39 prefs->active_selection_bg_color = SkColorSetRGB(0xDC, 0xE4, 0xFA); 39 prefs->active_selection_bg_color = SkColorSetRGB(0xDC, 0xE4, 0xFA);
40 prefs->active_selection_fg_color = SK_ColorBLACK; 40 prefs->active_selection_fg_color = SK_ColorBLACK;
41 prefs->inactive_selection_bg_color = SkColorSetRGB(0xEA, 0xEA, 0xEA); 41 prefs->inactive_selection_bg_color = SkColorSetRGB(0xEA, 0xEA, 0xEA);
42 prefs->inactive_selection_fg_color = SK_ColorBLACK; 42 prefs->inactive_selection_fg_color = SK_ColorBLACK;
43 #endif // defined(OS_CHROMEOS) 43 #endif // defined(OS_CHROMEOS) && defined(USE_AURA)
44 44
45 #endif // defined(TOOLKIT_USES_GTK) 45 #endif // defined(TOOLKIT_USES_GTK) && defined(USE_AURA)
46 46
47 prefs->enable_referrers = 47 prefs->enable_referrers =
48 profile->GetPrefs()->GetBoolean(prefs::kEnableReferrers); 48 profile->GetPrefs()->GetBoolean(prefs::kEnableReferrers);
49 } 49 }
50 50
51 } // renderer_preferences_util 51 } // renderer_preferences_util
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698