blob: 81932fbdbfe50c55de6402a354d4a953a81139dc [file] [log] [blame]
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
'use strict';
(function() {
var mojomId = 'third_party/blink/public/mojom/manifest/display_mode.mojom';
if (mojo.internal.isMojomLoaded(mojomId)) {
console.warn('The following mojom is loaded multiple times: ' + mojomId);
return;
}
mojo.internal.markMojomLoaded(mojomId);
var bindings = mojo;
var associatedBindings = mojo;
var codec = mojo.internal;
var validator = mojo.internal;
var exports = mojo.internal.exposeNamespace('blink.mojom');
var DisplayMode = {};
DisplayMode.UNDEFINED = 0;
DisplayMode.BROWSER = DisplayMode.UNDEFINED + 1;
DisplayMode.MINIMAL_UI = DisplayMode.BROWSER + 1;
DisplayMode.STANDALONE = DisplayMode.MINIMAL_UI + 1;
DisplayMode.FULLSCREEN = DisplayMode.STANDALONE + 1;
DisplayMode.MIN_VALUE = 0,
DisplayMode.MAX_VALUE = 4,
DisplayMode.isKnownEnumValue = function(value) {
switch (value) {
case 0:
case 1:
case 2:
case 3:
case 4:
return true;
}
return false;
};
DisplayMode.validate = function(enumValue) {
var isExtensible = false;
if (isExtensible || this.isKnownEnumValue(enumValue))
return validator.validationError.NONE;
return validator.validationError.UNKNOWN_ENUM_VALUE;
};
exports.DisplayMode = DisplayMode;
})();