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 585 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
596 RegisterLocalizedFontPref(registry, prefs::kWebKitDefaultFixedFontSize, | 596 RegisterLocalizedFontPref(registry, prefs::kWebKitDefaultFixedFontSize, |
597 IDS_DEFAULT_FIXED_FONT_SIZE); | 597 IDS_DEFAULT_FIXED_FONT_SIZE); |
598 RegisterLocalizedFontPref(registry, prefs::kWebKitMinimumFontSize, | 598 RegisterLocalizedFontPref(registry, prefs::kWebKitMinimumFontSize, |
599 IDS_MINIMUM_FONT_SIZE); | 599 IDS_MINIMUM_FONT_SIZE); |
600 RegisterLocalizedFontPref(registry, prefs::kWebKitMinimumLogicalFontSize, | 600 RegisterLocalizedFontPref(registry, prefs::kWebKitMinimumLogicalFontSize, |
601 IDS_MINIMUM_LOGICAL_FONT_SIZE); | 601 IDS_MINIMUM_LOGICAL_FONT_SIZE); |
602 registry->RegisterBooleanPref( | 602 registry->RegisterBooleanPref( |
603 prefs::kWebKitUsesUniversalDetector, | 603 prefs::kWebKitUsesUniversalDetector, |
604 l10n_util::GetStringUTF8(IDS_USES_UNIVERSAL_DETECTOR) == "true", | 604 l10n_util::GetStringUTF8(IDS_USES_UNIVERSAL_DETECTOR) == "true", |
605 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); | 605 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); |
606 registry->RegisterStringPref( | |
607 prefs::kStaticEncodings, | |
608 l10n_util::GetStringUTF8(IDS_STATIC_ENCODING_LIST)); | |
609 registry->RegisterStringPref(prefs::kRecentlySelectedEncoding, std::string()); | |
610 } | 606 } |
611 | 607 |
612 // static | 608 // static |
613 void PrefsTabHelper::GetServiceInstance() { | 609 void PrefsTabHelper::GetServiceInstance() { |
614 PrefWatcherFactory::GetInstance(); | 610 PrefWatcherFactory::GetInstance(); |
615 } | 611 } |
616 | 612 |
617 void PrefsTabHelper::Observe(int type, | 613 void PrefsTabHelper::Observe(int type, |
618 const content::NotificationSource& source, | 614 const content::NotificationSource& source, |
619 const content::NotificationDetails& details) { | 615 const content::NotificationDetails& details) { |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
676 } | 672 } |
677 } | 673 } |
678 | 674 |
679 void PrefsTabHelper::OnWebPrefChanged(const std::string& pref_name) { | 675 void PrefsTabHelper::OnWebPrefChanged(const std::string& pref_name) { |
680 #if !defined(OS_ANDROID) | 676 #if !defined(OS_ANDROID) |
681 OnFontFamilyPrefChanged(pref_name); | 677 OnFontFamilyPrefChanged(pref_name); |
682 #endif | 678 #endif |
683 | 679 |
684 web_contents_->GetRenderViewHost()->OnWebkitPreferencesChanged(); | 680 web_contents_->GetRenderViewHost()->OnWebkitPreferencesChanged(); |
685 } | 681 } |
OLD | NEW |