summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-18 21:00:59 +0000
committerestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-18 21:00:59 +0000
commite0ec52a6740850ff0c7e946667c2782f2c925550 (patch)
tree4e3b4a06021c86e5f64a95b207eeb60842020542
parente022553060b02008791165078516c529859b762f (diff)
downloadchromium_src-e0ec52a6740850ff0c7e946667c2782f2c925550.zip
chromium_src-e0ec52a6740850ff0c7e946667c2782f2c925550.tar.gz
chromium_src-e0ec52a6740850ff0c7e946667c2782f2c925550.tar.bz2
redo r137692 and r137791 which were speculatively reverted
but turned out not to be causing breakage (although the former had caused some failures, the latter fixed it). convert chromeos file manager to loadTimeData BUG=122753 TEST=manual,unit change type of fileBrowserApi.getStrings it can get things that aren't necessarily strings. It's a dictionary of all types. BUG=none TEST=SelectFileDialogExtensionBrowserTest.OpenSingletonTabAndCancel and others on chromiumOS dbg Review URL: https://chromiumcodereview.appspot.com/10413011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@137956 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/chromeos/extensions/file_browser_private_api.cc12
-rw-r--r--chrome/browser/resources/file_manager/js/file_manager.js29
-rw-r--r--chrome/browser/resources/file_manager/js/main_scripts.js4
-rw-r--r--chrome/browser/resources/file_manager/js/mock_chrome.js4
-rw-r--r--chrome/browser/resources/file_manager/main.html4
-rw-r--r--chrome/common/extensions/api/file_browser_private.json8
-rw-r--r--chrome/common/extensions/docs/api_index.html2
-rw-r--r--chrome/common/extensions/docs/examples/api/processes/process_monitor.zipbin5556 -> 6520 bytes
-rw-r--r--chrome/common/extensions/docs/experimental.downloads.html20
-rw-r--r--chrome/common/extensions/docs/experimental.html1
-rw-r--r--chrome/common/extensions/docs/experimental.processes.html136
-rw-r--r--chrome/common/extensions/docs/samples.html36
-rw-r--r--chrome/common/extensions/docs/samples.json24
13 files changed, 113 insertions, 167 deletions
diff --git a/chrome/browser/chromeos/extensions/file_browser_private_api.cc b/chrome/browser/chromeos/extensions/file_browser_private_api.cc
index c4d13e1..825bc69 100644
--- a/chrome/browser/chromeos/extensions/file_browser_private_api.cc
+++ b/chrome/browser/chromeos/extensions/file_browser_private_api.cc
@@ -1523,17 +1523,17 @@ bool FileDialogStringsFunction::RunImpl() {
SET_STRING(IDS_FILE_BROWSER, THUMBNAIL_VIEW_TOOLTIP);
#undef SET_STRING
- dict->SetString("PDF_VIEW_ENABLED",
- file_manager_util::ShouldBeOpenedWithPdfPlugin(profile(), ".pdf") ?
- "true" : "false");
+ dict->SetBoolean("PDF_VIEW_ENABLED",
+ file_manager_util::ShouldBeOpenedWithPdfPlugin(profile(), ".pdf"));
ChromeURLDataManager::DataSource::SetFontAndTextDirection(dict);
- if (gdata::util::IsGDataAvailable(profile()))
- dict->SetString("ENABLE_GDATA", "1");
+ dict->SetBoolean("ENABLE_GDATA", gdata::util::IsGDataAvailable(profile()));
#if defined(USE_ASH)
- dict->SetString("ASH", "1");
+ dict->SetBoolean("ASH", true);
+#else
+ dict->SetBoolean("ASH", false);
#endif
return true;
diff --git a/chrome/browser/resources/file_manager/js/file_manager.js b/chrome/browser/resources/file_manager/js/file_manager.js
index 89230a2..0f42826 100644
--- a/chrome/browser/resources/file_manager/js/file_manager.js
+++ b/chrome/browser/resources/file_manager/js/file_manager.js
@@ -121,11 +121,6 @@ FileManager.prototype = {
var MINIMUM_BUTTER_DISPLAY_TIME_MS = 1300;
/**
- * Translated strings.
- */
- var localStrings;
-
- /**
* Item for the Grid View.
* @constructor
*/
@@ -156,27 +151,27 @@ FileManager.prototype = {
* Return a translated string.
*
* Wrapper function to make dealing with translated strings more concise.
- * Equivilant to localStrings.getString(id).
+ * Equivalent to loadTimeData.getString(id).
*
* @param {string} id The id of the string to return.
* @return {string} The translated string.
*/
function str(id) {
- return localStrings.getString(id) || ('UNLOCALIZED STRING ' + id);
+ return loadTimeData.getString(id);
}
/**
* Return a translated string with arguments replaced.
*
* Wrapper function to make dealing with translated strings more concise.
- * Equivilant to localStrings.getStringF(id, ...).
+ * Equivilant to loadTimeData.getStringF(id, ...).
*
* @param {string} id The id of the string to return.
* @param {...string} The values to replace into the string.
* @return {string} The translated string with replaced values.
*/
function strf(id, var_args) {
- return localStrings.getStringF.apply(localStrings, arguments);
+ return loadTimeData.getStringF.apply(loadTimeData, arguments);
}
/**
@@ -192,8 +187,8 @@ FileManager.prototype = {
break;
}
}
- return localStrings.getString('FILE_ERROR_' + code) ||
- localStrings.getStringF('FILE_ERROR_GENERIC', code);
+ return loadTimeData.getString('FILE_ERROR_' + code) ||
+ loadTimeData.getStringF('FILE_ERROR_GENERIC', code);
}
/**
@@ -274,7 +269,7 @@ FileManager.prototype = {
*/
FileManager.initStrings = function(callback) {
chrome.fileBrowserPrivate.getStrings(function(strings) {
- localStrings = new LocalStrings(strings);
+ loadTimeData.data = strings;
if (callback)
callback();
});
@@ -611,7 +606,7 @@ FileManager.prototype = {
this.dialogDom_.ownerDocument.defaultView.addEventListener(
'resize', this.onResize_.bind(this));
- if (str('ASH') == '1')
+ if (loadTimeData.getBoolean('ASH'))
this.dialogDom_.setAttribute('ash', 'true');
this.filePopup_ = null;
@@ -620,7 +615,7 @@ FileManager.prototype = {
'input', this.onSearchBoxUpdate_.bind(this));
// Populate the static localized strings.
- i18nTemplate.process(this.document_, localStrings.templateData);
+ i18nTemplate.process(this.document_, loadTimeData);
};
/**
@@ -2470,7 +2465,9 @@ FileManager.prototype = {
task.title = str('ACTION_OPEN');
} else if (task_parts[1] == 'view-pdf') {
// Do not render this task if disabled.
- if (str('PDF_VIEW_ENABLED') == 'false') continue;
+ if (!loadTimeData.getBoolean('PDF_VIEW_ENABLED'))
+ continue;
+
task.iconUrl =
chrome.extension.getURL('images/filetype_pdf.png');
task.title = str('ACTION_VIEW');
@@ -2644,7 +2641,7 @@ FileManager.prototype = {
FileManager.prototype.getGDataPreferences_ = function() {
return this.gdataPreferences_ ||
- { driveEnabled: str('ENABLE_GDATA') == '1' };
+ { driveEnabled: loadTimeData.getBoolean('ENABLE_GDATA') };
};
FileManager.prototype.getNetworkConnectionState_ = function() {
diff --git a/chrome/browser/resources/file_manager/js/main_scripts.js b/chrome/browser/resources/file_manager/js/main_scripts.js
index 65a3300..fe85e94 100644
--- a/chrome/browser/resources/file_manager/js/main_scripts.js
+++ b/chrome/browser/resources/file_manager/js/main_scripts.js
@@ -12,9 +12,9 @@
// //so we want to parse it as early as possible.
//<include src="metrics.js"/>
//
-//<include src="../../shared/js/local_strings.js"/>
+//<include src="../../shared/js/load_time_data.js"/>
//<include src="../../shared/js/util.js"/>
-//<include src="../../shared/js/i18n_template.js"/>
+//<include src="../../shared/js/i18n_template_no_process.js"/>
//
//<include src="../../shared/js/cr.js"/>
//<include src="../../shared/js/event_tracker.js"/>
diff --git a/chrome/browser/resources/file_manager/js/mock_chrome.js b/chrome/browser/resources/file_manager/js/mock_chrome.js
index 04f93e7..0de888e 100644
--- a/chrome/browser/resources/file_manager/js/mock_chrome.js
+++ b/chrome/browser/resources/file_manager/js/mock_chrome.js
@@ -409,8 +409,8 @@ chrome.fileBrowserPrivate = {
FILE_IS_DIRECTORY: 'Folder',
GDATA_DIRECTORY_LABEL: 'Google Drive',
- ENABLE_GDATA: '1',
- PDF_VIEW_ENABLED: 'true',
+ ENABLE_GDATA: true,
+ PDF_VIEW_ENABLED: true,
ROOT_DIRECTORY_LABEL: 'Files',
DOWNLOADS_DIRECTORY_LABEL: 'Downloads',
diff --git a/chrome/browser/resources/file_manager/main.html b/chrome/browser/resources/file_manager/main.html
index 469b726..4e1e94c 100644
--- a/chrome/browser/resources/file_manager/main.html
+++ b/chrome/browser/resources/file_manager/main.html
@@ -30,9 +30,9 @@
so we want to parse it as early as possible -->
<script src="js/metrics.js"></script>
- <script src="../shared/js/local_strings.js"></script>
+ <script src="../shared/js/load_time_data.js"></script>
<script src="../shared/js/util.js"></script>
- <script src="../shared/js/i18n_template.js"></script>
+ <script src="../shared/js/i18n_template_no_process.js"></script>
<script src="../shared/js/cr.js"></script>
<script src="../shared/js/event_tracker.js"></script>
diff --git a/chrome/common/extensions/api/file_browser_private.json b/chrome/common/extensions/api/file_browser_private.json
index 7aaae03a9..4e90de1 100644
--- a/chrome/common/extensions/api/file_browser_private.json
+++ b/chrome/common/extensions/api/file_browser_private.json
@@ -414,16 +414,16 @@
{
"name": "getStrings",
"type": "function",
- "description": "Gets Strings.",
+ "description": "Gets localized strings and initialization data.",
"parameters": [
{
"type": "function",
- "name": "callback",
- "parameters": [
+ "name": "callback",
+ "parameters": [
{
"name": "result",
"type": "object",
- "additionalProperties": {"type": "string"}
+ "additionalProperties": { "type": "any" }
}
]
}
diff --git a/chrome/common/extensions/docs/api_index.html b/chrome/common/extensions/docs/api_index.html
index 5e6da5b..e1e3172 100644
--- a/chrome/common/extensions/docs/api_index.html
+++ b/chrome/common/extensions/docs/api_index.html
@@ -221,7 +221,7 @@ so that extensions can interact with the browser.
Here are the supported chrome.* APIs:
</p>
<ul>
- <li><a href="alarms.html" js="">alarms</a></li><li><a href="bookmarks.html" js="">bookmarks</a></li><li><a href="browserAction.html" js="">browserAction</a></li><li><a href="browsingData.html" js="">browsingData</a></li><li><a href="contentSettings.html" js="">contentSettings</a></li><li><a href="contextMenus.html" js="">contextMenus</a></li><li><a href="cookies.html" js="">cookies</a></li><li><a href="debugger.html" js="">debugger</a></li><li><a href="declarative.html" js="">declarative</a></li><li><a href="declarativeWebRequest.html" js="">declarativeWebRequest</a></li><li><a href="extension.html" js="">extension</a></li><li><a href="fileBrowserHandler.html" js="">fileBrowserHandler</a></li><li><a href="history.html" js="">history</a></li><li><a href="i18n.html" js="">i18n</a></li><li><a href="idle.html" js="">idle</a></li><li><a href="management.html" js="">management</a></li><li><a href="omnibox.html" js="">omnibox</a></li><li><a href="pageAction.html" js="">pageAction</a></li><li><a href="pageCapture.html" js="">pageCapture</a></li><li><a href="permissions.html" js="">permissions</a></li><li><a href="privacy.html" js="">privacy</a></li><li><a href="proxy.html" js="">proxy</a></li><li><a href="runtime.html" js="">runtime</a></li><li><a href="storage.html" js="">storage</a></li><li><a href="tabs.html" js="">tabs</a></li><li><a href="topSites.html" js="">topSites</a></li><li><a href="tts.html" js="">tts</a></li><li><a href="ttsEngine.html" js="">ttsEngine</a></li><li><a href="types.html" js="">types</a></li><li><a href="webNavigation.html" js="">webNavigation</a></li><li><a href="webRequest.html" js="">webRequest</a></li><li><a href="webstore.html" js="">webstore</a></li><li><a href="windows.html" js="">windows</a></li>
+ <li><a href="alarms.html" js="">alarms</a></li><li><a href="bookmarks.html" js="">bookmarks</a></li><li><a href="browserAction.html" js="">browserAction</a></li><li><a href="browsingData.html" js="">browsingData</a></li><li><a href="contentSettings.html" js="">contentSettings</a></li><li><a href="contextMenus.html" js="">contextMenus</a></li><li><a href="cookies.html" js="">cookies</a></li><li><a href="debugger.html" js="">debugger</a></li><li><a href="declarativeWebRequest.html" js="">declarativeWebRequest</a></li><li><a href="events.html" js="">events</a></li><li><a href="extension.html" js="">extension</a></li><li><a href="fileBrowserHandler.html" js="">fileBrowserHandler</a></li><li><a href="history.html" js="">history</a></li><li><a href="i18n.html" js="">i18n</a></li><li><a href="idle.html" js="">idle</a></li><li><a href="management.html" js="">management</a></li><li><a href="omnibox.html" js="">omnibox</a></li><li><a href="pageAction.html" js="">pageAction</a></li><li><a href="pageCapture.html" js="">pageCapture</a></li><li><a href="permissions.html" js="">permissions</a></li><li><a href="privacy.html" js="">privacy</a></li><li><a href="proxy.html" js="">proxy</a></li><li><a href="runtime.html" js="">runtime</a></li><li><a href="storage.html" js="">storage</a></li><li><a href="tabs.html" js="">tabs</a></li><li><a href="topSites.html" js="">topSites</a></li><li><a href="tts.html" js="">tts</a></li><li><a href="ttsEngine.html" js="">ttsEngine</a></li><li><a href="types.html" js="">types</a></li><li><a href="webNavigation.html" js="">webNavigation</a></li><li><a href="webRequest.html" js="">webRequest</a></li><li><a href="webstore.html" js="">webstore</a></li><li><a href="windows.html" js="">windows</a></li>
</ul>
<h2 id="experimental">Experimental APIs</h2>
<p>
diff --git a/chrome/common/extensions/docs/examples/api/processes/process_monitor.zip b/chrome/common/extensions/docs/examples/api/processes/process_monitor.zip
index c1296c8..256c414 100644
--- a/chrome/common/extensions/docs/examples/api/processes/process_monitor.zip
+++ b/chrome/common/extensions/docs/examples/api/processes/process_monitor.zip
Binary files differ
diff --git a/chrome/common/extensions/docs/experimental.downloads.html b/chrome/common/extensions/docs/experimental.downloads.html
index a1706c6..32eaf52 100644
--- a/chrome/common/extensions/docs/experimental.downloads.html
+++ b/chrome/common/extensions/docs/experimental.downloads.html
@@ -256,7 +256,7 @@ URLs to be downloaded. For example:</p>
]
}</pre>
<p>If the URL’s hostname is not specified in the permissions, then
-<a href='extension.html#property-lastError'>chrome.extension.lastError</a>
+<a href="extension.html#property-lastError">chrome.extension.lastError</a>
will indicate that the extension does not have permission to access that
hostname. <a href="#properties">downloads.ERROR_*</a> are some of the errors
that may be returned.</p>
@@ -344,23 +344,7 @@ directory. For other examples and for help in viewing the source code, see
<var><span>options</span></var></span><span class="optional"><span>, </span><span>function</span>
<var><span>callback</span></var></span>)</div>
<div class="description">
- <p>Download a URL. If the URL uses the HTTP[S] protocol, then
- the request will include all cookies currently set for its
- hostname. If both <code>filename</code> and <code>saveAs</code>
- are specified, then the Save As dialog will be displayed,
- pre-populated with the specified <code>filename</code>. If the
- download started successfully, <code>callback</code> will be
- called with the new DownloadItem’s <code>downloadId</code>. If
- there was an error starting the download, then
- <code>callback</code> will be called with
- <code>downloadId=undefined</code> and
- <a href='extension.html#property-lastError'>chrome.extension.lastError</a>
- will be set to either one of the <code>ERROR_*</code> constants
- defined above or another descriptive string. The error strings
- are not guaranteed to remain backwards compatible between
- releases. You must not parse it, though you may compare it to
- one of the ERROR_* constants defined above and conditionalize on
- that comparison.</p>
+ <p>Download a URL. If the URL uses the HTTP[S] protocol, then the request will include all cookies currently set for its hostname. If both <code>filename</code> and <code>saveAs</code> are specified, then the Save As dialog will be displayed, pre-populated with the specified <code>filename</code>. If the download started successfully, <code>callback</code> will be called with the new DownloadItem’s <code>downloadId</code>. If there was an error starting the download, then <code>callback</code> will be called with <code>downloadId=undefined</code> and <a href="extension.html#property-lastError">chrome.extension.lastError</a> will be set to either one of the <code>ERROR_*</code> constants defined above or another descriptive string. The error strings are not guaranteed to remain backwards compatible between releases. You must not parse it, though you may compare it to one of the ERROR_* constants defined above and conditionalize on that comparison.</p>
<!-- PARAMETERS -->
<h4>Parameters</h4>
<dl>
diff --git a/chrome/common/extensions/docs/experimental.html b/chrome/common/extensions/docs/experimental.html
index e3c2e7b..0e9618b 100644
--- a/chrome/common/extensions/docs/experimental.html
+++ b/chrome/common/extensions/docs/experimental.html
@@ -248,6 +248,7 @@ on the following experimental APIs:
<a href="experimental.keybinding.html">experimental.keybinding</a></li><li>
<a href="experimental.mediaGalleries.html">experimental.mediaGalleries</a></li><li>
<a href="experimental.offscreenTabs.html">experimental.offscreenTabs</a></li><li>
+ <a href="experimental.processes.html">experimental.processes</a></li><li>
<a href="experimental.speechInput.html">experimental.speechInput</a></li>
</ul>
<p>
diff --git a/chrome/common/extensions/docs/experimental.processes.html b/chrome/common/extensions/docs/experimental.processes.html
index d334cc6..394d3ec 100644
--- a/chrome/common/extensions/docs/experimental.processes.html
+++ b/chrome/common/extensions/docs/experimental.processes.html
@@ -288,9 +288,7 @@
</div>
</em>
</dt>
- <dd class="todo">
- Undocumented.
- </dd>
+ <dd>The ID of the tab for which the renderer process ID is to be returned.</dd>
<!-- OBJECT PROPERTIES -->
<!-- OBJECT METHODS -->
<!-- OBJECT EVENT FIELDS -->
@@ -397,9 +395,7 @@
</div>
</em>
</dt>
- <dd class="todo">
- Undocumented.
- </dd>
+ <dd>The list of process IDs or single process ID for which to return the process information. An empty list indicates all processes are requested.</dd>
<!-- OBJECT PROPERTIES -->
<!-- OBJECT METHODS -->
<!-- OBJECT EVENT FIELDS -->
@@ -422,9 +418,7 @@
</div>
</em>
</dt>
- <dd class="todo">
- Undocumented.
- </dd>
+ <dd>True if detailed memory usage is required. Note, collecting memory usage information incurs extra CPU usage and should only be queried for when needed.</dd>
<!-- OBJECT PROPERTIES -->
<!-- OBJECT METHODS -->
<!-- OBJECT EVENT FIELDS -->
@@ -447,9 +441,7 @@
</div>
</em>
</dt>
- <dd class="todo">
- Undocumented.
- </dd>
+ <dd>Called when the processes information is collected.</dd>
<!-- OBJECT PROPERTIES -->
<!-- OBJECT METHODS -->
<!-- OBJECT EVENT FIELDS -->
@@ -488,9 +480,7 @@
</div>
</em>
</dt>
- <dd class="todo">
- Undocumented.
- </dd>
+ <dd>A dictionary of Process objects for each requested process that is a live child process of the current browser process, indexed by process ID. Metrics requiring aggregation over time will not be populated in each Process object.</dd>
<!-- OBJECT PROPERTIES -->
<!-- OBJECT METHODS -->
<!-- OBJECT EVENT FIELDS -->
@@ -532,9 +522,7 @@
</div>
</em>
</dt>
- <dd class="todo">
- Undocumented.
- </dd>
+ <dd>The ID of the process to be terminated.</dd>
<!-- OBJECT PROPERTIES -->
<!-- OBJECT METHODS -->
<!-- OBJECT EVENT FIELDS -->
@@ -599,7 +587,7 @@
</div>
</em>
</dt>
- <dd>True if the process was successfully killed.</dd>
+ <dd>True if terminating the process was successful, otherwise false.</dd>
<!-- OBJECT PROPERTIES -->
<!-- OBJECT METHODS -->
<!-- OBJECT EVENT FIELDS -->
@@ -623,7 +611,7 @@
<h4>onCreated</h4>
<div class="summary">
<!-- Note: intentionally longer 80 columns -->
- <span class="subdued">chrome.experimental.processes.</span><span>onCreated</span><span class="subdued">.addListener</span>(function(<span>integer processId, Process process</span>) <span class="subdued">{...}</span><span></span>);
+ <span class="subdued">chrome.experimental.processes.</span><span>onCreated</span><span class="subdued">.addListener</span>(function(<span>Process process</span>) <span class="subdued">{...}</span><span></span>);
</div>
<div class="description">
<p>Fired each time a process is created, providing the corrseponding Process object.</p>
@@ -634,31 +622,6 @@
<div>
<div>
<dt>
- <var>processId</var>
- <em>
- <!-- TYPE -->
- <div style="display:inline">
- (
- <span id="typeTemplate">
- <span>
- <span>integer</span>
- </span>
- </span>
- )
- </div>
- </em>
- </dt>
- <dd class="todo">
- Undocumented.
- </dd>
- <!-- OBJECT PROPERTIES -->
- <!-- OBJECT METHODS -->
- <!-- OBJECT EVENT FIELDS -->
- <!-- FUNCTION PARAMETERS -->
- </div>
- </div><div>
- <div>
- <dt>
<var>process</var>
<em>
<!-- TYPE -->
@@ -673,9 +636,7 @@
</div>
</em>
</dt>
- <dd class="todo">
- Undocumented.
- </dd>
+ <dd>Details of the process that was created. Metrics requiring aggregation over time will not be populated in the object.</dd>
<!-- OBJECT PROPERTIES -->
<!-- OBJECT METHODS -->
<!-- OBJECT EVENT FIELDS -->
@@ -689,6 +650,7 @@
<dl>
</dl>
</div> <!-- /description -->
+ <!-- /description -->
</div><div class="apiItem">
<a name="event-onExited"></a>
<h4>onExited</h4>
@@ -719,9 +681,7 @@
</div>
</em>
</dt>
- <dd class="todo">
- Undocumented.
- </dd>
+ <dd>The ID of the process that exited.</dd>
<!-- OBJECT PROPERTIES -->
<!-- OBJECT METHODS -->
<!-- OBJECT EVENT FIELDS -->
@@ -744,9 +704,7 @@
</div>
</em>
</dt>
- <dd class="todo">
- Undocumented.
- </dd>
+ <dd>The type of exit that occurred for the process - normal, abnormal, killed, crashed. Only available for renderer processes.</dd>
<!-- OBJECT PROPERTIES -->
<!-- OBJECT METHODS -->
<!-- OBJECT EVENT FIELDS -->
@@ -769,9 +727,7 @@
</div>
</em>
</dt>
- <dd class="todo">
- Undocumented.
- </dd>
+ <dd>The exit code if the process exited abnormally. Only available for renderer processes.</dd>
<!-- OBJECT PROPERTIES -->
<!-- OBJECT METHODS -->
<!-- OBJECT EVENT FIELDS -->
@@ -785,6 +741,7 @@
<dl>
</dl>
</div> <!-- /description -->
+ <!-- /description -->
</div><div class="apiItem">
<a name="event-onUnresponsive"></a>
<h4>onUnresponsive</h4>
@@ -815,9 +772,7 @@
</div>
</em>
</dt>
- <dd class="todo">
- Undocumented.
- </dd>
+ <dd>Details of the unresponsive process. Metrics requiring aggregation over time will not be populated in the object. Only available for renderer processes.</dd>
<!-- OBJECT PROPERTIES -->
<!-- OBJECT METHODS -->
<!-- OBJECT EVENT FIELDS -->
@@ -831,6 +786,7 @@
<dl>
</dl>
</div> <!-- /description -->
+ <!-- /description -->
</div><div class="apiItem">
<a name="event-onUpdated"></a>
<h4>onUpdated</h4>
@@ -861,9 +817,7 @@
</div>
</em>
</dt>
- <dd class="todo">
- Undocumented.
- </dd>
+ <dd>A dictionary of updated Process objects for each live process in the browser, indexed by process ID. Metrics requiring aggregation over time will be populated in each Process object.</dd>
<!-- OBJECT PROPERTIES -->
<!-- OBJECT METHODS -->
<!-- OBJECT EVENT FIELDS -->
@@ -877,6 +831,7 @@
<dl>
</dl>
</div> <!-- /description -->
+ <!-- /description -->
</div><div class="apiItem">
<a name="event-onUpdatedWithMemory"></a>
<h4>onUpdatedWithMemory</h4>
@@ -907,9 +862,7 @@
</div>
</em>
</dt>
- <dd class="todo">
- Undocumented.
- </dd>
+ <dd>A dictionary of updated Process objects for each live process in the browser, indexed by process ID. Memory usage details will be included in each Process object.</dd>
<!-- OBJECT PROPERTIES -->
<!-- OBJECT METHODS -->
<!-- OBJECT EVENT FIELDS -->
@@ -923,6 +876,7 @@
<dl>
</dl>
</div> <!-- /description -->
+ <!-- /description -->
</div> <!-- /apiItem -->
</div> <!-- /apiGroup -->
<!-- TYPES -->
@@ -969,7 +923,7 @@
</div>
</em>
</dt>
- <dd>Unique ID of the process provided by Chrome.</dd>
+ <dd>Unique ID of the process provided by the browser.</dd>
<!-- OBJECT PROPERTIES -->
<!-- OBJECT METHODS -->
<!-- OBJECT EVENT FIELDS -->
@@ -1069,7 +1023,7 @@
</div>
</em>
</dt>
- <dd>Array of Tab IDs that have a page rendered by this process (for renderer processes only).</dd>
+ <dd>Array of Tab IDs that have a page rendered by this process. The list will be non-empty for renderer processes only.</dd>
<!-- OBJECT PROPERTIES -->
<!-- OBJECT METHODS -->
<!-- OBJECT EVENT FIELDS -->
@@ -1093,7 +1047,7 @@
</div>
</em>
</dt>
- <dd>The most recent measurement of the process CPU usage, between 0 and 100%.</dd>
+ <dd>The most recent measurement of the process CPU usage, between 0 and 100%. Only available when receiving the object as part of a callback from onUpdated or onUpdatedWithMemory.</dd>
<!-- OBJECT PROPERTIES -->
<!-- OBJECT METHODS -->
<!-- OBJECT EVENT FIELDS -->
@@ -1117,7 +1071,7 @@
</div>
</em>
</dt>
- <dd>The most recent measurement of the process network usage, in bytes per second.</dd>
+ <dd>The most recent measurement of the process network usage, in bytes per second. Only available when receiving the object as part of a callback from onUpdated or onUpdatedWithMemory.</dd>
<!-- OBJECT PROPERTIES -->
<!-- OBJECT METHODS -->
<!-- OBJECT EVENT FIELDS -->
@@ -1141,31 +1095,7 @@
</div>
</em>
</dt>
- <dd>The most recent measurement of the process private memory usage, in bytes.</dd>
- <!-- OBJECT PROPERTIES -->
- <!-- OBJECT METHODS -->
- <!-- OBJECT EVENT FIELDS -->
- <!-- FUNCTION PARAMETERS -->
- </div>
- </div><div>
- <div>
- <dt>
- <var>memoryUsage</var>
- <em>
- <!-- TYPE -->
- <div style="display:inline">
- (
- <span class="optional">optional</span>
- <span id="typeTemplate">
- <span>
- <a>MemoryUsage</a>
- </span>
- </span>
- )
- </div>
- </em>
- </dt>
- <dd>Object containing the most recent details about process memory usage, in bytes.</dd>
+ <dd>The most recent measurement of the process private memory usage, in bytes. Only available when receiving the object as part of a callback from onUpdatedWithMemory or getProcessInfo with the includeMemory flag.</dd>
<!-- OBJECT PROPERTIES -->
<!-- OBJECT METHODS -->
<!-- OBJECT EVENT FIELDS -->
@@ -1189,7 +1119,7 @@
</div>
</em>
</dt>
- <dd>The most recent measurement of the process JavaScript allocated memory, in bytes.</dd>
+ <dd>The most recent measurement of the process JavaScript allocated memory, in bytes. Only available when receiving the object as part of a callback from onUpdated or onUpdatedWithMemory.</dd>
<!-- OBJECT PROPERTIES -->
<!-- OBJECT METHODS -->
<!-- OBJECT EVENT FIELDS -->
@@ -1213,7 +1143,7 @@
</div>
</em>
</dt>
- <dd>The most recent measurement of the process JavaScript memory used, in bytes.</dd>
+ <dd>The most recent measurement of the process JavaScript memory used, in bytes. Only available when receiving the object as part of a callback from onUpdated or onUpdatedWithMemory.</dd>
<!-- OBJECT PROPERTIES -->
<!-- OBJECT METHODS -->
<!-- OBJECT EVENT FIELDS -->
@@ -1237,7 +1167,7 @@
</div>
</em>
</dt>
- <dd>The most recent measurement of the process’s SQLite memory usage, in bytes.</dd>
+ <dd>The most recent measurement of the process’s SQLite memory usage, in bytes. Only available when receiving the object as part of a callback from onUpdated or onUpdatedWithMemory.</dd>
<!-- OBJECT PROPERTIES -->
<!-- OBJECT METHODS -->
<!-- OBJECT EVENT FIELDS -->
@@ -1261,7 +1191,7 @@
</div>
</em>
</dt>
- <dd>The most recent measurement of the process frames per second.</dd>
+ <dd>The most recent measurement of the process frames per second. Only available when receiving the object as part of a callback from onUpdated or onUpdatedWithMemory.</dd>
<!-- OBJECT PROPERTIES -->
<!-- OBJECT METHODS -->
<!-- OBJECT EVENT FIELDS -->
@@ -1285,7 +1215,7 @@
</div>
</em>
</dt>
- <dd>The most recent information about the image cache for the process.</dd>
+ <dd>The most recent information about the image cache for the process. Only available when receiving the object as part of a callback from onUpdated or onUpdatedWithMemory.</dd>
<!-- OBJECT PROPERTIES -->
<!-- OBJECT METHODS -->
<!-- OBJECT EVENT FIELDS -->
@@ -1309,7 +1239,7 @@
</div>
</em>
</dt>
- <dd>The most recent information about the script cache for the process.</dd>
+ <dd>The most recent information about the script cache for the process. Only available when receiving the object as part of a callback from onUpdated or onUpdatedWithMemory.</dd>
<!-- OBJECT PROPERTIES -->
<!-- OBJECT METHODS -->
<!-- OBJECT EVENT FIELDS -->
@@ -1333,7 +1263,7 @@
</div>
</em>
</dt>
- <dd>The most recent information about the CSS cache for the process.</dd>
+ <dd>The most recent information about the CSS cache for the process. Only available when receiving the object as part of a callback from onUpdated or onUpdatedWithMemory.</dd>
<!-- OBJECT PROPERTIES -->
<!-- OBJECT METHODS -->
<!-- OBJECT EVENT FIELDS -->
@@ -1364,7 +1294,7 @@
</div>
</em>
</dt>
- <dd>The Cache object contains information about the size and utilization of a cache used by Chromium.</dd>
+ <dd>The Cache object contains information about the size and utilization of a cache used by the browser.</dd>
<!-- OBJECT PROPERTIES -->
<dd>
<dl>
diff --git a/chrome/common/extensions/docs/samples.html b/chrome/common/extensions/docs/samples.html
index a819103..2ebbf52 100644
--- a/chrome/common/extensions/docs/samples.html
+++ b/chrome/common/extensions/docs/samples.html
@@ -247,7 +247,7 @@
"579b7b1b54553eb5f2e8e7d2bf21bd61c855952e": "PAGE CYCLER PAGE CYCLER UI EXPERIMENTAL CHROME.EXPERIMENTAL.RECORD.CAPTUREURLS CHROME.EXPERIMENTAL.RECORD.REPLAYURLS",
"ab4b9e00a673701b355db9eb8f9ebf2c850cd784": "PER-PLUGIN CONTENT SETTINGS CUSTOMIZE YOUR CONTENT SETTING FOR DIFFERENT PLUG-INS. CONTENTSETTINGS OPTIONS_PAGE CHROME.I18N.GETMESSAGE",
"e6ae17ab4ccfd7e059c8c01f25760ca5d894c7fd": "PRINT THIS PAGE ADDS A PRINT BUTTON TO THE BROWSER. BACKGROUND_PAGE BROWSER_ACTION TABS CHROME.BROWSERACTION.ONCLICKED CHROME.TABS.UPDATE",
- "beff6ecd9677dea0a7c648c5042165b48bb66f09": "PROCESS MONITOR ADDS A BROWSER ACTION THAT MONITORS RESOURCE USAGE OF ALL BROWSER PROCESSES. BROWSER_ACTION EXPERIMENTAL TABS CHROME.EXPERIMENTAL.PROCESSES.ONUPDATED",
+ "beff6ecd9677dea0a7c648c5042165b48bb66f09": "PROCESS MONITOR ADDS A BROWSER ACTION THAT MONITORS RESOURCE USAGE OF ALL BROWSER PROCESSES. BROWSER_ACTION EXPERIMENTAL TABS CHROME.EXPERIMENTAL.PROCESSES.ONUPDATED CHROME.EXPERIMENTAL.PROCESSES.ONUPDATEDWITHMEMORY CHROME.EXPERIMENTAL.PROCESSES.TERMINATE",
"3e8e226d87e431296bb110b4f6eb7eec2ca7a826": "PROXY EXTENSION API SAMPLE SET CHROME-SPECIFIC PROXIES; A DEMONSTRATION OF CHROMES PROXY API BACKGROUND_PAGE BROWSER_ACTION PROXY CHROME.BROWSERACTION.SETBADGEBACKGROUNDCOLOR CHROME.BROWSERACTION.SETBADGETEXT CHROME.BROWSERACTION.SETTITLE CHROME.EXTENSION.ISALLOWEDINCOGNITOACCESS CHROME.I18N.GETMESSAGE CHROME.PROXY.ONPROXYERROR",
"56a8d2ac24ca7bba78fd88ad57f43fc13c784497": "SAMPLE - OAUTH CONTACTS USES OAUTH TO CONNECT TO GOOGLES CONTACTS SERVICE AND DISPLAY A LIST OF YOUR CONTACTS. BACKGROUND_PAGE BROWSER_ACTION TABS CHROME.BROWSERACTION.ONCLICKED CHROME.BROWSERACTION.SETICON CHROME.EXTENSION.GETBACKGROUNDPAGE CHROME.EXTENSION.GETURL CHROME.TABS.CREATE CHROME.TABS.GET CHROME.TABS.ONUPDATED CHROME.TABS.REMOVE",
"38f6e1e17756ede38b1364c7114a738ca717dcbb": "SANDWICHBAR SHOWS AN INFOBAR ON PAGES WHICH CONTAIN THE WORD SANDWICH BACKGROUND_PAGE EXPERIMENTAL CHROME.EXPERIMENTAL.INFOBARS.SHOW",
@@ -867,6 +867,9 @@
<div>
<a href="examples/extensions/catblock.zip">Download source</a>
<!-- Only show the Install CRX link if a CRX file is provided -->
+ <span>
+ - <a href="examples/extensions/catblock.crx">Install extension</a>
+ </span>
</div>
</div><div class="sample" id="924f75a201bb0ec8d6c0b1c9c88c679ea211c93d">
<img class="icon" src="images/sample-default-icon.png">
@@ -1015,6 +1018,9 @@
<div>
<a href="examples/extensions/buildbot.zip">Download source</a>
<!-- Only show the Install CRX link if a CRX file is provided -->
+ <span>
+ - <a href="examples/extensions/buildbot.crx">Install extension</a>
+ </span>
</div>
</div><div class="sample" id="ac31228200b41a87982e386cc90d3a6eee4ad885">
<img class="icon" src="images/sample-default-icon.png">
@@ -1758,6 +1764,9 @@
<div>
<a href="examples/extensions/gdocs.zip">Download source</a>
<!-- Only show the Install CRX link if a CRX file is provided -->
+ <span>
+ - <a href="examples/extensions/gdocs.crx">Install extension</a>
+ </span>
</div>
</div><div class="sample" id="bb57f7a0132cbeb36ad7e7bb0ab75c21704234ca">
<img class="icon" src="examples/extensions/gmail/icon_128.png">
@@ -2056,6 +2065,9 @@
<div>
<a href="examples/extensions/imageinfo.zip">Download source</a>
<!-- Only show the Install CRX link if a CRX file is provided -->
+ <span>
+ - <a href="examples/extensions/imageinfo.crx">Install extension</a>
+ </span>
</div>
</div><div class="sample" id="8f52a8a59c6fc16cb0d1ed0680b7f005be033d58">
<img class="icon" src="images/sample-default-icon.png">
@@ -2264,6 +2276,9 @@
<div>
<a href="examples/extensions/mappy.zip">Download source</a>
<!-- Only show the Install CRX link if a CRX file is provided -->
+ <span>
+ - <a href="examples/extensions/mappy.crx">Install extension</a>
+ </span>
</div>
</div><div class="sample" id="b2f5f8a790e16f091a7e4e0a39b2d0a6d32e3a6d">
<img class="icon" src="examples/api/windows/merge_windows/merge_windows_128.png">
@@ -2484,6 +2499,9 @@
<div>
<a href="examples/extensions/news_i18n.zip">Download source</a>
<!-- Only show the Install CRX link if a CRX file is provided -->
+ <span>
+ - <a href="examples/extensions/news_i18n.crx">Install extension</a>
+ </span>
</div>
</div><div class="sample" id="3aea027164cb9b732ba4a8c51cb93708891726ef">
<img class="icon" src="examples/extensions/news/images/news_icon.png">
@@ -2822,6 +2840,9 @@
<div>
<a href="examples/extensions/benchmark.zip">Download source</a>
<!-- Only show the Install CRX link if a CRX file is provided -->
+ <span>
+ - <a href="examples/extensions/benchmark.crx">Install extension</a>
+ </span>
</div>
</div><div class="sample" id="579b7b1b54553eb5f2e8e7d2bf21bd61c855952e">
<img class="icon" src="examples/api/record/page_cycler/page_cycler_icon.png">
@@ -3009,6 +3030,10 @@
<ul>
<li>
<code><a href="experimental.processes.html#event-onUpdated">chrome.experimental.processes.onUpdated</a></code>
+ </li><li>
+ <code><a href="experimental.processes.html#event-onUpdatedWithMemory">chrome.experimental.processes.onUpdatedWithMemory</a></code>
+ </li><li>
+ <code><a href="experimental.processes.html#method-terminate">chrome.experimental.processes.terminate</a></code>
</li>
</ul>
</div>
@@ -3314,6 +3339,9 @@
<div>
<a href="examples/extensions/speak_selection.zip">Download source</a>
<!-- Only show the Install CRX link if a CRX file is provided -->
+ <span>
+ - <a href="examples/extensions/speak_selection.crx">Install extension</a>
+ </span>
</div>
</div><div class="sample" id="a942b7626644674b7a56678930d054497b244ee7">
<img class="icon" src="images/sample-default-icon.png">
@@ -3552,6 +3580,9 @@
<div>
<a href="examples/extensions/talking_alarm_clock.zip">Download source</a>
<!-- Only show the Install CRX link if a CRX file is provided -->
+ <span>
+ - <a href="examples/extensions/talking_alarm_clock.crx">Install extension</a>
+ </span>
</div>
</div><div class="sample" id="e1697cacebad05218798bf3e8a0f724517f0e8c3">
<img class="icon" src="images/sample-default-icon.png">
@@ -3697,6 +3728,9 @@
<div>
<a href="examples/extensions/ttsdebug.zip">Download source</a>
<!-- Only show the Install CRX link if a CRX file is provided -->
+ <span>
+ - <a href="examples/extensions/ttsdebug.crx">Install extension</a>
+ </span>
</div>
</div><div class="sample" id="3a1baf15462bdae4d886c2da4ff8f35f4e8ce02f">
<img class="icon" src="examples/extensions/ttsdemo/128.png">
diff --git a/chrome/common/extensions/docs/samples.json b/chrome/common/extensions/docs/samples.json
index 7e7c58c..f7a0ca6 100644
--- a/chrome/common/extensions/docs/samples.json
+++ b/chrome/common/extensions/docs/samples.json
@@ -698,7 +698,7 @@
"api_calls": [
"chrome.webRequest.onBeforeRequest"
],
- "crx_path": null,
+ "crx_path": "examples/extensions/catblock.crx",
"description": "I can't has cheezburger!",
"features": [
"background_page",
@@ -797,7 +797,7 @@
"chrome.browserAction.setTitle",
"chrome.extension.getURL"
],
- "crx_path": null,
+ "crx_path": "examples/extensions/buildbot.crx",
"description": "Displays the status of the Chromium buildbot in the toolbar. Click to see more detailed status in a popup.",
"features": [
"background_page",
@@ -1293,7 +1293,7 @@
"chrome.tabs.onUpdated",
"chrome.tabs.remove"
],
- "crx_path": null,
+ "crx_path": "examples/extensions/gdocs.crx",
"description": "Demonstrates how to use OAuth to connect the Google Documents List Data API.",
"features": [
"background_page",
@@ -1492,7 +1492,7 @@
"chrome.windows.create",
"chrome.windows.update"
],
- "crx_path": null,
+ "crx_path": "examples/extensions/imageinfo.crx",
"description": "Get image info for images, including EXIF data",
"features": [
"background_page",
@@ -1629,7 +1629,7 @@
"chrome.tabs.get",
"chrome.tabs.onUpdated"
],
- "crx_path": null,
+ "crx_path": "examples/extensions/mappy.crx",
"description": "Finds addresses in the web page you're on and pops up a map window.",
"features": [
"background_page",
@@ -1781,7 +1781,7 @@
"chrome.i18n.getMessage",
"chrome.tabs.create"
],
- "crx_path": null,
+ "crx_path": "examples/extensions/news_i18n.crx",
"description": "Displays the first 5 items from the 'Google News - top news' RSS feed in a popup.",
"features": [
"browser_action",
@@ -1993,7 +1993,7 @@
"chrome.windows.get",
"chrome.windows.getCurrent"
],
- "crx_path": null,
+ "crx_path": "examples/extensions/benchmark.crx",
"description": "Chromium Page Benchmarker.",
"features": [
"background_page",
@@ -2166,7 +2166,7 @@
"popup.html",
"popup.js"
],
- "source_hash": "76ebb097aee877b69bf918f94663a2d8cbd50704",
+ "source_hash": "a1f5e8b60d07252da4d1a031cb4d48354a50d3f3",
"zip_path": "examples/api/processes/process_monitor.zip"
},
{
@@ -2326,7 +2326,7 @@
"chrome.windows.get",
"chrome.windows.getAll"
],
- "crx_path": null,
+ "crx_path": "examples/extensions/speak_selection.crx",
"description": "Speaks the current selection out loud.",
"features": [
"<all_urls>",
@@ -2476,7 +2476,7 @@
"chrome.tts.speak",
"chrome.tts.stop"
],
- "crx_path": null,
+ "crx_path": "examples/extensions/talking_alarm_clock.crx",
"description": "A clock with two configurable alarms that will play a sound and speak a phrase of your choice.",
"features": [
"background",
@@ -2575,7 +2575,7 @@
"chrome.tts.speak",
"chrome.tts.stop"
],
- "crx_path": null,
+ "crx_path": "examples/extensions/ttsdebug.crx",
"description": "Tool for developers of Chrome TTS engine extensions to help them test their engines are implementing the API correctly.",
"features": [
"tts"
@@ -2717,4 +2717,4 @@
"zip_path": "examples/api/extension/isAllowedAccess.zip"
}
]
-}
+} \ No newline at end of file