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 // Font Settings Extension API implementation. | 5 // Font Settings Extension API implementation. |
6 | 6 |
7 #include "chrome/browser/extensions/api/font_settings/font_settings_api.h" | 7 #include "chrome/browser/extensions/api/font_settings/font_settings_api.h" |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 RegisterFontFamilyMapObserver(®istrar_, | 136 RegisterFontFamilyMapObserver(®istrar_, |
137 prefs::kWebKitSerifFontFamilyMap, this); | 137 prefs::kWebKitSerifFontFamilyMap, this); |
138 RegisterFontFamilyMapObserver(®istrar_, | 138 RegisterFontFamilyMapObserver(®istrar_, |
139 prefs::kWebKitSansSerifFontFamilyMap, this); | 139 prefs::kWebKitSansSerifFontFamilyMap, this); |
140 RegisterFontFamilyMapObserver(®istrar_, | 140 RegisterFontFamilyMapObserver(®istrar_, |
141 prefs::kWebKitFixedFontFamilyMap, this); | 141 prefs::kWebKitFixedFontFamilyMap, this); |
142 RegisterFontFamilyMapObserver(®istrar_, | 142 RegisterFontFamilyMapObserver(®istrar_, |
143 prefs::kWebKitCursiveFontFamilyMap, this); | 143 prefs::kWebKitCursiveFontFamilyMap, this); |
144 RegisterFontFamilyMapObserver(®istrar_, | 144 RegisterFontFamilyMapObserver(®istrar_, |
145 prefs::kWebKitFantasyFontFamilyMap, this); | 145 prefs::kWebKitFantasyFontFamilyMap, this); |
| 146 RegisterFontFamilyMapObserver(®istrar_, |
| 147 prefs::kWebKitPictographFontFamilyMap, this); |
146 } | 148 } |
147 | 149 |
148 void FontSettingsEventRouter::AddPrefToObserve(const char* pref_name, | 150 void FontSettingsEventRouter::AddPrefToObserve(const char* pref_name, |
149 const char* event_name, | 151 const char* event_name, |
150 const char* key) { | 152 const char* key) { |
151 registrar_.Add(pref_name, this); | 153 registrar_.Add(pref_name, this); |
152 pref_event_map_[pref_name] = std::make_pair(event_name, key); | 154 pref_event_map_[pref_name] = std::make_pair(event_name, key); |
153 } | 155 } |
154 | 156 |
155 void FontSettingsEventRouter::Observe( | 157 void FontSettingsEventRouter::Observe( |
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
478 | 480 |
479 const char* SetMinimumFontSizeFunction::GetPrefName() { | 481 const char* SetMinimumFontSizeFunction::GetPrefName() { |
480 return prefs::kWebKitMinimumFontSize; | 482 return prefs::kWebKitMinimumFontSize; |
481 } | 483 } |
482 | 484 |
483 const char* SetMinimumFontSizeFunction::GetKey() { | 485 const char* SetMinimumFontSizeFunction::GetKey() { |
484 return kPixelSizeKey; | 486 return kPixelSizeKey; |
485 } | 487 } |
486 | 488 |
487 } // namespace extensions | 489 } // namespace extensions |
OLD | NEW |