summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorfalken@chromium.org <falken@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-12 07:13:21 +0000
committerfalken@chromium.org <falken@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-12 07:13:21 +0000
commit7472a4b8fd0105df45921a52c2db3f8be45742ee (patch)
treeedb83befd0780e552803afe0166f85da1a125e43 /chrome
parent72b2686ab31ff340c060ac3f9d433a81deefe3da (diff)
downloadchromium_src-7472a4b8fd0105df45921a52c2db3f8be45742ee.zip
chromium_src-7472a4b8fd0105df45921a52c2db3f8be45742ee.tar.gz
chromium_src-7472a4b8fd0105df45921a52c2db3f8be45742ee.tar.bz2
[Font Settings API]: Rename fontName and localizedName to fontId and displayName
This should make the API a little more clear. BUG=114148 TEST=browser tests and sample extension still work Review URL: https://chromiumcodereview.appspot.com/10716003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@146295 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/extensions/extension_font_settings_api.cc14
-rw-r--r--chrome/common/extensions/api/experimental_font_settings.json21
-rw-r--r--chrome/common/extensions/docs/apps/experimental.bluetooth.html49
-rw-r--r--chrome/common/extensions/docs/apps/experimental.serial.html85
-rw-r--r--chrome/common/extensions/docs/examples/api/fontSettings.zipbin8307 -> 8304 bytes
-rw-r--r--chrome/common/extensions/docs/examples/api/fontSettings/popup.js16
-rw-r--r--chrome/common/extensions/docs/extensions/experimental.bluetooth.html49
-rw-r--r--chrome/common/extensions/docs/extensions/experimental.fontSettings.html26
-rw-r--r--chrome/common/extensions/docs/extensions/experimental.serial.html85
-rw-r--r--chrome/common/extensions/docs/samples.json3
-rw-r--r--chrome/common/extensions/docs/static/experimental.fontSettings.html4
-rw-r--r--chrome/test/data/extensions/api_test/font_settings/incognito/launch.js18
-rw-r--r--chrome/test/data/extensions/api_test/font_settings/standard/test.js30
13 files changed, 234 insertions, 166 deletions
diff --git a/chrome/browser/extensions/extension_font_settings_api.cc b/chrome/browser/extensions/extension_font_settings_api.cc
index 32d91d0..0d29ef2 100644
--- a/chrome/browser/extensions/extension_font_settings_api.cc
+++ b/chrome/browser/extensions/extension_font_settings_api.cc
@@ -36,10 +36,10 @@ namespace fonts = extensions::api::experimental_font_settings;
namespace {
-const char kFontNameKey[] = "fontName";
+const char kFontIdKey[] = "fontId";
const char kGenericFamilyKey[] = "genericFamily";
const char kLevelOfControlKey[] = "levelOfControl";
-const char kLocalizedNameKey[] = "localizedName";
+const char kDisplayNameKey[] = "displayName";
const char kPixelSizeKey[] = "pixelSize";
const char kScriptKey[] = "script";
@@ -204,7 +204,7 @@ void ExtensionFontSettingsEventRouter::OnFontNamePrefChanged(
ListValue args;
DictionaryValue* dict = new DictionaryValue();
args.Append(dict);
- dict->SetString(kFontNameKey, font_name);
+ dict->SetString(kFontIdKey, font_name);
dict->SetString(kGenericFamilyKey, generic_family);
dict->SetString(kScriptKey, script);
@@ -292,7 +292,7 @@ bool GetFontFunction::RunImpl() {
kIncognito);
DictionaryValue* result = new DictionaryValue();
- result->SetString(kFontNameKey, font_name);
+ result->SetString(kFontIdKey, font_name);
result->SetString(kLevelOfControlKey, level_of_control);
result_.reset(result);
return true;
@@ -320,7 +320,7 @@ bool SetFontFunction::RunImpl() {
extension_id(),
pref_path.c_str(),
extensions::kExtensionPrefsScopeRegular,
- Value::CreateStringValue(params->details.font_name));
+ Value::CreateStringValue(params->details.font_id));
return true;
}
@@ -357,8 +357,8 @@ bool GetFontListFunction::CopyFontsToResult(ListValue* fonts) {
}
DictionaryValue* font_name = new DictionaryValue();
- font_name->Set(kFontNameKey, Value::CreateStringValue(name));
- font_name->Set(kLocalizedNameKey, Value::CreateStringValue(localized_name));
+ font_name->Set(kFontIdKey, Value::CreateStringValue(name));
+ font_name->Set(kDisplayNameKey, Value::CreateStringValue(localized_name));
result->Append(font_name);
}
diff --git a/chrome/common/extensions/api/experimental_font_settings.json b/chrome/common/extensions/api/experimental_font_settings.json
index e8431bc..5dfbbfa 100644
--- a/chrome/common/extensions/api/experimental_font_settings.json
+++ b/chrome/common/extensions/api/experimental_font_settings.json
@@ -11,13 +11,13 @@
"type": "object",
"description": "Represents a font name.",
"properties": {
- "fontName": {
+ "fontId": {
"type": "string",
- "description": "The font name."
+ "description": "The font ID."
},
- "localizedName": {
+ "diplayName": {
"type": "string",
- "description": "The font name localized for the current locale."
+ "description": "The display name of the font."
}
}
},
@@ -112,9 +112,9 @@
"name": "details",
"type": "object",
"properties": {
- "fontName": {
+ "fontId": {
"type": "string",
- "description": "The font name. Rather than the literal font name preference value, this may be the name of the font that the system resolves the preference value to. The empty string signifies fallback to the global script font setting."
+ "description": "The font ID. Rather than the literal font ID preference value, this may be the ID of the font that the system resolves the preference value to. So, <var>fontId</var> can differ from the font passed to <code>setFont</code>, if, for example, the font is not available on the system. The empty string signifies fallback to the global script font setting."
},
"levelOfControl": {
"$ref": "LevelOfControl",
@@ -143,9 +143,9 @@
"$ref": "GenericFamily",
"description": "The generic font family for which the font should be set."
},
- "fontName": {
+ "fontId": {
"type": "string",
- "description": "The font name. If a script is specified, the empty string means to fallback to the global script font setting."
+ "description": "The font ID. The empty string means to fallback to the global script font setting."
}
}
},
@@ -409,7 +409,10 @@
"type": "object",
"name": "details",
"properties": {
- "fontName": { "type": "string" },
+ "fontId": {
+ "type": "string",
+ "description": "The font ID. See the description in <code>getFont</code>."
+ },
"script": {
"$ref": "ScriptCode",
"description": "The script code for which the font setting has changed.",
diff --git a/chrome/common/extensions/docs/apps/experimental.bluetooth.html b/chrome/common/extensions/docs/apps/experimental.bluetooth.html
index 116baf1..ee8506a 100644
--- a/chrome/common/extensions/docs/apps/experimental.bluetooth.html
+++ b/chrome/common/extensions/docs/apps/experimental.bluetooth.html
@@ -204,8 +204,6 @@
<li>
<a href="#event-onAvailabilityChanged">onAvailabilityChanged</a>
</li><li>
- <a href="#event-onDeviceDiscovered_">onDeviceDiscovered_</a>
- </li><li>
<a href="#event-onPowerChanged">onPowerChanged</a>
</li>
</ol>
@@ -1440,53 +1438,6 @@
</div> <!-- /description -->
<!-- /description -->
</div><div class="apiItem">
- <a name="event-onDeviceDiscovered_"></a>
- <h4>onDeviceDiscovered_</h4>
- <div class="summary">
- <!-- Note: intentionally longer 80 columns -->
- <span class="subdued">chrome.experimental.bluetooth.</span><span>onDeviceDiscovered_</span><span class="subdued">.addListener</span>(function(<span>experimental.bluetooth.Device device</span>) <span class="subdued">{...}</span><span></span>);
- </div>
- <div class="description">
- <p>Used to return discovered devices to the extension. Users should not add listeners to this event directly.</p>
- <!-- LISTENER PARAMETERS -->
- <div>
- <h4>Listener parameters</h4>
- <dl>
- <div>
- <div>
- <dt>
- <var>device</var>
- <em>
- <!-- TYPE -->
- <div style="display:inline">
- (
- <span id="typeTemplate">
- <span>
- <a href="experimental.bluetooth.html#type-experimental.bluetooth.Device">experimental.bluetooth.Device</a>
- </span>
- </span>
- )
- </div>
- </em>
- </dt>
- <dd class="todo">
- Undocumented.
- </dd>
- <!-- OBJECT PROPERTIES -->
- <!-- OBJECT METHODS -->
- <!-- OBJECT EVENT FIELDS -->
- <!-- FUNCTION PARAMETERS -->
- </div>
- </div>
- </dl>
- </div>
- <!-- EXTRA PARAMETERS -->
- <!-- LISTENER RETURN VALUE -->
- <dl>
- </dl>
- </div> <!-- /description -->
- <!-- /description -->
- </div><div class="apiItem">
<a name="event-onPowerChanged"></a>
<h4>onPowerChanged</h4>
<div class="summary">
diff --git a/chrome/common/extensions/docs/apps/experimental.serial.html b/chrome/common/extensions/docs/apps/experimental.serial.html
index 8a5252f..4f720c8 100644
--- a/chrome/common/extensions/docs/apps/experimental.serial.html
+++ b/chrome/common/extensions/docs/apps/experimental.serial.html
@@ -188,6 +188,10 @@
<a href="#types">Types</a>
<ol>
<li>
+ <a href="#type-experimental.serial.OpenOptions">experimental.serial.OpenOptions</a>
+ <ol>
+ </ol>
+ </li><li>
<a href="#type-experimental.serial.OpenInfo">experimental.serial.OpenInfo</a>
<ol>
</ol>
@@ -514,7 +518,8 @@
<div class="summary">
<!-- Note: intentionally longer 80 columns -->
<span>chrome.experimental.serial.open</span>(<span class="null"><span>string</span>
- <var><span>port</span></var></span><span class="null"><span>, </span><span>function</span>
+ <var><span>port</span></var></span><span class="optional"><span>, </span><span>experimental.serial.OpenOptions</span>
+ <var><span>options</span></var></span><span class="null"><span>, </span><span>function</span>
<var><span>OpenCallback</span></var></span>)</div>
<div class="description">
<p>Opens a connection to the given serial port.</p>
@@ -547,6 +552,30 @@
</div><div>
<div>
<dt>
+ <var>options</var>
+ <em>
+ <!-- TYPE -->
+ <div style="display:inline">
+ (
+ <span class="optional">optional</span>
+ <span id="typeTemplate">
+ <span>
+ <a href="experimental.serial.html#type-experimental.serial.OpenOptions">experimental.serial.OpenOptions</a>
+ </span>
+ </span>
+ )
+ </div>
+ </em>
+ </dt>
+ <dd>Connection options.</dd>
+ <!-- OBJECT PROPERTIES -->
+ <!-- OBJECT METHODS -->
+ <!-- OBJECT EVENT FIELDS -->
+ <!-- FUNCTION PARAMETERS -->
+ </div>
+ </div><div>
+ <div>
+ <dt>
<var>OpenCallback</var>
<em>
<!-- TYPE -->
@@ -848,6 +877,60 @@
<h3 id="types">Types</h3>
<!-- iterates over all types -->
<div class="apiItem">
+ <a name="type-experimental.serial.OpenOptions"></a>
+ <h4>experimental.serial.OpenOptions</h4>
+ <div>
+ <dt>
+ <em>
+ <!-- TYPE -->
+ <div style="display:inline">
+ (
+ <span id="typeTemplate">
+ <span>
+ <span>object</span>
+ </span>
+ </span>
+ )
+ </div>
+ </em>
+ </dt>
+ <dd class="todo">
+ Undocumented.
+ </dd>
+ <!-- OBJECT PROPERTIES -->
+ <dd>
+ <dl>
+ <div>
+ <div>
+ <dt>
+ <var>bitrate</var>
+ <em>
+ <!-- TYPE -->
+ <div style="display:inline">
+ (
+ <span id="typeTemplate">
+ <span>
+ <span>integer</span>
+ </span>
+ </span>
+ )
+ </div>
+ </em>
+ </dt>
+ <dd>The requested bitrate of the connection to be opened. For compatibility with the widest range of hardware, this number should match one of commonly-available bitrates, such as 110, 300, 1200, 2400, 4800, 9600, 14400, 19200, 38400, 57600, 115200. There is no guarantee, of course, that the device connected to the serial port will support the requested bitrate, even if the port itself supports that bitrate.</dd>
+ <!-- OBJECT PROPERTIES -->
+ <!-- OBJECT METHODS -->
+ <!-- OBJECT EVENT FIELDS -->
+ <!-- FUNCTION PARAMETERS -->
+ </div>
+ </div>
+ </dl>
+ </dd>
+ <!-- OBJECT METHODS -->
+ <!-- OBJECT EVENT FIELDS -->
+ <!-- FUNCTION PARAMETERS -->
+ </div>
+ </div><div class="apiItem">
<a name="type-experimental.serial.OpenInfo"></a>
<h4>experimental.serial.OpenInfo</h4>
<div>
diff --git a/chrome/common/extensions/docs/examples/api/fontSettings.zip b/chrome/common/extensions/docs/examples/api/fontSettings.zip
index c5293eb..fbe24c4 100644
--- a/chrome/common/extensions/docs/examples/api/fontSettings.zip
+++ b/chrome/common/extensions/docs/examples/api/fontSettings.zip
Binary files differ
diff --git a/chrome/common/extensions/docs/examples/api/fontSettings/popup.js b/chrome/common/extensions/docs/examples/api/fontSettings/popup.js
index 670ff0d..d743903 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);
};
}
diff --git a/chrome/common/extensions/docs/extensions/experimental.bluetooth.html b/chrome/common/extensions/docs/extensions/experimental.bluetooth.html
index f1bbae4..a99a296 100644
--- a/chrome/common/extensions/docs/extensions/experimental.bluetooth.html
+++ b/chrome/common/extensions/docs/extensions/experimental.bluetooth.html
@@ -233,8 +233,6 @@
<li>
<a href="#event-onAvailabilityChanged">onAvailabilityChanged</a>
</li><li>
- <a href="#event-onDeviceDiscovered_">onDeviceDiscovered_</a>
- </li><li>
<a href="#event-onPowerChanged">onPowerChanged</a>
</li>
</ol>
@@ -1884,53 +1882,6 @@
</div> <!-- /description -->
<!-- /description -->
</div><div class="apiItem">
- <a name="event-onDeviceDiscovered_"></a>
- <h4>onDeviceDiscovered_</h4>
- <div class="summary">
- <!-- Note: intentionally longer 80 columns -->
- <span class="subdued">chrome.experimental.bluetooth.</span><span>onDeviceDiscovered_</span><span class="subdued">.addListener</span>(function(<span>experimental.bluetooth.Device device</span>) <span class="subdued">{...}</span><span></span>);
- </div>
- <div class="description">
- <p>Used to return discovered devices to the extension. Users should not add listeners to this event directly.</p>
- <!-- LISTENER PARAMETERS -->
- <div>
- <h4>Listener parameters</h4>
- <dl>
- <div>
- <div>
- <dt>
- <var>device</var>
- <em>
- <!-- TYPE -->
- <div style="display:inline">
- (
- <span id="typeTemplate">
- <span>
- <a href="experimental.bluetooth.html#type-experimental.bluetooth.Device">experimental.bluetooth.Device</a>
- </span>
- </span>
- )
- </div>
- </em>
- </dt>
- <dd class="todo">
- Undocumented.
- </dd>
- <!-- OBJECT PROPERTIES -->
- <!-- OBJECT METHODS -->
- <!-- OBJECT EVENT FIELDS -->
- <!-- FUNCTION PARAMETERS -->
- </div>
- </div>
- </dl>
- </div>
- <!-- EXTRA PARAMETERS -->
- <!-- LISTENER RETURN VALUE -->
- <dl>
- </dl>
- </div> <!-- /description -->
- <!-- /description -->
- </div><div class="apiItem">
<a name="event-onPowerChanged"></a>
<h4>onPowerChanged</h4>
<div class="summary">
diff --git a/chrome/common/extensions/docs/extensions/experimental.fontSettings.html b/chrome/common/extensions/docs/extensions/experimental.fontSettings.html
index c244aef..056bfda 100644
--- a/chrome/common/extensions/docs/extensions/experimental.fontSettings.html
+++ b/chrome/common/extensions/docs/extensions/experimental.fontSettings.html
@@ -320,12 +320,12 @@ font covers, such as Latin.</p>
<p>The following code gets the standard font for Arabic.</p>
<pre>chrome.experimental.fontSettings.getFont(
{ genericFamily: 'standard', script: 'Arab' },
- function(details) { console.log(details.fontName); }
+ function(details) { console.log(details.fontId); }
);
</pre>
<p>The next snippet sets the sans-serif font for Japanese.</p>
<pre>chrome.experimental.fontSettings.setFont(
- { genericFamily: 'sansserif', script: 'Jpan', fontName: 'MS PGothic' }
+ { genericFamily: 'sansserif', script: 'Jpan', fontId: 'MS PGothic' }
);
</pre>
<p>You can find a sample extension using the Font Settings API in the
@@ -1234,7 +1234,7 @@ directory. For other examples and for help in viewing the source code, see
<div>
<div>
<dt>
- <var>fontName</var>
+ <var>fontId</var>
<em>
<!-- TYPE -->
<div style="display:inline">
@@ -1248,7 +1248,7 @@ directory. For other examples and for help in viewing the source code, see
</div>
</em>
</dt>
- <dd>The font name. Rather than the literal font name preference value, this may be the name of the font that the system resolves the preference value to. The empty string signifies fallback to the global script font setting.</dd>
+ <dd>The font ID. Rather than the literal font ID preference value, this may be the ID of the font that the system resolves the preference value to. So, <var>fontId</var> can differ from the font passed to <code>setFont</code>, if, for example, the font is not available on the system. The empty string signifies fallback to the global script font setting.</dd>
<!-- OBJECT PROPERTIES -->
<!-- OBJECT METHODS -->
<!-- OBJECT EVENT FIELDS -->
@@ -1857,7 +1857,7 @@ directory. For other examples and for help in viewing the source code, see
</div><div>
<div>
<dt>
- <var>fontName</var>
+ <var>fontId</var>
<em>
<!-- TYPE -->
<div style="display:inline">
@@ -1871,7 +1871,7 @@ directory. For other examples and for help in viewing the source code, see
</div>
</em>
</dt>
- <dd>The font name. If a script is specified, the empty string means to fallback to the global script font setting.</dd>
+ <dd>The font ID. The empty string means to fallback to the global script font setting.</dd>
<!-- OBJECT PROPERTIES -->
<!-- OBJECT METHODS -->
<!-- OBJECT EVENT FIELDS -->
@@ -2286,7 +2286,7 @@ directory. For other examples and for help in viewing the source code, see
<div>
<div>
<dt>
- <var>fontName</var>
+ <var>fontId</var>
<em>
<!-- TYPE -->
<div style="display:inline">
@@ -2300,9 +2300,7 @@ directory. For other examples and for help in viewing the source code, see
</div>
</em>
</dt>
- <dd class="todo">
- Undocumented.
- </dd>
+ <dd>The font ID. See the description in <code>getFont</code>.</dd>
<!-- OBJECT PROPERTIES -->
<!-- OBJECT METHODS -->
<!-- OBJECT EVENT FIELDS -->
@@ -2524,7 +2522,7 @@ directory. For other examples and for help in viewing the source code, see
<div>
<div>
<dt>
- <var>fontName</var>
+ <var>fontId</var>
<em>
<!-- TYPE -->
<div style="display:inline">
@@ -2538,7 +2536,7 @@ directory. For other examples and for help in viewing the source code, see
</div>
</em>
</dt>
- <dd>The font name.</dd>
+ <dd>The font ID.</dd>
<!-- OBJECT PROPERTIES -->
<!-- OBJECT METHODS -->
<!-- OBJECT EVENT FIELDS -->
@@ -2547,7 +2545,7 @@ directory. For other examples and for help in viewing the source code, see
</div><div>
<div>
<dt>
- <var>localizedName</var>
+ <var>diplayName</var>
<em>
<!-- TYPE -->
<div style="display:inline">
@@ -2561,7 +2559,7 @@ directory. For other examples and for help in viewing the source code, see
</div>
</em>
</dt>
- <dd>The font name localized for the current locale.</dd>
+ <dd>The display name of the font.</dd>
<!-- OBJECT PROPERTIES -->
<!-- OBJECT METHODS -->
<!-- OBJECT EVENT FIELDS -->
diff --git a/chrome/common/extensions/docs/extensions/experimental.serial.html b/chrome/common/extensions/docs/extensions/experimental.serial.html
index 9db5f7c..434261a 100644
--- a/chrome/common/extensions/docs/extensions/experimental.serial.html
+++ b/chrome/common/extensions/docs/extensions/experimental.serial.html
@@ -217,6 +217,10 @@
<a href="#types">Types</a>
<ol>
<li>
+ <a href="#type-experimental.serial.OpenOptions">OpenOptions</a>
+ <ol>
+ </ol>
+ </li><li>
<a href="#type-experimental.serial.OpenInfo">OpenInfo</a>
<ol>
</ol>
@@ -666,7 +670,8 @@
<div class="summary">
<!-- Note: intentionally longer 80 columns -->
<span>chrome.experimental.serial.open</span>(<span class="null"><span>string</span>
- <var><span>port</span></var></span><span class="null"><span>, </span><span>function</span>
+ <var><span>port</span></var></span><span class="optional"><span>, </span><span>experimental.serial.OpenOptions</span>
+ <var><span>options</span></var></span><span class="null"><span>, </span><span>function</span>
<var><span>OpenCallback</span></var></span>)</div>
<div class="description">
<p>Opens a connection to the given serial port.</p>
@@ -699,6 +704,30 @@
</div><div>
<div>
<dt>
+ <var>options</var>
+ <em>
+ <!-- TYPE -->
+ <div style="display:inline">
+ (
+ <span class="optional">optional</span>
+ <span id="typeTemplate">
+ <span>
+ <a href="experimental.serial.html#type-experimental.serial.OpenOptions">experimental.serial.OpenOptions</a>
+ </span>
+ </span>
+ )
+ </div>
+ </em>
+ </dt>
+ <dd>Connection options.</dd>
+ <!-- OBJECT PROPERTIES -->
+ <!-- OBJECT METHODS -->
+ <!-- OBJECT EVENT FIELDS -->
+ <!-- FUNCTION PARAMETERS -->
+ </div>
+ </div><div>
+ <div>
+ <dt>
<var>OpenCallback</var>
<em>
<!-- TYPE -->
@@ -1117,6 +1146,60 @@
<h3 id="types">Types</h3>
<!-- iterates over all types -->
<div class="apiItem">
+ <a name="type-experimental.serial.OpenOptions"></a>
+ <h4>experimental.serial.OpenOptions</h4>
+ <div>
+ <dt>
+ <em>
+ <!-- TYPE -->
+ <div style="display:inline">
+ (
+ <span id="typeTemplate">
+ <span>
+ <span>object</span>
+ </span>
+ </span>
+ )
+ </div>
+ </em>
+ </dt>
+ <dd class="todo">
+ Undocumented.
+ </dd>
+ <!-- OBJECT PROPERTIES -->
+ <dd>
+ <dl>
+ <div>
+ <div>
+ <dt>
+ <var>bitrate</var>
+ <em>
+ <!-- TYPE -->
+ <div style="display:inline">
+ (
+ <span id="typeTemplate">
+ <span>
+ <span>integer</span>
+ </span>
+ </span>
+ )
+ </div>
+ </em>
+ </dt>
+ <dd>The requested bitrate of the connection to be opened. For compatibility with the widest range of hardware, this number should match one of commonly-available bitrates, such as 110, 300, 1200, 2400, 4800, 9600, 14400, 19200, 38400, 57600, 115200. There is no guarantee, of course, that the device connected to the serial port will support the requested bitrate, even if the port itself supports that bitrate.</dd>
+ <!-- OBJECT PROPERTIES -->
+ <!-- OBJECT METHODS -->
+ <!-- OBJECT EVENT FIELDS -->
+ <!-- FUNCTION PARAMETERS -->
+ </div>
+ </div>
+ </dl>
+ </dd>
+ <!-- OBJECT METHODS -->
+ <!-- OBJECT EVENT FIELDS -->
+ <!-- FUNCTION PARAMETERS -->
+ </div>
+ </div><div class="apiItem">
<a name="type-experimental.serial.OpenInfo"></a>
<h4>experimental.serial.OpenInfo</h4>
<div>
diff --git a/chrome/common/extensions/docs/samples.json b/chrome/common/extensions/docs/samples.json
index 32bb3a8..22a63ed 100644
--- a/chrome/common/extensions/docs/samples.json
+++ b/chrome/common/extensions/docs/samples.json
@@ -129,7 +129,6 @@
"chrome.experimental.bluetooth.isAvailable": "experimental.bluetooth.html#method-isAvailable",
"chrome.experimental.bluetooth.isPowered": "experimental.bluetooth.html#method-isPowered",
"chrome.experimental.bluetooth.onAvailabilityChanged": "experimental.bluetooth.html#event-onAvailabilityChanged",
- "chrome.experimental.bluetooth.onDeviceDiscovered_": "experimental.bluetooth.html#event-onDeviceDiscovered_",
"chrome.experimental.bluetooth.onPowerChanged": "experimental.bluetooth.html#event-onPowerChanged",
"chrome.experimental.bluetooth.read": "experimental.bluetooth.html#method-read",
"chrome.experimental.bluetooth.setOutOfBandPairingData": "experimental.bluetooth.html#method-setOutOfBandPairingData",
@@ -1291,7 +1290,7 @@
"popup.html",
"popup.js"
],
- "source_hash": "5f8cd1998d10e9a0a7f1712fa46396c4dcdc910a",
+ "source_hash": "b96589beb7a63c47869a425de932b171853cc2c3",
"zip_path": "examples/api/fontSettings.zip"
},
{
diff --git a/chrome/common/extensions/docs/static/experimental.fontSettings.html b/chrome/common/extensions/docs/static/experimental.fontSettings.html
index 18851c2..80de2e7 100644
--- a/chrome/common/extensions/docs/static/experimental.fontSettings.html
+++ b/chrome/common/extensions/docs/static/experimental.fontSettings.html
@@ -40,14 +40,14 @@ font covers, such as Latin.</p>
<pre>
chrome.experimental.fontSettings.getFont(
{ genericFamily: 'standard', script: 'Arab' },
- function(details) { console.log(details.fontName); }
+ function(details) { console.log(details.fontId); }
);
</pre>
<p>The next snippet sets the sans-serif font for Japanese.</p>
<pre>
chrome.experimental.fontSettings.setFont(
- { genericFamily: 'sansserif', script: 'Jpan', fontName: 'MS PGothic' }
+ { genericFamily: 'sansserif', script: 'Jpan', fontId: 'MS PGothic' }
);
</pre>
diff --git a/chrome/test/data/extensions/api_test/font_settings/incognito/launch.js b/chrome/test/data/extensions/api_test/font_settings/incognito/launch.js
index 4c3a04e..96bc8b7 100644
--- a/chrome/test/data/extensions/api_test/font_settings/incognito/launch.js
+++ b/chrome/test/data/extensions/api_test/font_settings/incognito/launch.js
@@ -21,22 +21,22 @@ chrome.test.runTests([
function setPerScriptFont() {
var script = 'Hang';
var genericFamily = 'standard';
- var fontName = 'Verdana';
+ var fontId = 'Verdana';
fs.setFont({
script: script,
genericFamily: genericFamily,
- fontName: fontName
+ fontId: fontId
}, chrome.test.callbackFail(SET_FROM_INCOGNITO_ERROR));
},
function setGlobalFontName() {
var genericFamily = 'sansserif';
- var fontName = 'Tahoma';
+ var fontId = 'Tahoma';
fs.setFont({
genericFamily: genericFamily,
- fontName: fontName
+ fontId: fontId
}, chrome.test.callbackFail(SET_FROM_INCOGNITO_ERROR));
},
@@ -50,12 +50,12 @@ chrome.test.runTests([
function getFontList() {
var message = 'getFontList should return an array of objects with ' +
- 'fontName and localizedName properties.';
+ 'fontId and displayName properties.';
fs.getFontList(chrome.test.callbackPass(function(value) {
chrome.test.assertTrue(value.length > 0,
"Font list is not expected to be empty.");
- chrome.test.assertEq('string', typeof(value[0].fontName), message);
- chrome.test.assertEq('string', typeof(value[0].localizedName), message);
+ chrome.test.assertEq('string', typeof(value[0].fontId), message);
+ chrome.test.assertEq('string', typeof(value[0].displayName), message);
}));
},
@@ -64,7 +64,7 @@ chrome.test.runTests([
script: 'Hang',
genericFamily: 'standard'
}, expect({
- fontName: 'Tahoma',
+ fontId: 'Tahoma',
levelOfControl: CONTROLLABLE_BY_THIS_EXTENSION
}));
},
@@ -73,7 +73,7 @@ chrome.test.runTests([
fs.getFont({
genericFamily: 'sansserif'
}, expect({
- fontName: 'Arial',
+ fontId: 'Arial',
levelOfControl: CONTROLLABLE_BY_THIS_EXTENSION
}));
},
diff --git a/chrome/test/data/extensions/api_test/font_settings/standard/test.js b/chrome/test/data/extensions/api_test/font_settings/standard/test.js
index d4f9a46..bc2502f 100644
--- a/chrome/test/data/extensions/api_test/font_settings/standard/test.js
+++ b/chrome/test/data/extensions/api_test/font_settings/standard/test.js
@@ -21,13 +21,13 @@ chrome.test.runTests([
function setPerScriptFont() {
var script = 'Hang';
var genericFamily = 'standard';
- var fontName = 'Verdana';
+ var fontId = 'Verdana';
chrome.test.listenOnce(fs.onFontChanged, function(details) {
chrome.test.assertEq({
script: script,
genericFamily: genericFamily,
- fontName: fontName,
+ fontId: fontId,
levelOfControl: CONTROLLED_BY_THIS_EXTENSION
}, details);
});
@@ -35,7 +35,7 @@ chrome.test.runTests([
fs.setFont({
script: script,
genericFamily: genericFamily,
- fontName: fontName
+ fontId: fontId
}, chrome.test.callbackPass());
},
@@ -43,12 +43,12 @@ chrome.test.runTests([
// the system. See crbug.com/122303
function setGlobalFontName() {
var genericFamily = 'sansserif';
- var fontName = 'Tahoma';
+ var fontId = 'Tahoma';
chrome.test.listenOnce(fs.onFontChanged, function(details) {
chrome.test.assertEq({
genericFamily: genericFamily,
- fontName: fontName,
+ fontId: fontId,
script: 'Zyyy',
levelOfControl: CONTROLLED_BY_THIS_EXTENSION
}, details);
@@ -56,7 +56,7 @@ chrome.test.runTests([
fs.setFont({
genericFamily: genericFamily,
- fontName: fontName
+ fontId: fontId
}, chrome.test.callbackPass());
},
@@ -104,12 +104,12 @@ chrome.test.runTests([
function getFontList() {
var message = 'getFontList should return an array of objects with ' +
- 'fontName and localizedName properties.';
+ 'fontId and displayName properties.';
fs.getFontList(chrome.test.callbackPass(function(value) {
chrome.test.assertTrue(value.length > 0,
'Font list is not expected to be empty.');
- chrome.test.assertEq('string', typeof(value[0].fontName), message);
- chrome.test.assertEq('string', typeof(value[0].localizedName), message);
+ chrome.test.assertEq('string', typeof(value[0].fontId), message);
+ chrome.test.assertEq('string', typeof(value[0].displayName), message);
}));
},
@@ -118,7 +118,7 @@ chrome.test.runTests([
script: 'Hang',
genericFamily: 'standard'
}, expect({
- fontName: 'Verdana',
+ fontId: 'Verdana',
levelOfControl: CONTROLLED_BY_THIS_EXTENSION
}));
},
@@ -127,7 +127,7 @@ chrome.test.runTests([
fs.getFont({
genericFamily: 'sansserif'
}, expect({
- fontName: 'Tahoma',
+ fontId: 'Tahoma',
levelOfControl: CONTROLLED_BY_THIS_EXTENSION
}));
},
@@ -165,13 +165,13 @@ chrome.test.runTests([
function clearPerScriptFont() {
var script = 'Hang';
var genericFamily = 'standard';
- var fontName = 'Tahoma';
+ var fontId = 'Tahoma';
chrome.test.listenOnce(fs.onFontChanged, function(details) {
chrome.test.assertEq({
script: script,
genericFamily: genericFamily,
- fontName: fontName,
+ fontId: fontId,
levelOfControl: CONTROLLABLE_BY_THIS_EXTENSION
}, details);
});
@@ -187,13 +187,13 @@ chrome.test.runTests([
function clearGlobalFont() {
var script = 'Zyyy';
var genericFamily = 'sansserif';
- var fontName = 'Arial';
+ var fontId = 'Arial';
chrome.test.listenOnce(fs.onFontChanged, function(details) {
chrome.test.assertEq({
script: script,
genericFamily: genericFamily,
- fontName: fontName,
+ fontId: fontId,
levelOfControl: CONTROLLABLE_BY_THIS_EXTENSION
}, details);
});