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

Unified Diff: chrome/browser/resources/print_preview/data/app_state.js

Issue 900503002: List printers managed by extensions in print preview (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 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
« no previous file with comments | « no previous file | chrome/browser/resources/print_preview/data/destination.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/print_preview/data/app_state.js
diff --git a/chrome/browser/resources/print_preview/data/app_state.js b/chrome/browser/resources/print_preview/data/app_state.js
index a8ebb063211d45d464fdf8e551720a35aec74ab7..6d90373446b6543063b1d4b735cf759ca27f500d 100644
--- a/chrome/browser/resources/print_preview/data/app_state.js
+++ b/chrome/browser/resources/print_preview/data/app_state.js
@@ -39,6 +39,7 @@ cr.define('print_preview', function() {
SELECTED_DESTINATION_ORIGIN: 'selectedDestinationOrigin',
SELECTED_DESTINATION_CAPABILITIES: 'selectedDestinationCapabilities',
SELECTED_DESTINATION_NAME: 'selectedDestinationName',
+ SELECTED_DESTINATION_EXTENSION_ID: 'selectedDestinationExtensionId',
IS_GCP_PROMO_DISMISSED: 'isGcpPromoDismissed',
DPI: 'dpi',
MEDIA_SIZE: 'mediaSize',
@@ -99,6 +100,13 @@ cr.define('print_preview', function() {
return this.state_[AppState.Field.SELECTED_DESTINATION_NAME];
},
+ /**
+ * @return {?string} Extension ID associated with the selected destination.
+ */
+ get selectedDestinationExtensionId() {
+ return this.state_[AppState.Field.SELECTED_DESTINATION_EXTENSION_ID];
+ },
+
/** @return {boolean} Whether the GCP promotion has been dismissed. */
get isGcpPromoDismissed() {
return this.state_[AppState.Field.IS_GCP_PROMO_DISMISSED];
@@ -193,6 +201,8 @@ cr.define('print_preview', function() {
this.state_[AppState.Field.SELECTED_DESTINATION_CAPABILITIES] =
dest.capabilities;
this.state_[AppState.Field.SELECTED_DESTINATION_NAME] = dest.displayName;
+ this.state_[AppState.Field.SELECTED_DESTINATION_EXTENSION_ID] =
+ dest.extensionId;
this.persist_();
},
« no previous file with comments | « no previous file | chrome/browser/resources/print_preview/data/destination.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698