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

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

Issue 2734573002: Don't look up font size preferences on Android. (Closed)
Patch Set: Created 3 years, 9 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/prefs/chrome_pref_service_unittest.cc » ('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/chrome_content_browser_client.h" 5 #include "chrome/browser/chrome_content_browser_client.h"
6 6
7 #include <map> 7 #include <map>
8 #include <set> 8 #include <set>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 2403 matching lines...) Expand 10 before | Expand all | Expand 10 after
2414 net::NetLog* ChromeContentBrowserClient::GetNetLog() { 2414 net::NetLog* ChromeContentBrowserClient::GetNetLog() {
2415 return g_browser_process->net_log(); 2415 return g_browser_process->net_log();
2416 } 2416 }
2417 2417
2418 void ChromeContentBrowserClient::OverrideWebkitPrefs( 2418 void ChromeContentBrowserClient::OverrideWebkitPrefs(
2419 RenderViewHost* rvh, WebPreferences* web_prefs) { 2419 RenderViewHost* rvh, WebPreferences* web_prefs) {
2420 Profile* profile = Profile::FromBrowserContext( 2420 Profile* profile = Profile::FromBrowserContext(
2421 rvh->GetProcess()->GetBrowserContext()); 2421 rvh->GetProcess()->GetBrowserContext());
2422 PrefService* prefs = profile->GetPrefs(); 2422 PrefService* prefs = profile->GetPrefs();
2423 2423
2424 // Fill per-script font preferences. These are not registered on Android 2424 // Fill font preferences. These are not registered on Android
2425 // - http://crbug.com/308033. 2425 // - http://crbug.com/308033, http://crbug.com/696364.
2426 #if !defined(OS_ANDROID) 2426 #if !defined(OS_ANDROID)
2427 FontFamilyCache::FillFontFamilyMap(profile, 2427 FontFamilyCache::FillFontFamilyMap(profile,
2428 prefs::kWebKitStandardFontFamilyMap, 2428 prefs::kWebKitStandardFontFamilyMap,
2429 &web_prefs->standard_font_family_map); 2429 &web_prefs->standard_font_family_map);
2430 FontFamilyCache::FillFontFamilyMap(profile, 2430 FontFamilyCache::FillFontFamilyMap(profile,
2431 prefs::kWebKitFixedFontFamilyMap, 2431 prefs::kWebKitFixedFontFamilyMap,
2432 &web_prefs->fixed_font_family_map); 2432 &web_prefs->fixed_font_family_map);
2433 FontFamilyCache::FillFontFamilyMap(profile, 2433 FontFamilyCache::FillFontFamilyMap(profile,
2434 prefs::kWebKitSerifFontFamilyMap, 2434 prefs::kWebKitSerifFontFamilyMap,
2435 &web_prefs->serif_font_family_map); 2435 &web_prefs->serif_font_family_map);
2436 FontFamilyCache::FillFontFamilyMap(profile, 2436 FontFamilyCache::FillFontFamilyMap(profile,
2437 prefs::kWebKitSansSerifFontFamilyMap, 2437 prefs::kWebKitSansSerifFontFamilyMap,
2438 &web_prefs->sans_serif_font_family_map); 2438 &web_prefs->sans_serif_font_family_map);
2439 FontFamilyCache::FillFontFamilyMap(profile, 2439 FontFamilyCache::FillFontFamilyMap(profile,
2440 prefs::kWebKitCursiveFontFamilyMap, 2440 prefs::kWebKitCursiveFontFamilyMap,
2441 &web_prefs->cursive_font_family_map); 2441 &web_prefs->cursive_font_family_map);
2442 FontFamilyCache::FillFontFamilyMap(profile, 2442 FontFamilyCache::FillFontFamilyMap(profile,
2443 prefs::kWebKitFantasyFontFamilyMap, 2443 prefs::kWebKitFantasyFontFamilyMap,
2444 &web_prefs->fantasy_font_family_map); 2444 &web_prefs->fantasy_font_family_map);
2445 FontFamilyCache::FillFontFamilyMap(profile, 2445 FontFamilyCache::FillFontFamilyMap(profile,
2446 prefs::kWebKitPictographFontFamilyMap, 2446 prefs::kWebKitPictographFontFamilyMap,
2447 &web_prefs->pictograph_font_family_map); 2447 &web_prefs->pictograph_font_family_map);
2448 #endif
2449 2448
2450 web_prefs->default_font_size = 2449 web_prefs->default_font_size =
2451 prefs->GetInteger(prefs::kWebKitDefaultFontSize); 2450 prefs->GetInteger(prefs::kWebKitDefaultFontSize);
2452 web_prefs->default_fixed_font_size = 2451 web_prefs->default_fixed_font_size =
2453 prefs->GetInteger(prefs::kWebKitDefaultFixedFontSize); 2452 prefs->GetInteger(prefs::kWebKitDefaultFixedFontSize);
2454 web_prefs->minimum_font_size = 2453 web_prefs->minimum_font_size =
2455 prefs->GetInteger(prefs::kWebKitMinimumFontSize); 2454 prefs->GetInteger(prefs::kWebKitMinimumFontSize);
2456 web_prefs->minimum_logical_font_size = 2455 web_prefs->minimum_logical_font_size =
2457 prefs->GetInteger(prefs::kWebKitMinimumLogicalFontSize); 2456 prefs->GetInteger(prefs::kWebKitMinimumLogicalFontSize);
2457 #endif
2458 2458
2459 web_prefs->default_encoding = prefs->GetString(prefs::kDefaultCharset); 2459 web_prefs->default_encoding = prefs->GetString(prefs::kDefaultCharset);
2460 2460
2461 web_prefs->javascript_can_open_windows_automatically = 2461 web_prefs->javascript_can_open_windows_automatically =
2462 prefs->GetBoolean(prefs::kWebKitJavascriptCanOpenWindowsAutomatically); 2462 prefs->GetBoolean(prefs::kWebKitJavascriptCanOpenWindowsAutomatically);
2463 web_prefs->dom_paste_enabled = 2463 web_prefs->dom_paste_enabled =
2464 prefs->GetBoolean(prefs::kWebKitDomPasteEnabled); 2464 prefs->GetBoolean(prefs::kWebKitDomPasteEnabled);
2465 web_prefs->tabs_to_links = prefs->GetBoolean(prefs::kWebkitTabsToLinks); 2465 web_prefs->tabs_to_links = prefs->GetBoolean(prefs::kWebkitTabsToLinks);
2466 2466
2467 if (!prefs->GetBoolean(prefs::kWebKitJavascriptEnabled)) 2467 if (!prefs->GetBoolean(prefs::kWebKitJavascriptEnabled))
(...skipping 808 matching lines...) Expand 10 before | Expand all | Expand 10 after
3276 render_frame_host, std::move(source), std::move(request)); 3276 render_frame_host, std::move(source), std::move(request));
3277 #else 3277 #else
3278 // Chrome's media remoting implementation depends on the Media Router 3278 // Chrome's media remoting implementation depends on the Media Router
3279 // infrastructure to identify remote sinks and provide the user interface for 3279 // infrastructure to identify remote sinks and provide the user interface for
3280 // sink selection. In the case where the Media Router is not present, simply 3280 // sink selection. In the case where the Media Router is not present, simply
3281 // drop the interface request. This will prevent code paths for media remoting 3281 // drop the interface request. This will prevent code paths for media remoting
3282 // in the renderer process from activating. 3282 // in the renderer process from activating.
3283 #endif 3283 #endif
3284 } 3284 }
3285 #endif // BUILDFLAG(ENABLE_MEDIA_REMOTING) 3285 #endif // BUILDFLAG(ENABLE_MEDIA_REMOTING)
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/prefs/chrome_pref_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698