chromium/tools/json_schema_compiler/test/idl_object_types.idl

// Copyright 2012 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// Tests 'object' types in various places in IDL.

namespace idl_object_types {
  dictionary FooType {
    long x;
    object y;
    [instanceOf=Window]object z;
  };

  dictionary BarType {
    any x;
    any? y;
  };

  dictionary BazType {
    long? x;
    FooType? foo;
  };

  dictionary UnionType {
    (long or FooType)? x;
    (DOMString or object) y;
    ([instanceOf=ImageData]object or long) z;
  };

  dictionary ModifiedUnionType {
    [nodoc] (long or DOMString) x;
  };

  callback SerializableFunction = void();

  dictionary SerializableFunctionObject {
    [serializableFunction]SerializableFunction func;
  };

  interface Functions {
    static void objectFunction1([instanceOf=ImageData]object icon);
    static void objectFunction2(any some_arg);
  };
};