| Index: third_party/protobuf/ruby/src/main/java/google/ProtobufJavaService.java
|
| diff --git a/third_party/WebKit/Source/bindings/tests/idls/core/TestInterface3.idl b/third_party/protobuf/ruby/src/main/java/google/ProtobufJavaService.java
|
| similarity index 56%
|
| copy from third_party/WebKit/Source/bindings/tests/idls/core/TestInterface3.idl
|
| copy to third_party/protobuf/ruby/src/main/java/google/ProtobufJavaService.java
|
| index de08b5503caace92c4f59c8fbf74ae35bf477071..bffb492a9e27070e7907817f42daad58cf9a3d8f 100644
|
| --- a/third_party/WebKit/Source/bindings/tests/idls/core/TestInterface3.idl
|
| +++ b/third_party/protobuf/ruby/src/main/java/google/ProtobufJavaService.java
|
| @@ -1,5 +1,7 @@
|
| /*
|
| - * Copyright (C) 2013 Google Inc. All rights reserved.
|
| + * Protocol Buffers - Google's data interchange format
|
| + * Copyright 2014 Google Inc. All rights reserved.
|
| + * https://developers.google.com/protocol-buffers/
|
| *
|
| * Redistribution and use in source and binary forms, with or without
|
| * modification, are permitted provided that the following conditions are
|
| @@ -28,27 +30,31 @@
|
| * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
| */
|
|
|
| -// This is for interface extended attributes that interact with another extended
|
| -// attribute, and thus both cannot be tested at once; and for special
|
| -// operations, which need a separate interface to test on.
|
| -// The more *minor* extended attribute should be put in this file.
|
| +package google;
|
|
|
| -[
|
| - Custom=VisitDOMWrapper, // Conflict with [SetWrapperReferenceTo] and [SetWrapperReferenceFrom]
|
| - NoImplHeader,
|
| -] interface TestInterface3 {
|
| - [Custom] getter boolean (unsigned long index);
|
| - [Custom] setter boolean (unsigned long index, Node value);
|
| - [Custom] deleter boolean (unsigned long index);
|
| +import com.google.protobuf.jruby.*;
|
| +import org.jruby.Ruby;
|
| +import org.jruby.runtime.load.BasicLibraryService;
|
|
|
| - [Custom=(PropertyGetter,PropertyEnumerator,PropertyQuery)] getter Node (DOMString name);
|
| - [Custom] setter Node (DOMString name, Node value);
|
| - [Custom] deleter boolean (DOMString name);
|
| +import java.io.IOException;
|
|
|
| - void voidMethodDocument(Document document);
|
| -
|
| - [RuntimeEnabled=FeatureName] iterable<any>;
|
| - [RuntimeEnabled=FeatureName, CallWith=ScriptState, RaisesException, ImplementedAs=iterableKeys] Iterator keys();
|
| -
|
| - stringifier readonly attribute DOMString readonlyStringifierAttribute;
|
| -};
|
| +public class ProtobufJavaService implements BasicLibraryService {
|
| + @Override
|
| + public boolean basicLoad(Ruby ruby) throws IOException {
|
| + ruby.defineModule("Google");
|
| + RubyProtobuf.createProtobuf(ruby);
|
| + RubyDescriptor.createRubyDescriptor(ruby);
|
| + RubyBuilder.createRubyBuilder(ruby);
|
| + RubyFieldDescriptor.createRubyFileDescriptor(ruby);
|
| + RubyMessageBuilderContext.createRubyMessageBuilderContext(ruby);
|
| + RubyEnumDescriptor.createRubyEnumDescriptor(ruby);
|
| + RubyEnumBuilderContext.createRubyEnumBuilderContext(ruby);
|
| + RubyDescriptorPool.createRubyDescriptorPool(ruby);
|
| + RubyRepeatedField.createRubyRepeatedField(ruby);
|
| + RubyFieldDescriptor.createRubyFileDescriptor(ruby);
|
| + RubyMap.createRubyMap(ruby);
|
| + RubyOneofDescriptor.createRubyOneofDescriptor(ruby);
|
| + RubyOneofBuilderContext.createRubyOneofBuilderContext(ruby);
|
| + return true;
|
| + }
|
| +}
|
|
|