// skia/public/mojom/surface_origin.mojom.js is auto generated by mojom_bindings_generator.py, do not edit

// Copyright 2014 The Chromium Authors
// 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 = 'skia/public/mojom/surface_origin.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('skia.mojom');


  var SurfaceOrigin = {};
  SurfaceOrigin.kTopLeft = 0;
  SurfaceOrigin.kBottomLeft = 1;
  SurfaceOrigin.MIN_VALUE = 0;
  SurfaceOrigin.MAX_VALUE = 1;

  SurfaceOrigin.isKnownEnumValue = function(value) {
    switch (value) {
    case 0:
    case 1:
      return true;
    }
    return false;
  };

  SurfaceOrigin.toKnownEnumValue = function(value) {
    return value;
  };

  SurfaceOrigin.validate = function(enumValue) {
    const isExtensible = false;
    if (isExtensible || this.isKnownEnumValue(enumValue))
      return validator.validationError.NONE;

    return validator.validationError.UNKNOWN_ENUM_VALUE;
  };

  exports.SurfaceOrigin = SurfaceOrigin;
})();