Index: chrome/common/extensions/docs/examples/api/fontSettings/popup.js |
diff --git a/chrome/common/extensions/docs/examples/api/fontSettings/popup.js b/chrome/common/extensions/docs/examples/api/fontSettings/popup.js |
index 670ff0db4400f91dc7652f383853ffa2f9be4943..d7439033fa45216330ad3adc1437de901991b558 100644 |
--- a/chrome/common/extensions/docs/examples/api/fontSettings/popup.js |
+++ b/chrome/common/extensions/docs/examples/api/fontSettings/popup.js |
@@ -55,8 +55,8 @@ function populateLists(fonts) { |
for (var j = 0; j < fonts.length; j++) { |
var item = document.createElement('option'); |
- item.value = fonts[j].fontName; |
- item.text = fonts[j].localizedName; |
+ item.value = fonts[j].fontId; |
+ item.text = fonts[j].displayName; |
list.add(item); |
} |
} |
@@ -74,25 +74,25 @@ function getFontChangeHandler(fontList, genericFamily) { |
var details = {}; |
details.genericFamily = genericFamily; |
- details.fontName = font; |
+ details.fontId = font; |
details.script = script; |
chrome.experimental.fontSettings.setFont(details); |
}; |
} |
-// Sets the selected value of |fontList| to |fontName|. |
-function setSelectedFont(fontList, fontName) { |
+// Sets the selected value of |fontList| to |fontId|. |
+function setSelectedFont(fontList, fontId) { |
var script = getSelectedScript(); |
var i; |
for (i = 0; i < fontList.length; i++) { |
- if (fontName == fontList.options[i].value) { |
+ if (fontId == fontList.options[i].value) { |
fontList.selectedIndex = i; |
break; |
} |
} |
if (i == fontList.length) { |
- console.warn("font '" + fontName + "' for " + fontList.id + ' for ' + |
+ console.warn("font '" + fontId + "' for " + fontList.id + ' for ' + |
script + ' is not on the system'); |
} |
} |
@@ -101,7 +101,7 @@ function setSelectedFont(fontList, fontName) { |
// font returned from |chrome.experimental.fontSettings.getFont|. |
function getFontHandler(list) { |
return function(details) { |
- setSelectedFont(list, details.fontName); |
+ setSelectedFont(list, details.fontId); |
list.disabled = !isControllableLevel(details.levelOfControl); |
}; |
} |