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

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

Issue 549303004: Allow default font size changing on Linux. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Win compile fix. Created 5 years, 4 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
« no previous file with comments | « no previous file | chrome/browser/resources/chromeos/chromevox/common/editable_text_area_shadow_test.unitjs » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/macros.h" 7 #include "base/macros.h"
8 #include "base/prefs/pref_service.h" 8 #include "base/prefs/pref_service.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/common/pref_names.h" 10 #include "chrome/common/pref_names.h"
11 #include "content/public/browser/host_zoom_map.h" 11 #include "content/public/browser/host_zoom_map.h"
12 #include "content/public/browser/web_contents.h" 12 #include "content/public/browser/web_contents.h"
13 #include "content/public/common/renderer_preferences.h" 13 #include "content/public/common/renderer_preferences.h"
14 #include "third_party/skia/include/core/SkColor.h" 14 #include "third_party/skia/include/core/SkColor.h"
15 15
16 #if defined(OS_LINUX) || defined(OS_ANDROID) 16 #if defined(OS_LINUX) || defined(OS_ANDROID)
17 #include "ui/gfx/font_render_params.h" 17 #include "ui/gfx/font_render_params.h"
18 #include "ui/gfx/platform_font.h"
18 #endif 19 #endif
19 20
20 #if !defined(OS_ANDROID) 21 #if !defined(OS_ANDROID)
21 #include "components/ui/zoom/zoom_controller.h" 22 #include "components/ui/zoom/zoom_controller.h"
22 #endif 23 #endif
23 24
24 #if defined(TOOLKIT_VIEWS) 25 #if defined(TOOLKIT_VIEWS)
25 #include "ui/views/controls/textfield/textfield.h" 26 #include "ui/views/controls/textfield/textfield.h"
26 #endif 27 #endif
27 28
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 104
104 #if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_WIN) 105 #if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_WIN)
105 CR_DEFINE_STATIC_LOCAL(const gfx::FontRenderParams, params, 106 CR_DEFINE_STATIC_LOCAL(const gfx::FontRenderParams, params,
106 (gfx::GetFontRenderParams(gfx::FontRenderParamsQuery(), NULL))); 107 (gfx::GetFontRenderParams(gfx::FontRenderParamsQuery(), NULL)));
107 prefs->should_antialias_text = params.antialiasing; 108 prefs->should_antialias_text = params.antialiasing;
108 prefs->use_subpixel_positioning = params.subpixel_positioning; 109 prefs->use_subpixel_positioning = params.subpixel_positioning;
109 prefs->hinting = params.hinting; 110 prefs->hinting = params.hinting;
110 prefs->use_autohinter = params.autohinter; 111 prefs->use_autohinter = params.autohinter;
111 prefs->use_bitmaps = params.use_bitmaps; 112 prefs->use_bitmaps = params.use_bitmaps;
112 prefs->subpixel_rendering = params.subpixel_rendering; 113 prefs->subpixel_rendering = params.subpixel_rendering;
114
115 #if defined(OS_LINUX)
116 scoped_refptr<gfx::PlatformFont> default_font(
117 gfx::PlatformFont::CreateDefault());
118 prefs->default_font_size = default_font->GetFontSize();
119 #endif // OS_LINUX
113 #endif 120 #endif
114 121
115 #if !defined(OS_MACOSX) 122 #if !defined(OS_MACOSX)
116 prefs->plugin_fullscreen_allowed = 123 prefs->plugin_fullscreen_allowed =
117 pref_service->GetBoolean(prefs::kFullscreenAllowed); 124 pref_service->GetBoolean(prefs::kFullscreenAllowed);
118 #endif 125 #endif
119 } 126 }
120 127
121 } // namespace renderer_preferences_util 128 } // namespace renderer_preferences_util
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/resources/chromeos/chromevox/common/editable_text_area_shadow_test.unitjs » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698