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

Unified Diff: chrome/browser/resources/local_discovery/local_discovery.js

Issue 284223004: List cloud devices in chrome://devices page. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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/browser/resources/local_discovery/local_discovery.js
diff --git a/chrome/browser/resources/local_discovery/local_discovery.js b/chrome/browser/resources/local_discovery/local_discovery.js
index f5d17b1b52731bab772b0eedd2a1a25606030599..5eee22f10f540788d46e6e33b99530f27258e106 100644
--- a/chrome/browser/resources/local_discovery/local_discovery.js
+++ b/chrome/browser/resources/local_discovery/local_discovery.js
@@ -329,7 +329,10 @@ cr.define('local_discovery', function() {
var description;
if (device.description == '') {
- description = loadTimeData.getString('noDescription');
+ if (device.type == 'printer')
+ description = loadTimeData.getString('noDescriptionPrinter');
+ else
+ description = loadTimeData.getString('noDescriptionDevice');
} else {
description = device.description;
}
@@ -431,15 +434,15 @@ cr.define('local_discovery', function() {
}
/**
- * Request the printer list.
+ * Request the device list.
*/
- function requestPrinterList() {
+ function requestDeviceList() {
if (isUserLoggedIn) {
clearElement($('cloud-devices'));
$('cloud-devices-loading').hidden = false;
$('cloud-devices-unavailable').hidden = true;
- chrome.send('requestPrinterList');
+ chrome.send('requestDeviceList');
}
}
@@ -475,7 +478,7 @@ cr.define('local_discovery', function() {
* Retry loading the devices from Google Cloud Print.
*/
function retryLoadCloudDevices() {
- requestPrinterList();
+ requestDeviceList();
}
/**
@@ -489,7 +492,7 @@ cr.define('local_discovery', function() {
$('register-continue-button').disabled = !isUserLoggedIn;
if (isUserLoggedIn) {
- requestPrinterList();
+ requestDeviceList();
$('register-login-promo').hidden = true;
} else {
$('cloud-devices-loading').hidden = true;
@@ -552,7 +555,7 @@ cr.define('local_discovery', function() {
} else {
$('cloudPrintConnectorSetupButton').onclick = function(event) {
chrome.send('disableCloudPrintConnector');
- requestPrinterList();
+ requestDeviceList();
};
}
}
« no previous file with comments | « chrome/browser/local_discovery/gcd_base_api_flow.cc ('k') | chrome/browser/ui/webui/local_discovery/local_discovery_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698