summaryrefslogtreecommitdiffstats
path: root/chrome/common/extensions
diff options
context:
space:
mode:
authorfalken@chromium.org <falken@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-29 06:16:17 +0000
committerfalken@chromium.org <falken@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-29 06:16:17 +0000
commita3614899984ed5eff5b8a3afa3e7166a2282c528 (patch)
tree89953a069e87a6991bc107de275e6c64d3dca2f1 /chrome/common/extensions
parent69ac3c7427a3c357e19581b8986a03d55cd6ce3c (diff)
downloadchromium_src-a3614899984ed5eff5b8a3afa3e7166a2282c528.zip
chromium_src-a3614899984ed5eff5b8a3afa3e7166a2282c528.tar.gz
chromium_src-a3614899984ed5eff5b8a3afa3e7166a2282c528.tar.bz2
Add setFontName to Font Settings Extension API.
BUG=114148 TEST=browser_tests --gtest_filter=ExtensionApiTest.FontSettings Review URL: http://codereview.chromium.org/9481023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@124137 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/extensions')
-rw-r--r--chrome/common/extensions/api/experimental.fonts.json34
-rw-r--r--chrome/common/extensions/docs/samples.json1
2 files changed, 35 insertions, 0 deletions
diff --git a/chrome/common/extensions/api/experimental.fonts.json b/chrome/common/extensions/api/experimental.fonts.json
index 9a4d51e..c763102 100644
--- a/chrome/common/extensions/api/experimental.fonts.json
+++ b/chrome/common/extensions/api/experimental.fonts.json
@@ -42,6 +42,40 @@
]
}
]
+ },
+ {
+ "name": "setFontName",
+ "type": "function",
+ "description": "Sets the font name of the current setting for a given script and font family.",
+ "parameters": [
+ {
+ "name": "details",
+ "type": "object",
+ "properties": {
+ "script": {
+ "type": "string",
+ "enum": ["Arab", "Hang", "Hans", "Hant", "Hrkt"],
+ "description": "The ISO 15924 script code for which the font setting should be retrieved. If omitted, the global script font setting is retrieved.",
+ "optional": true
+ },
+ "genericFamily": {
+ "type": "string",
+ "enum": ["standard", "sansserif", "serif", "fixed", "cursive", "fantasy"],
+ "description": "The CSS generic font family for which the font setting should be retrieved."
+ },
+ "fontName": {
+ "type": "string",
+ "description": "The font name."
+ }
+ }
+ },
+ {
+ "type": "function",
+ "name": "callback",
+ "optional": "true",
+ "parameters": []
+ }
+ ]
}
]
}
diff --git a/chrome/common/extensions/docs/samples.json b/chrome/common/extensions/docs/samples.json
index c9048c9..138003e 100644
--- a/chrome/common/extensions/docs/samples.json
+++ b/chrome/common/extensions/docs/samples.json
@@ -70,6 +70,7 @@
"chrome.experimental.devtools.console.onMessageAdded": "experimental.devtools.console.html#event-onMessageAdded",
"chrome.experimental.extension.onInstalled": "experimental.extension.html#event-onInstalled",
"chrome.experimental.fontSettings.getFontName": "experimental.fontSettings.html#method-getFontName",
+ "chrome.experimental.fontSettings.setFontName": "experimental.fontSettings.html#method-setFontName",
"chrome.experimental.infobars.show": "experimental.infobars.html#method-show",
"chrome.experimental.keybinding.onCommand": "experimental.keybinding.html#event-onCommand",
"chrome.experimental.speechInput.isRecording": "experimental.speechInput.html#method-isRecording",