Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(934)

Issue 196653003: Add [DoNotGenerateClassBindings] extended attribute (Closed)

Created:
6 years, 9 months ago by Nils Barth (inactive)
Modified:
6 years, 9 months ago
Reviewers:
CC:
blink-reviews, Nils Barth (inactive), kojih, arv+blink, jsbell+bindings_chromium.org, sof, kouhei+bindings_chromium.org, abarth-chromium, marja+watch_chromium.org, adamk+blink_chromium.org, haraken, Nate Chapin, Inactive
Visibility:
Public.

Description

Add [DoNotGenerateClassBindings] extended attribute Decided to just have C++ inheritance: Factor out GamepadCommon base class from Gamepad and WebKitGamepad https://codereview.chromium.org/195993007/ OLD: This add a new extended attribute [DoNotGenerateClassBindings] (name up for discussion) which is used by the second interface when two interfaces share an implementation (second interface has [ImplementedAs]). This prevents the generation of the WebCore namespace functions (wrap, toV8, v8SetReturnValue*), which prevents compile errors from duplicate definitions. Purpose: Used when 2 interfaces share an implementation: 2 IDL files using 1 C++ class. Usage: Bar.idl (secondary IDL file): [   DoNotGenerateClassBindings,   ImplementedAs=Foo, ] interface Bar { ... }; Bar.h: #ifndef Bar_h #define Bar_h #include "path/to/Foo.h" #endif // Bar_h Example of use is: Share Gamepad and WebKitGamepad implementation https://codereview.chromium.org/196503004/ If that works ok, I'll add a test (and a few comments) and commit this one separately. BUG=344556

Patch Set 1 #

Patch Set 2 : Tweak #

Patch Set 3 : Compiles and links #

Unified diffs Side-by-side diffs Delta from patch set Stats (+20 lines, -2 lines) Patch
M Source/bindings/IDLExtendedAttributes.txt View 1 chunk +1 line, -0 lines 0 comments Download
M Source/bindings/scripts/code_generator_v8.py View 1 chunk +3 lines, -0 lines 0 comments Download
M Source/bindings/scripts/v8_callback_interface.py View 1 chunk +1 line, -0 lines 0 comments Download
M Source/bindings/scripts/v8_interface.py View 1 chunk +1 line, -0 lines 0 comments Download
M Source/bindings/templates/interface.h View 1 2 chunks +2 lines, -0 lines 0 comments Download
M Source/bindings/templates/interface.cpp View 1 2 2 chunks +8 lines, -1 line 0 comments Download
M Source/bindings/templates/interface_base.cpp View 1 2 3 chunks +4 lines, -1 line 0 comments Download

Powered by Google App Engine
This is Rietveld 408576698