| 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/renderer_preferences_util.h" | 5 #include "chrome/browser/renderer_preferences_util.h" |
| 6 | 6 |
| 7 #include "base/prefs/pref_service.h" | 7 #include "base/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 #include "content/public/common/renderer_preferences.h" | 10 #include "content/public/common/renderer_preferences.h" |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 pref_service->GetDouble(prefs::kFlingCurveTouchscreenGamma); | 133 pref_service->GetDouble(prefs::kFlingCurveTouchscreenGamma); |
| 134 #endif | 134 #endif |
| 135 | 135 |
| 136 #if defined(TOOLKIT_VIEWS) | 136 #if defined(TOOLKIT_VIEWS) |
| 137 prefs->caret_blink_interval = views::Textfield::GetCaretBlinkMs() / 1000.0; | 137 prefs->caret_blink_interval = views::Textfield::GetCaretBlinkMs() / 1000.0; |
| 138 #endif | 138 #endif |
| 139 | 139 |
| 140 #if defined(USE_AURA) && defined(OS_LINUX) && !defined(OS_CHROMEOS) | 140 #if defined(USE_AURA) && defined(OS_LINUX) && !defined(OS_CHROMEOS) |
| 141 views::LinuxUI* linux_ui = views::LinuxUI::instance(); | 141 views::LinuxUI* linux_ui = views::LinuxUI::instance(); |
| 142 if (linux_ui) { | 142 if (linux_ui) { |
| 143 if (ThemeServiceFactory::GetForProfile(profile)->UsingNativeTheme()) { | 143 if (ThemeServiceFactory::GetForProfile(profile)->UsingSystemTheme()) { |
| 144 prefs->focus_ring_color = linux_ui->GetFocusRingColor(); | 144 prefs->focus_ring_color = linux_ui->GetFocusRingColor(); |
| 145 prefs->thumb_active_color = linux_ui->GetThumbActiveColor(); | 145 prefs->thumb_active_color = linux_ui->GetThumbActiveColor(); |
| 146 prefs->thumb_inactive_color = linux_ui->GetThumbInactiveColor(); | 146 prefs->thumb_inactive_color = linux_ui->GetThumbInactiveColor(); |
| 147 prefs->track_color = linux_ui->GetTrackColor(); | 147 prefs->track_color = linux_ui->GetTrackColor(); |
| 148 prefs->active_selection_bg_color = linux_ui->GetActiveSelectionBgColor(); | 148 prefs->active_selection_bg_color = linux_ui->GetActiveSelectionBgColor(); |
| 149 prefs->active_selection_fg_color = linux_ui->GetActiveSelectionFgColor(); | 149 prefs->active_selection_fg_color = linux_ui->GetActiveSelectionFgColor(); |
| 150 prefs->inactive_selection_bg_color = | 150 prefs->inactive_selection_bg_color = |
| 151 linux_ui->GetInactiveSelectionBgColor(); | 151 linux_ui->GetInactiveSelectionBgColor(); |
| 152 prefs->inactive_selection_fg_color = | 152 prefs->inactive_selection_fg_color = |
| 153 linux_ui->GetInactiveSelectionFgColor(); | 153 linux_ui->GetInactiveSelectionFgColor(); |
| (...skipping 16 matching lines...) Expand all Loading... |
| 170 GetRendererPreferencesSubpixelRenderingEnum(params.subpixel_rendering); | 170 GetRendererPreferencesSubpixelRenderingEnum(params.subpixel_rendering); |
| 171 #endif | 171 #endif |
| 172 | 172 |
| 173 #if !defined(OS_MACOSX) | 173 #if !defined(OS_MACOSX) |
| 174 prefs->plugin_fullscreen_allowed = | 174 prefs->plugin_fullscreen_allowed = |
| 175 pref_service->GetBoolean(prefs::kFullscreenAllowed); | 175 pref_service->GetBoolean(prefs::kFullscreenAllowed); |
| 176 #endif | 176 #endif |
| 177 } | 177 } |
| 178 | 178 |
| 179 } // namespace renderer_preferences_util | 179 } // namespace renderer_preferences_util |
| OLD | NEW |