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

Unified Diff: chrome/common/extensions/api/experimental.fonts.json

Issue 9576001: Add getFontList() to Font Settings Extension API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address comments Created 8 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: chrome/common/extensions/api/experimental.fonts.json
diff --git a/chrome/common/extensions/api/experimental.fonts.json b/chrome/common/extensions/api/experimental.fonts.json
index c763102c39257048d6572b278530612efdf96ba0..13c3ff00f9878086f79f6dc9ff550266fad66a43 100644
--- a/chrome/common/extensions/api/experimental.fonts.json
+++ b/chrome/common/extensions/api/experimental.fonts.json
@@ -1,11 +1,28 @@
[
{
"namespace": "experimental.fontSettings",
+ "types": [
+ {
+ "id": "FontName",
+ "type": "object",
+ "description": "Represents a font name.",
+ "properties": {
+ "fontName": {
+ "type": "string",
+ "description": "The font name."
+ },
+ "localizedName": {
+ "type": "string",
+ "description": "The font name localized for the current locale."
+ }
+ }
+ }
+ ],
"functions": [
{
"name": "getFontName",
"type": "function",
- "description": "Gets the font name of the current setting for a given script and font family.",
+ "description": "Gets the font name of the current setting for a given script and generic font family.",
"parameters": [
{
"name": "details",
@@ -46,7 +63,7 @@
{
"name": "setFontName",
"type": "function",
- "description": "Sets the font name of the current setting for a given script and font family.",
+ "description": "Sets the font name of the current setting for a given script and generic font family.",
"parameters": [
{
"name": "details",
@@ -76,6 +93,24 @@
"parameters": []
}
]
+ },
+ {
+ "name": "getFontList",
+ "type": "function",
+ "description": "Gets a list of fonts on the system.",
+ "parameters": [
+ {
+ "type": "function",
+ "name": "callback",
+ "parameters": [
+ {
+ "name": "results",
+ "type": "array",
+ "items": { "$ref": "FontName" }
+ }
+ ]
+ }
+ ]
}
]
}
« no previous file with comments | « chrome/browser/extensions/extension_function_dispatcher.cc ('k') | chrome/test/data/extensions/api_test/font_settings/test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698