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

Side by Side Diff: chrome/browser/resources/print_preview/settings/advanced_options_settings.js

Issue 540183002: Add search to Print Preview advanced options and enable them in the UI. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 cr.define('print_preview', function() { 5 cr.define('print_preview', function() {
6 'use strict'; 6 'use strict';
7 7
8 /** 8 /**
9 * Print options section to control printer advanced options. 9 * Print options section to control printer advanced options.
10 * @param {!print_preview.DestinationStore} destinationStore Used to determine 10 * @param {!print_preview.DestinationStore} destinationStore Used to determine
(...skipping 23 matching lines...) Expand all
34 __proto__: print_preview.SettingsSection.prototype, 34 __proto__: print_preview.SettingsSection.prototype,
35 35
36 /** @override */ 36 /** @override */
37 isAvailable: function() { 37 isAvailable: function() {
38 var destination = this.destinationStore_.selectedDestination; 38 var destination = this.destinationStore_.selectedDestination;
39 var vendorCapabilities = 39 var vendorCapabilities =
40 destination && 40 destination &&
41 destination.capabilities && 41 destination.capabilities &&
42 destination.capabilities.printer && 42 destination.capabilities.printer &&
43 destination.capabilities.printer.vendor_capability; 43 destination.capabilities.printer.vendor_capability;
44 return false && !!vendorCapabilities; 44 return !!vendorCapabilities;
45 }, 45 },
46 46
47 /** @override */ 47 /** @override */
48 hasCollapsibleContent: function() { 48 hasCollapsibleContent: function() {
49 return this.isAvailable(); 49 return this.isAvailable();
50 }, 50 },
51 51
52 /** @param {boolean} Whether the component is enabled. */ 52 /** @param {boolean} Whether the component is enabled. */
53 set isEnabled(isEnabled) { 53 set isEnabled(isEnabled) {
54 this.getButton_().disabled = !isEnabled; 54 this.getButton_().disabled = !isEnabled;
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 onDestinationChanged_: function() { 89 onDestinationChanged_: function() {
90 this.updateUiStateInternal(); 90 this.updateUiStateInternal();
91 } 91 }
92 }; 92 };
93 93
94 // Export 94 // Export
95 return { 95 return {
96 AdvancedOptionsSettings: AdvancedOptionsSettings 96 AdvancedOptionsSettings: AdvancedOptionsSettings
97 }; 97 };
98 }); 98 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698