/** @override */
isCapabilityAvailable: function() {
var cap = this.getPageOrientationCapability_();
- if (!cap) {
+ if (!cap)
return false;
- }
var hasAutoOrPortraitOption = false;
var hasLandscapeOption = false;
cap.option.forEach(function(option) {
},
/**
+ * @return {boolean} Whether capability contains the |value|.
+ * @param {string} value Option to check.
+ */
+ hasOption: function(value) {
+ var cap = this.getPageOrientationCapability_();
+ if (!cap)
+ return false;
+ return cap.option.some(function(option) {
+ return option.type == value;
+ });
+ },
+
+ /**
* @return {Object} Page orientation capability of the selected destination.
* @private
*/