summaryrefslogtreecommitdiffstats
path: root/tools/json_schema_compiler
Commit message (Collapse)AuthorAgeFilesLines
* Initial commit of the Dart Chrome Extension APIs generatorssashab@chromium.org2013-02-0615-351/+1020
| | | | | | | | | | | Modified json_schema_compiler to allow a -l option to specify the language. Also allowed for a -H option to specify a hooks file, which is currently only supported for Dart. Review URL: https://chromiumcodereview.appspot.com/12041098 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@180845 0039d316-1c4b-4281-b951-d872f2087c98
* Minor JSON Schema compiler cleanup to remove Property.FromJSON and makekalman@chromium.org2013-02-041-56/+24
| | | | | | | | | | Function.returns a type not a property. R=yoz@chromium.org Review URL: https://codereview.chromium.org/12176002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@180560 0039d316-1c4b-4281-b951-d872f2087c98
* Fix up how the JSON Schema compiler decides whether to include or forwardkalman@chromium.org2013-01-296-107/+114
| | | | | | | | | | | | | | declare references to C++ types in other files. This fixed up a problem where references as part of required properties would cause compilation errors, specifically for the use of tabs.InjectDetails from the webview API. BUG=171726 Review URL: https://chromiumcodereview.appspot.com/11953121 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@179232 0039d316-1c4b-4281-b951-d872f2087c98
* IDL generated extensions code only generate foo_api.h when requiredcalamity@chromium.org2013-01-252-6/+14
| | | | | | | | | BUG=148545 Review URL: https://chromiumcodereview.appspot.com/12035070 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@178751 0039d316-1c4b-4281-b951-d872f2087c98
* Make the JSON Schema bundle generation remove the description from the JSON, andkalman@chromium.org2013-01-231-8/+19
| | | | | | | | | | | | | not pretty print it. This reduces the size of the chrome binary by 300kB. R=asargent@chromium.org BUG=171423 Review URL: https://chromiumcodereview.appspot.com/12051030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@178389 0039d316-1c4b-4281-b951-d872f2087c98
* IDL schema compiler: Fixed pseudo-random order of methods, properties, and ↵mgiuca@chromium.org2013-01-184-9/+31
| | | | | | | | | | | | | other elements due to them being parsed into an unordered dict (uses an OrderedDict instead). The API documentation now displays items in their original IDL order. BUG=168965 Review URL: https://chromiumcodereview.appspot.com/11826020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@177664 0039d316-1c4b-4281-b951-d872f2087c98
* Overhaul JSON Schema Compiler to support a number of features required tokalman@chromium.org2013-01-1732-1734/+1243
| | | | | | | | | | | | | | | | | | | | support the full range of JSON/IDL features, improve the interface of generated code, and improve generated code formatting, notably: * Make "choices" generate a struct containing each possible type, rather than multiple fields with different names plus and enum. This makes it possible to embed choices inside containers - notably within arrays (as in bug). It also improves optional choices detection. * Remove the Any C++ type generated by "any", and model it as a base::Value. * Make "additionalProperties" generated a std::map with the actual types as values, rather than just a DictionaryValue forcing callers to extract types. * Fix enum naming, it was unnecessarily including the namespace as a prefix. R=yoz@chromium.org BUG=162044 Review URL: https://codereview.chromium.org/11827026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@177361 0039d316-1c4b-4281-b951-d872f2087c98
* Create DeclarativeConditionSet, DeclarativeActionSet, and DeclarativeRule ↵jyasskin@chromium.org2013-01-172-0/+5
| | | | | | | | | | | | templates so that code can be shared between declarativeWebRequest and future declarative APIs. TBR=ben Review URL: https://chromiumcodereview.appspot.com/11572061 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@177313 0039d316-1c4b-4281-b951-d872f2087c98
* Run the JSON Schema Compiler's bundle compilation on JSON files. Previously itkalman@chromium.org2013-01-115-33/+133
| | | | | | | | | | | | | was only run on IDL files. Clean up all the code which that simplifies. TBR=isherman@chromium.org,battre@chromium.org,akalin@chromium.org BUG=141318 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=176015 Review URL: https://codereview.chromium.org/11747025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@176236 0039d316-1c4b-4281-b951-d872f2087c98
* Revert revision 176015ricow@chromium.org2013-01-105-133/+33
| | | | | | | | | | | | | | | | | This is a manual revert, drover did not like the deleted files > Run the JSON Schema Compiler's bundle compilation on JSON files. Previously it > was only run on IDL files. Clean up all the code which that simplifies. > > TBR=isherman@chromium.org,battre@chromium.org,akalin@chromium.org > BUG=141318 > > Review URL: https://chromiumcodereview.appspot.com/11747025 TBR=isherman@chromium.org,battre@chromium.org,akalin@chromium.org Review URL: https://codereview.chromium.org/11778097 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@176054 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 176047ricow@chromium.org2013-01-105-33/+133
| | | | | | | | | | | | | | | | | | | | | | | | > Revert 176015 > > Run the JSON Schema Compiler's bundle compilation on JSON files. Previously it > > was only run on IDL files. Clean up all the code which that simplifies. > > > > TBR=isherman@chromium.org,battre@chromium.org,akalin@chromium.org > > BUG=141318 > > > > Review URL: https://chromiumcodereview.appspot.com/11747025 > > This seems to be causing complation failures on release win builders: > http://chromegw/i/chromium.chrome/builders/Google%20Chrome%20Win/builds/15702 > > TBR=kalman@chromium.org > Review URL: https://codereview.chromium.org/11826048 Drover messed up this revert, reverting it TBR=ricow@chromium.org Review URL: https://codereview.chromium.org/11778096 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@176051 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 176015ricow@chromium.org2013-01-105-133/+33
| | | | | | | | | | | | | | | | | | > Run the JSON Schema Compiler's bundle compilation on JSON files. Previously it > was only run on IDL files. Clean up all the code which that simplifies. > > TBR=isherman@chromium.org,battre@chromium.org,akalin@chromium.org > BUG=141318 > > Review URL: https://chromiumcodereview.appspot.com/11747025 This seems to be causing complation failures on release win builders: http://chromegw/i/chromium.chrome/builders/Google%20Chrome%20Win/builds/15702 TBR=kalman@chromium.org Review URL: https://codereview.chromium.org/11826048 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@176047 0039d316-1c4b-4281-b951-d872f2087c98
* Run the JSON Schema Compiler's bundle compilation on JSON files. Previously itkalman@chromium.org2013-01-105-33/+133
| | | | | | | | | | | was only run on IDL files. Clean up all the code which that simplifies. TBR=isherman@chromium.org,battre@chromium.org,akalin@chromium.org BUG=141318 Review URL: https://chromiumcodereview.appspot.com/11747025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@176015 0039d316-1c4b-4281-b951-d872f2087c98
* Update references to the extension messaging APIs and lastError to point tokalman@chromium.org2013-01-082-4/+4
| | | | | | | | | | | the "runtime" namespace rather than "extension" in docs and samples. R=asargent@chromium.org TBR=dgozman@chromium.org Review URL: https://codereview.chromium.org/11745015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@175527 0039d316-1c4b-4281-b951-d872f2087c98
* Make JSON Schema Compiler's preview server able to display IDL files,kalman@chromium.org2012-12-211-19/+41
| | | | | | | | and rename it preview.py because previewserver.py is a tautology. Review URL: https://codereview.chromium.org/11649039 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@174401 0039d316-1c4b-4281-b951-d872f2087c98
* Allow leading underscore on identifier names in IDL parserasargent@chromium.org2012-12-152-0/+44
| | | | | | | | | | | This lets us have identifiers that match reserved words. BUG=166268 Review URL: https://chromiumcodereview.appspot.com/11565053 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@173332 0039d316-1c4b-4281-b951-d872f2087c98
* Disable the Python < 2.7 warning in JSON Schema Compiler.kalman@chromium.org2012-11-201-2/+5
| | | | | | | | TBR=cduvall@chromium.org Review URL: https://codereview.chromium.org/11413090 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@168816 0039d316-1c4b-4281-b951-d872f2087c98
* Extensions Docs Server: Preserve JSON declaration order in extensions ↵cduvall@chromium.org2012-11-204-15/+73
| | | | | | | | | | | | | | documentation All JSON is now parsed using an OrderedDict, so the order of properties is preserved. The order was also being messed up within the JSON Schema Compiler, because lists were being converted to (unordered) dictionaries. BUG=146649, 151867 Review URL: https://chromiumcodereview.appspot.com/11079010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@168702 0039d316-1c4b-4281-b951-d872f2087c98
* Allow IDL schemas to have comments on callback functionscduvall@chromium.org2012-11-023-7/+37
| | | | | | | | | | | The JSON schema compiler was ignoring comments on callback functions. Now callback functions and their parameters can have comments. BUG=158459 Review URL: https://chromiumcodereview.appspot.com/11342033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@165613 0039d316-1c4b-4281-b951-d872f2087c98
* Extensions Docs Server: Show parameters of functions that are properties of ↵cduvall@chromium.org2012-10-261-0/+12
| | | | | | | | | | | | | an object The docs server was not showing the parameters of a function that was a property of an object. This is now fixed. BUG=156673 Review URL: https://codereview.chromium.org/11195058 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@164224 0039d316-1c4b-4281-b951-d872f2087c98
* Define __ne__ to explicitly be "not __eq__" in model.py of JSON schema compiler.kalman@chromium.org2012-10-051-0/+4
| | | | | | | | | | | | | | | It turns out Python works that way. Adding __eq__ fixed a problem in server2 where == was failing on re-pickled data types. We're now using != too, so we need to define __ne__. Also, bump the version of server2 so that I can upload it now. TBR=cduvall@chromium.org Review URL: https://codereview.chromium.org/11029043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@160329 0039d316-1c4b-4281-b951-d872f2087c98
* Extensions Docs Server: Server code for showing properties of propertiescduvall@chromium.org2012-10-051-29/+70
| | | | | | | | | | | | | | This is a separate patch with just the server code for showing properties of properties. HandlebarDictGenerator now generates IDs for all API items, which are used in the table of contents. Template changes are here: https://codereview.chromium.org/10985071/ BUG=151866 Review URL: https://codereview.chromium.org/11018003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@160300 0039d316-1c4b-4281-b951-d872f2087c98
* Extensions Docs Server: Add <br/>s to multi line IDL commentscduvall@chromium.org2012-09-264-12/+17
| | | | | | | | | | | | | | | Some IDL comments that spanned multiple lines looked weird because all the text ran together. For an example see: http://developer.chrome.com/trunk/apps/app.window.html#method-create This also fixes doubly-escaped quotes in the IDL files. BUG=149143, 146977 Review URL: https://chromiumcodereview.appspot.com/10986018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@158732 0039d316-1c4b-4281-b951-d872f2087c98
* Extensions Docs Server: Enum values do not show up if enum is a typecduvall@chromium.org2012-09-2510-105/+168
| | | | | | | | | | | If an enumerated string is a type, the possible values were not shown. BUG=146301 Review URL: https://chromiumcodereview.appspot.com/10907151 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@158475 0039d316-1c4b-4281-b951-d872f2087c98
* Extensions Docs Server: Fix tests so they work from any directorycduvall@chromium.org2012-09-111-5/+10
| | | | | | | | Tests now can be run from any directory. Review URL: https://chromiumcodereview.appspot.com/10916217 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@156043 0039d316-1c4b-4281-b951-d872f2087c98
* Extensions Docs Server: Fix handlebar_dict_generator.pycduvall@chromium.org2012-08-311-0/+3
| | | | | | | | | This is my best guess as to what's going wrong. Python thinks the objects aren't equal, so check the names instead. Review URL: https://chromiumcodereview.appspot.com/10910024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@154346 0039d316-1c4b-4281-b951-d872f2087c98
* Changes:hebert.christopherj@chromium.org2012-08-296-181/+354
| | | | | | | | | | | | | 1) IsEnumOrEnumRef is refactored to be in the cpp_type_generator. 2) Refactored GeneratePopulatePropertyFromValue to call private methods (it was getting to be unwieldy.) 3) Refactored most of the unittests to put values on the stack instead of scoped_ptrs. 4) Implemented Enums as types. Enums all have the ENUMERATION_NONE. BUG=141940 Review URL: https://chromiumcodereview.appspot.com/10828407 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@153849 0039d316-1c4b-4281-b951-d872f2087c98
* Fix a minor nit in the JSON schema compiler.thestig@chromium.org2012-08-281-2/+2
| | | | | | Review URL: https://chromiumcodereview.appspot.com/10869083 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@153633 0039d316-1c4b-4281-b951-d872f2087c98
* Extensions Docs Server: Support rules and filtered eventscduvall@chromium.org2012-08-211-6/+13
| | | | | | | | | | | | Currently, there aren't any APIs that use filtered events, but webNavigation will soon. BUG=142560 Review URL: https://chromiumcodereview.appspot.com/10828403 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@152490 0039d316-1c4b-4281-b951-d872f2087c98
* Extensions Docs Server: Large performance increasecduvall@chromium.org2012-08-211-22/+24
| | | | | | | | | | | | | | | | | | | | Based off: https://chromiumcodereview.appspot.com/10834329 This adds a few things to speed up performance: 1. Caches items in memcache from FileSystemCache. 2. Caches everything primarily in memory, and falls back on memcache. 3. 5 minute timeout on stats. 4. Cron job to update memcache every 5 minutes (just enough time to update expired stats). 5. Memcache uses set_multi_async and get_multi_async where applicable. I have an instance at chrome-docs-test.appspot.com, but the cron job is only running every 10 minutes so I don't go over quota. After the cron job is run, even samples.html is fast! Review URL: https://chromiumcodereview.appspot.com/10829348 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@152472 0039d316-1c4b-4281-b951-d872f2087c98
* Context Menus now uses the JSON Schema Compiler.hebert.christopherj@chromium.org2012-08-141-0/+3
| | | | | | | | BUG=121174 Review URL: https://chromiumcodereview.appspot.com/10809094 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@151595 0039d316-1c4b-4281-b951-d872f2087c98
* Correct const accessors in base/values.(h|cc), Part II (ListValue)vabr@chromium.org2012-08-033-4/+4
| | | | | | | | | | | | | | For problem description and other info please see the BUG page. This is for ListValue. BUG=138946 TEST=N/A (no fix & no new feature) TBR=jar,zelidrag,scottbyer,mpcomplete,darin,achuith,sky,estade,atwilson,grt,thakis,jamesr,hans,sadrul,pastarmovj Review URL: https://chromiumcodereview.appspot.com/10837044 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@149819 0039d316-1c4b-4281-b951-d872f2087c98
* Extension docs server: fix the rendering of webstore.html.kalman@chromium.org2012-08-021-5/+18
| | | | | | | | TBR=cduvall@chromium.org Review URL: https://chromiumcodereview.appspot.com/10837073 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@149623 0039d316-1c4b-4281-b951-d872f2087c98
* Add INTERNAL annotation to namespaces in IDLgrv@chromium.org2012-08-023-3/+17
| | | | | | | | | | BUG=129311 TEST=unittest Review URL: https://chromiumcodereview.appspot.com/10677015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@149553 0039d316-1c4b-4281-b951-d872f2087c98
* Added JSON schema compiler support for serialized typesmitchellwrosen@chromium.org2012-07-317-63/+190
| | | | | | | | | | | Currently supports string->int, string->int64, and int->string. BUG=139076 Review URL: https://chromiumcodereview.appspot.com/10825029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@149302 0039d316-1c4b-4281-b951-d872f2087c98
* Extensions Docs Server: fix rendering of the Devtools API.cduvall@chromium.org2012-07-311-1/+2
| | | | | | | | | | | | This change splits devtools_api.json into a separate file per namespace so that JSON schema compiler can parse it. Without that, HandlebarDictGenerator can't access the API, and the docs server can't render it BUG=131095 Review URL: https://chromiumcodereview.appspot.com/10797039 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@149291 0039d316-1c4b-4281-b951-d872f2087c98
* Added ToJson to JSON schema compiler.mitchellwrosen@chromium.org2012-07-287-94/+350
| | | | | | | | | | | Also re-factored the recently landed Debugger api (I believe it's the only API to have compiled events, so far) BUG=138767 Review URL: https://chromiumcodereview.appspot.com/10796114 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@148878 0039d316-1c4b-4281-b951-d872f2087c98
* Correct const accessors in base/values.(h|cc)vabr@chromium.org2012-07-272-11/+11
| | | | | | | | | | | | | For problem description and other info please see the BUG page. This is for DictionaryValue. BUG=138946 TEST=N/A (no fix & no new feature) TBR=jar scottbyer achuith agl mnissler davemoore garykac akalin hans bulach phajdan.jr jamesr Review URL: https://chromiumcodereview.appspot.com/10834004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@148833 0039d316-1c4b-4281-b951-d872f2087c98
* Fix syntax highlighting in JSON Schema Compiler's preview server: don't crashkalman@chromium.org2012-07-263-17/+26
| | | | | | | | | | if Pygments isn't installed, and escape HTML (especially obvious with generics) when syntax highlighting is turned off. Review URL: https://chromiumcodereview.appspot.com/10833024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@148482 0039d316-1c4b-4281-b951-d872f2087c98
* JSON Schema Compiler supports functions as PropertyTypes.hebert.christopherj@chromium.org2012-07-268-12/+145
| | | | | | | | | | | | | | | | Before, the compiler raised an exception when a function was used as a property, which happens whenever a function is passed as a parameter. The solution presented here is to create a bool has_<function_name> to allow the hand-written C++ code to know whether or not the function was passed in. BUG=138850 TEST=function_as_parameter Review URL: https://chromiumcodereview.appspot.com/10824002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@148480 0039d316-1c4b-4281-b951-d872f2087c98
* JSON Schema Compiler now supports conversion from Choice to base::Value.hebert.christopherj@chromium.org2012-07-234-44/+162
| | | | | | | | | | BUG=133636 TEST=choices_unittest.cc Review URL: https://chromiumcodereview.appspot.com/10790040 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@147904 0039d316-1c4b-4281-b951-d872f2087c98
* Extension Docs Server Version 2: Various fixes.hebert.christopherj@chromium.org2012-07-231-0/+2
| | | | | | | | | | | | | | | Callbacks no longer appear when they shouldn't. Types now have events. Page_capture api now has the onChange event. Step 1 appears in the table of contents for the permissions API. BUG=138167 TEST= Review URL: https://chromiumcodereview.appspot.com/10800047 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@147890 0039d316-1c4b-4281-b951-d872f2087c98
* Move chrome.appWindow to chrome.app.window.asargent@chromium.org2012-07-203-11/+38
| | | | | | | | | | | BUG=134573 TEST=In platform apps, you should be able to call all the same methods, etc. via the new chrome.app.window namespace that you used to be able to with chrome.appWindow. Review URL: https://chromiumcodereview.appspot.com/10659021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@147710 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 147594 - NaCl: Remove two uses of '#include "nacl/nacl_log.h"'mseaborn@chromium.org2012-07-202-15/+20
| | | | | | | | | | | | "git cl dcommit" went crazy and appears to have reverted the 3 previous commits at the same time as committing my change. (This might be due to race conditions with running "git fetch" concurrently.) TBR=mseaborn@chromium.org Review URL: https://chromiumcodereview.appspot.com/10815024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@147601 0039d316-1c4b-4281-b951-d872f2087c98
* NaCl: Remove two uses of '#include "nacl/nacl_log.h"'mseaborn@chromium.org2012-07-202-20/+15
| | | | | | | | | | | | We should be using the full path for nacl_log.h, because it shouldn't be installed into the NaCl SDK. BUG=http://code.google.com/p/nativeclient/issues/detail?id=2908 TEST=build Review URL: https://chromiumcodereview.appspot.com/10804034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@147594 0039d316-1c4b-4281-b951-d872f2087c98
* Represent BINARY properties using std::string instead of BinaryValue,jyasskin@chromium.org2012-07-202-15/+20
| | | | | | | | | for easier use by C++. Review URL: https://chromiumcodereview.appspot.com/10700194 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@147591 0039d316-1c4b-4281-b951-d872f2087c98
* Extensions Docs Server: Functions with return valuescduvall@chromium.org2012-07-201-0/+5
| | | | | | | | | | Docs now handle functions with return values. See extension.html. BUG=131095 Review URL: https://chromiumcodereview.appspot.com/10809028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@147583 0039d316-1c4b-4281-b951-d872f2087c98
* Extension Docs Server: event templatecduvall@chromium.org2012-07-191-1/+1
| | | | | | | | | | | | | Blocked on Issue 10701012 Waiting for JSON Schema Compiler to support events serialization. BUG=133777 TEST=null Review URL: https://chromiumcodereview.appspot.com/10701014 Patch from Christopher Hebert <hebert.christopherj@chromium.org>. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@147358 0039d316-1c4b-4281-b951-d872f2087c98
* JSON schema compiler: Read the "optional" property out of the JSON for Function.kalman@chromium.org2012-07-171-0/+3
| | | | | | | | | | | Without this, code that looks for the "callback" in a Function, and is interested in whether it's optional (e.g. the new docs server) won't work. TBR=mtytel@chromium.org Review URL: https://chromiumcodereview.appspot.com/10780027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@146957 0039d316-1c4b-4281-b951-d872f2087c98
* JSON Schema Compiler: Add event compilation and allow multiple parameters to ↵mtytel@chromium.org2012-07-1625-206/+737
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | callbacks Compiles events to objects that look similar to this: namespace OnObjectFired { struct SomeObject { ~SomeObject(); SomeObject(); enum State { STATE_FOO, STATE_BAR, STATE_BAZ, }; static scoped_ptr<Value> CreateEnumValue(State state); State state; // Returns a new DictionaryValue representing the serialized form of this // SomeObject object. Passes ownership to caller. scoped_ptr<DictionaryValue> ToValue() const; private: DISALLOW_COPY_AND_ASSIGN(SomeObject); }; Value* Create(const SomeObject& some_object); }; BUG=133757, 135237 TEST= Review URL: https://chromiumcodereview.appspot.com/10701012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@146899 0039d316-1c4b-4281-b951-d872f2087c98