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/ui/prefs/prefs_tab_helper.h" | 5 #include "chrome/browser/ui/prefs/prefs_tab_helper.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <set> | 10 #include <set> |
(...skipping 580 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
591 #endif | 591 #endif |
592 | 592 |
593 RegisterLocalizedFontPref(registry, prefs::kWebKitDefaultFontSize, | 593 RegisterLocalizedFontPref(registry, prefs::kWebKitDefaultFontSize, |
594 IDS_DEFAULT_FONT_SIZE); | 594 IDS_DEFAULT_FONT_SIZE); |
595 RegisterLocalizedFontPref(registry, prefs::kWebKitDefaultFixedFontSize, | 595 RegisterLocalizedFontPref(registry, prefs::kWebKitDefaultFixedFontSize, |
596 IDS_DEFAULT_FIXED_FONT_SIZE); | 596 IDS_DEFAULT_FIXED_FONT_SIZE); |
597 RegisterLocalizedFontPref(registry, prefs::kWebKitMinimumFontSize, | 597 RegisterLocalizedFontPref(registry, prefs::kWebKitMinimumFontSize, |
598 IDS_MINIMUM_FONT_SIZE); | 598 IDS_MINIMUM_FONT_SIZE); |
599 RegisterLocalizedFontPref(registry, prefs::kWebKitMinimumLogicalFontSize, | 599 RegisterLocalizedFontPref(registry, prefs::kWebKitMinimumLogicalFontSize, |
600 IDS_MINIMUM_LOGICAL_FONT_SIZE); | 600 IDS_MINIMUM_LOGICAL_FONT_SIZE); |
601 registry->RegisterBooleanPref( | |
602 prefs::kWebKitUsesUniversalDetector, | |
603 true, | |
604 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); | |
605 } | 601 } |
606 | 602 |
607 // static | 603 // static |
608 void PrefsTabHelper::GetServiceInstance() { | 604 void PrefsTabHelper::GetServiceInstance() { |
609 PrefWatcherFactory::GetInstance(); | 605 PrefWatcherFactory::GetInstance(); |
610 } | 606 } |
611 | 607 |
612 void PrefsTabHelper::Observe(int type, | 608 void PrefsTabHelper::Observe(int type, |
613 const content::NotificationSource& source, | 609 const content::NotificationSource& source, |
614 const content::NotificationDetails& details) { | 610 const content::NotificationDetails& details) { |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
671 } | 667 } |
672 } | 668 } |
673 | 669 |
674 void PrefsTabHelper::OnWebPrefChanged(const std::string& pref_name) { | 670 void PrefsTabHelper::OnWebPrefChanged(const std::string& pref_name) { |
675 #if !defined(OS_ANDROID) | 671 #if !defined(OS_ANDROID) |
676 OnFontFamilyPrefChanged(pref_name); | 672 OnFontFamilyPrefChanged(pref_name); |
677 #endif | 673 #endif |
678 | 674 |
679 web_contents_->GetRenderViewHost()->OnWebkitPreferencesChanged(); | 675 web_contents_->GetRenderViewHost()->OnWebkitPreferencesChanged(); |
680 } | 676 } |
OLD | NEW |