• Home
Name Date Size #Lines LOC

..--

activity_log_private/03-May-2024-508373

alarms/03-May-2024-1,6851,209

app_current_window_internal/03-May-2024-611473

app_window/03-May-2024-661513

audio/03-May-2024-663465

automation/03-May-2024-190158

automation_internal/03-May-2024-558419

autotest_private/03-May-2024-389298

bluetooth/03-May-2024-2,5081,887

bluetooth_low_energy/03-May-2024-4,5683,358

bluetooth_socket/03-May-2024-2,0111,429

bookmark_manager_private/03-May-2024-1,300992

bookmarks/03-May-2024-2,0021,530

braille_display_private/03-May-2024-1,8391,356

browser/03-May-2024-10766

browsing_data/03-May-2024-1,233926

cast_channel/03-May-2024-3,7962,821

cast_streaming/03-May-2024-1,041799

cloud_print_private/03-May-2024-372266

command_line_private/03-May-2024-8951

commands/03-May-2024-1,336953

content_settings/03-May-2024-1,8311,379

context_menus/03-May-2024-596445

cookies/03-May-2024-1,4531,053

debugger/03-May-2024-1,096800

declarative/03-May-2024-4,0572,813

declarative_content/03-May-2024-1,7001,213

declarative_webrequest/03-May-2024-6,4514,845

desktop_capture/03-May-2024-685516

developer_private/03-May-2024-2,0981,600

diagnostics/03-May-2024-206141

dial/03-May-2024-2,7771,941

dns/03-May-2024-232159

downloads/03-May-2024-6,4485,417

downloads_internal/03-May-2024-7147

enterprise_platform_keys/03-May-2024-597458

enterprise_platform_keys_private/03-May-2024-1,3131,023

extension_action/03-May-2024-2,9502,087

feedback_private/03-May-2024-828578

file_handlers/03-May-2024-495375

file_system/03-May-2024-2,3001,876

font_settings/03-May-2024-827572

gcd_private/03-May-2024-357253

gcm/03-May-2024-630467

guest_view/03-May-2024-7649

hid/03-May-2024-822596

history/03-May-2024-772571

hotword_private/03-May-2024-436320

i18n/03-May-2024-15699

identity/03-May-2024-5,8224,525

identity_private/03-May-2024-6435

idle/03-May-2024-1,251876

idltest/03-May-2024-10772

image_writer_private/03-May-2024-4,2573,062

input/03-May-2024-358271

input_ime/03-May-2024-1,158893

location/03-May-2024-594404

log_private/03-May-2024-788561

management/03-May-2024-2,7312,075

mdns/03-May-2024-1,158816

media_galleries/03-May-2024-1,9631,550

media_galleries_private/03-May-2024-1,9531,364

messaging/03-May-2024-3,9632,879

metrics_private/03-May-2024-579423

module/03-May-2024-15799

music_manager_private/03-May-2024-1,071758

networking_private/03-May-2024-4,2343,149

notifications/03-May-2024-1,090804

omnibox/03-May-2024-1,221887

page_capture/03-May-2024-327230

permissions/03-May-2024-852594

power/03-May-2024-594384

preference/03-May-2024-2,4071,791

preferences_private/03-May-2024-313232

principals_private/03-May-2024-11874

processes/03-May-2024-1,137794

proxy/03-May-2024-1,7781,325

push_messaging/03-May-2024-2,0071,414

reading_list_private/03-May-2024-204159

recovery_private/03-May-2024-32

runtime/03-May-2024-372297

screenlock_private/03-May-2024-568446

serial/03-May-2024-2,8492,028

sessions/03-May-2024-1,255993

settings_overrides/03-May-2024-502422

signed_in_devices/03-May-2024-963673

socket/03-May-2024-632476

sockets_tcp/03-May-2024-170123

sockets_tcp_server/03-May-2024-182136

sockets_udp/03-May-2024-187137

spellcheck/03-May-2024-147104

storage/03-May-2024-4,6743,439

streams_private/03-May-2024-773504

sync_file_system/03-May-2024-1,161890

synced_notifications_private/03-May-2024-841668

system_cpu/03-May-2024-469294

system_display/03-May-2024-1,9481,402

system_indicator/03-May-2024-504346

system_info/03-May-2024-481299

system_memory/03-May-2024-203119

system_network/03-May-2024-184131

system_private/03-May-2024-311221

system_storage/03-May-2024-747526

tab_capture/03-May-2024-1,268958

tabs/03-May-2024-4,4723,410

terminal/03-May-2024-427290

test/03-May-2024-104

top_sites/03-May-2024-159104

web_navigation/03-May-2024-2,8022,134

web_request/03-May-2024-9,6247,218

webcam_private/03-May-2024-238169

webrtc_audio_private/03-May-2024-1,141803

webrtc_logging_private/03-May-2024-997687

webstore/03-May-2024-248172

webstore_private/03-May-2024-1,7591,276

webview/03-May-2024-1,014715

DEPSD03-May-202457 54

README.txtD03-May-20243.1 KiB7556

capture_web_contents_function.ccD03-May-20244.1 KiB139112

capture_web_contents_function.hD03-May-20242 KiB6635

chrome_extensions_api_client.ccD03-May-20241.3 KiB3823

chrome_extensions_api_client.hD03-May-20241.1 KiB3420

execute_code_function.ccD03-May-20247.2 KiB227180

execute_code_function.hD03-May-20242.7 KiB7639

README.txt

1This file describes steps and files needed when adding a new API to Chrome.
2Before you start coding your new API, though, make sure you follow the process
3described at:
4  http://www.chromium.org/developers/design-documents/extensions/proposed-changes/apis-under-development
5
6Two approaches are available for writing your API specification. The original
7approach relies on JSON specification files. The more recent and simpler system
8uses Web IDL files, but does not yet support all the features of the JSON files.
9Discuss with a member of the extensions team (aa@chromium.org) before you decide
10which approach is better suited to your API.
11
12The following steps suppose you're writing an experimental API called "Foo".
13
14--------------------------------------------------------------------------------
15APPROACH 1: JSON FILES
16
171) Write your API specification.
18Create "chrome/common/extensions/api/experimental_foo.json". For inspiration
19look at the "app" API. Include descriptions fields to generate the
20documentation.
21
222) Add your API specification to api.gyp.
23Add "experimental_foo.json" to the "schema_files" section in
24"chrome/common/extensions/api/api.gyp".
25
263) Write the API function handlers.
27Create foo_api.cc and foo_api.h under "chrome/browser/extensions/api/foo". You
28should use the JSON Schema Compiler. Look at the "permissions_api.cc" for
29details on how to do that.
30
31--------------------------------------------------------------------------------
32APPROACH 2: IDL FILES
33
341) Write your API specification.
35Create "chrome/common/extensions/api/experimental_foo.idl". For inspiration look
36at "alarms.idl". Include comments, they will be used to automatically generate
37the documentation.
38
392) Add your API specification to api.gyp.
40Add "experimental_foo.idl" to the "schema_files" section in
41"chrome/common/extensions/api/api.gyp".
42
433) Write the API function handlers.
44Create foo_api.cc and foo_api.h under "chrome/browser/extensions/api/foo". You
45should use the JSON Schema Compiler. Look at the "alarms_api.cc" for details on
46how to do that.
47
48--------------------------------------------------------------------------------
49STEPS COMMON TO BOTH APPROACHES
50
516) Write support classes for your API
52If your API needs any support classes add them to
53"chrome/browser/extensions/api/foo". Some old APIs added their support classes
54directly to chrome/browser/extensions. Don't do that.
55
567) Update the project with your new files.
57The files you created in (3) and (5) should be added to
58"chrome/chrome_browser_extensions.gypi".
59
60--------------------------------------------------------------------------------
61GENERATING DOCUMENTATION
62
638) Add a stub template in ../docs/templates/public corresponding to your API.
64See other templates for inspiration.
65
669) Run ../docs/templates/server2/preview.py to view the generated documentation.
67
68--------------------------------------------------------------------------------
69WRITING TESTS
70
7112) Write a unit test for your API.
72Create "chrome/browser/extensions/api/foo/foo_api_unittest.cc" and test each of
73your API methods. See "alarms_api_unittest.cc" for details. Once done add your
74.cc to "chrome/chrome_tests.gypi".
75