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

Unified Diff: lib/dom/scripts/systemnative.py

Issue 10697080: Split backend.AddMembers call into series of backend.AddAtribute/backend.AddOperation calls. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« lib/dom/scripts/systemhtml.py ('K') | « lib/dom/scripts/systemhtml.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/dom/scripts/systemnative.py
diff --git a/lib/dom/scripts/systemnative.py b/lib/dom/scripts/systemnative.py
index 6614acbe5b461585b5ec4cbdcd7b3a7b400dbbeb..cb6bc79e6cfebc39c22e7972021ebd5a749728f6 100644
--- a/lib/dom/scripts/systemnative.py
+++ b/lib/dom/scripts/systemnative.py
@@ -193,11 +193,22 @@ class NativeImplementationGenerator(systembase.BaseGenerator):
def SetImplementationEmitter(self, implementation_emitter):
self._dart_impl_emitter = implementation_emitter
- def AddMergedMembers(self, merged_interface):
+ def StartGeneratingMergedMembers(self):
# We could not add merged functions to implementation class because
# underlying c++ object doesn't implement them. Merged functions are
# generated on merged interface implementation instead.
- pass
+ # Mute all the emitters.
+ self._original_emitters = {}
+ for key, value in self.__dict__.iteritems():
+ if isinstance(value, emitter.Emitter):
+ self._original_emitters[key] = value
+ self.__dict__[key] = emitter.Emitter()
+
+ def FinishGeneratingMergedMembers(self):
+ # Unmute all the emitters.
+ for key, value in self._original_emitters.iteritems():
+ self.__dict__[key] = value
+ del self._original_emitters
def StartInterface(self):
# Create emitters for c++ implementation.
@@ -469,10 +480,6 @@ class NativeImplementationGenerator(systembase.BaseGenerator):
return False
- def AddConstant(self, constant):
- # Constants are already defined on the interface.
- pass
-
def AddAttribute(self, attribute):
getter = attribute
setter = attribute if not systembase.IsReadOnly(attribute) else None
« lib/dom/scripts/systemhtml.py ('K') | « lib/dom/scripts/systemhtml.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698