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

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

Issue 2724203003: Don't look up font size preferences on Android. (Closed)
Patch Set: Fix unit test 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 2523 matching lines...) Expand 10 before | Expand all | Expand 10 after
2534 net::NetLog* ChromeContentBrowserClient::GetNetLog() { 2534 net::NetLog* ChromeContentBrowserClient::GetNetLog() {
2535 return g_browser_process->net_log(); 2535 return g_browser_process->net_log();
2536 } 2536 }
2537 2537
2538 void ChromeContentBrowserClient::OverrideWebkitPrefs( 2538 void ChromeContentBrowserClient::OverrideWebkitPrefs(
2539 RenderViewHost* rvh, WebPreferences* web_prefs) { 2539 RenderViewHost* rvh, WebPreferences* web_prefs) {
2540 Profile* profile = Profile::FromBrowserContext( 2540 Profile* profile = Profile::FromBrowserContext(
2541 rvh->GetProcess()->GetBrowserContext()); 2541 rvh->GetProcess()->GetBrowserContext());
2542 PrefService* prefs = profile->GetPrefs(); 2542 PrefService* prefs = profile->GetPrefs();
2543 2543
2544 // Fill per-script font preferences. These are not registered on Android 2544 // Fill font preferences. These are not registered on Android
2545 // - http://crbug.com/308033. 2545 // - http://crbug.com/308033, http://crbug.com/696364.
2546 #if !defined(OS_ANDROID) 2546 #if !defined(OS_ANDROID)
2547 FontFamilyCache::FillFontFamilyMap(profile, 2547 FontFamilyCache::FillFontFamilyMap(profile,
2548 prefs::kWebKitStandardFontFamilyMap, 2548 prefs::kWebKitStandardFontFamilyMap,
2549 &web_prefs->standard_font_family_map); 2549 &web_prefs->standard_font_family_map);
2550 FontFamilyCache::FillFontFamilyMap(profile, 2550 FontFamilyCache::FillFontFamilyMap(profile,
2551 prefs::kWebKitFixedFontFamilyMap, 2551 prefs::kWebKitFixedFontFamilyMap,
2552 &web_prefs->fixed_font_family_map); 2552 &web_prefs->fixed_font_family_map);
2553 FontFamilyCache::FillFontFamilyMap(profile, 2553 FontFamilyCache::FillFontFamilyMap(profile,
2554 prefs::kWebKitSerifFontFamilyMap, 2554 prefs::kWebKitSerifFontFamilyMap,
2555 &web_prefs->serif_font_family_map); 2555 &web_prefs->serif_font_family_map);
2556 FontFamilyCache::FillFontFamilyMap(profile, 2556 FontFamilyCache::FillFontFamilyMap(profile,
2557 prefs::kWebKitSansSerifFontFamilyMap, 2557 prefs::kWebKitSansSerifFontFamilyMap,
2558 &web_prefs->sans_serif_font_family_map); 2558 &web_prefs->sans_serif_font_family_map);
2559 FontFamilyCache::FillFontFamilyMap(profile, 2559 FontFamilyCache::FillFontFamilyMap(profile,
2560 prefs::kWebKitCursiveFontFamilyMap, 2560 prefs::kWebKitCursiveFontFamilyMap,
2561 &web_prefs->cursive_font_family_map); 2561 &web_prefs->cursive_font_family_map);
2562 FontFamilyCache::FillFontFamilyMap(profile, 2562 FontFamilyCache::FillFontFamilyMap(profile,
2563 prefs::kWebKitFantasyFontFamilyMap, 2563 prefs::kWebKitFantasyFontFamilyMap,
2564 &web_prefs->fantasy_font_family_map); 2564 &web_prefs->fantasy_font_family_map);
2565 FontFamilyCache::FillFontFamilyMap(profile, 2565 FontFamilyCache::FillFontFamilyMap(profile,
2566 prefs::kWebKitPictographFontFamilyMap, 2566 prefs::kWebKitPictographFontFamilyMap,
2567 &web_prefs->pictograph_font_family_map); 2567 &web_prefs->pictograph_font_family_map);
2568 #endif
2569 2568
2570 web_prefs->default_font_size = 2569 web_prefs->default_font_size =
2571 prefs->GetInteger(prefs::kWebKitDefaultFontSize); 2570 prefs->GetInteger(prefs::kWebKitDefaultFontSize);
2572 web_prefs->default_fixed_font_size = 2571 web_prefs->default_fixed_font_size =
2573 prefs->GetInteger(prefs::kWebKitDefaultFixedFontSize); 2572 prefs->GetInteger(prefs::kWebKitDefaultFixedFontSize);
2574 web_prefs->minimum_font_size = 2573 web_prefs->minimum_font_size =
2575 prefs->GetInteger(prefs::kWebKitMinimumFontSize); 2574 prefs->GetInteger(prefs::kWebKitMinimumFontSize);
2576 web_prefs->minimum_logical_font_size = 2575 web_prefs->minimum_logical_font_size =
2577 prefs->GetInteger(prefs::kWebKitMinimumLogicalFontSize); 2576 prefs->GetInteger(prefs::kWebKitMinimumLogicalFontSize);
2577 #endif
2578 2578
2579 web_prefs->default_encoding = prefs->GetString(prefs::kDefaultCharset); 2579 web_prefs->default_encoding = prefs->GetString(prefs::kDefaultCharset);
2580 2580
2581 web_prefs->javascript_can_open_windows_automatically = 2581 web_prefs->javascript_can_open_windows_automatically =
2582 prefs->GetBoolean(prefs::kWebKitJavascriptCanOpenWindowsAutomatically); 2582 prefs->GetBoolean(prefs::kWebKitJavascriptCanOpenWindowsAutomatically);
2583 web_prefs->dom_paste_enabled = 2583 web_prefs->dom_paste_enabled =
2584 prefs->GetBoolean(prefs::kWebKitDomPasteEnabled); 2584 prefs->GetBoolean(prefs::kWebKitDomPasteEnabled);
2585 web_prefs->tabs_to_links = prefs->GetBoolean(prefs::kWebkitTabsToLinks); 2585 web_prefs->tabs_to_links = prefs->GetBoolean(prefs::kWebkitTabsToLinks);
2586 2586
2587 if (!prefs->GetBoolean(prefs::kWebKitJavascriptEnabled)) 2587 if (!prefs->GetBoolean(prefs::kWebKitJavascriptEnabled))
(...skipping 977 matching lines...) Expand 10 before | Expand all | Expand 10 after
3565 RedirectNonUINonIOBrowserThreadsToTaskScheduler() { 3565 RedirectNonUINonIOBrowserThreadsToTaskScheduler() {
3566 return variations::GetVariationParamValue( 3566 return variations::GetVariationParamValue(
3567 "BrowserScheduler", "RedirectNonUINonIOBrowserThreads") == "true"; 3567 "BrowserScheduler", "RedirectNonUINonIOBrowserThreads") == "true";
3568 } 3568 }
3569 3569
3570 // static 3570 // static
3571 void ChromeContentBrowserClient::SetDefaultQuotaSettingsForTesting( 3571 void ChromeContentBrowserClient::SetDefaultQuotaSettingsForTesting(
3572 const storage::QuotaSettings* settings) { 3572 const storage::QuotaSettings* settings) {
3573 g_default_quota_settings = settings; 3573 g_default_quota_settings = settings;
3574 } 3574 }
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