dart-gde/chrome.dart — pull request #207 by eukreign (2014-11-06 20:51:49+00:00)
Title: fixes for Port events/functions

This commit request adds two functions to backend.dart, `_printDeclaredTypeEventProperty()` and `_printDeclaredTypeFunction()` which take care of properly generating the event and function properties on a declared type. This fixes Port.onMessage and Port.sendMessage which have been the source of many user issues raised here and on stackoverflow (#135, #150, #163, etc).

There were some side effects of this change that occurred in `context_menus.dart` and `tts.dart`. It looks harmless, but it was not intentionally so I don't know if this breaks anything or not. I don't have any code that tests those modules.

The changes to `devtools.dart` are manual. The json has incorrect information regarding the number of arguments the callback function should take for `panels.create()` (it actually takes two arguments, the new panel and a status). Other than putting conditionals in the generator for this specific case or modifying the json files there isn't anyway to fix that (unless as has been discussed before someone builds the ability to provide overrides, #175).