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

Unified Diff: chrome/browser/extensions/api/README.txt

Issue 10391034: Scaffolding for an experimental discovery API letting users inject links in the recommended pane of… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Now using IDL and a ProfileKeyedService. Created 8 years, 7 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
Index: chrome/browser/extensions/api/README.txt
diff --git a/chrome/browser/extensions/api/README.txt b/chrome/browser/extensions/api/README.txt
new file mode 100644
index 0000000000000000000000000000000000000000..3e4f73c22029fbadb827293f0d0f53dca154b2e8
--- /dev/null
+++ b/chrome/browser/extensions/api/README.txt
@@ -0,0 +1,31 @@
+This file describes steps and files needed when adding a new API to Chrome.
+Before you start coding your new API, though, make sure you follow the process
+described at:
+ http://www.chromium.org/developers/design-documents/extensions/proposed-changes/apis-under-development
+
+This describes the new mechanism for defining API using IDL files. Some old APIs
+are still described using a JSON format. Don't rely on these. For inspiration,
+you can look at the "alarms" API.
+
+Supposing your API is called "Foo" and is currently experimental, here are the
+steps to add it:
+
+1) Write your API specification.
Aaron Boodman 2012/05/15 00:07:43 We shouldn't recommend that people use IDL, becaus
beaudoin 2012/05/16 16:56:16 Done.
+Create "chrome/common/extensions/api/experimental_foo.idl". This file should
+contain your complete API description. Look at alarms.idl for inspiration.
+
+2) Add your API to the project
+Add "experimental_foo.idl" to the "idl_schema_files" in
+"chrome/common/extensions/api/api.gyp".
+
+3) Write the API function handlers.
+Create foo_api.cc and foo_api.h under "chrome/browser/extensions/api/foo".
Aaron Boodman 2012/05/15 00:07:43 Can you add a statement recommending use of JSON S
beaudoin 2012/05/16 16:56:16 Done.
+
+4) Write support classes for your API.
+If your API needs any support classes add them to
+"chrome/browser/extensions/api/foo". Some old APIs added their support classes
+directly to chrome/browser/extensions. Don't do that.
Aaron Boodman 2012/05/15 00:07:43 Insert a step about testing here?
+
+5) Update the project with your new files.
+The files you created in (3) and (4) should be added to
+"chrome/chrome_browser_extensions.gypi".
« no previous file with comments | « no previous file | chrome/browser/extensions/api/app/app_api.cc » ('j') | chrome/browser/extensions/api/discovery/discovery_api.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698