From dc0f95d653279beabeb9817299e2902918ba123e Mon Sep 17 00:00:00 2001 From: Kristian Monsen Date: Thu, 9 Jun 2011 11:47:42 +0100 Subject: Merge Chromium at r11.0.696.0: Initial merge by git Change-Id: I273dde2843af0839dfc08b419bb443fbd449532d --- chrome/common/auto_start_linux.cc | 88 ++ chrome/common/auto_start_linux.h | 34 + chrome/common/autofill_messages.cc | 1 + chrome/common/autofill_messages.h | 2 +- chrome/common/automation_constants.h | 6 + chrome/common/automation_messages.cc | 23 +- chrome/common/automation_messages.h | 5 +- chrome/common/automation_messages_internal.h | 14 +- chrome/common/child_process.cc | 112 -- chrome/common/child_process.h | 72 - chrome/common/child_process_host.cc | 12 +- chrome/common/child_thread.cc | 207 --- chrome/common/child_thread.h | 131 -- chrome/common/chrome_constants.cc | 2 - chrome/common/chrome_constants.h | 8 - chrome/common/chrome_paths.cc | 38 +- chrome/common/chrome_paths_linux.cc | 32 +- chrome/common/chrome_switches.cc | 293 +--- chrome/common/chrome_switches.h | 103 +- chrome/common/common_message_generator.h | 13 +- chrome/common/common_param_traits.cc | 248 +-- chrome/common/common_param_traits.h | 52 +- chrome/common/common_param_traits_unittest.cc | 54 +- chrome/common/content_settings_types.h | 1 + chrome/common/database_messages.cc | 8 - chrome/common/database_messages.h | 5 +- chrome/common/database_util.cc | 2 +- chrome/common/dom_storage_messages.cc | 2 +- chrome/common/extensions/api/extension_api.json | 248 ++- .../common/extensions/docs/background_pages.html | 8 + chrome/common/extensions/docs/cookies.html | 493 +++++- .../docs/examples/api/bookmarks/basic/icon.png | Bin 2809 -> 2799 bytes .../api/browserAction/make_page_red/icon.png | Bin 2809 -> 2799 bytes .../api/browserAction/print/print_16x16.png | Bin 647 -> 600 bytes .../api/browserAction/set_icon_path/icon1.png | Bin 2809 -> 2799 bytes .../api/browserAction/set_icon_path/icon2.png | Bin 2809 -> 2775 bytes .../api/browserAction/set_icon_path/icon3.png | Bin 2809 -> 2799 bytes .../api/browserAction/set_icon_path/icon4.png | Bin 2809 -> 2799 bytes .../api/browserAction/set_icon_path/icon5.png | Bin 2809 -> 2775 bytes .../api/browserAction/set_page_color/icon.png | Bin 3622 -> 1003 bytes .../docs/examples/api/contextMenus/basic.zip | Bin 3552 -> 3552 bytes .../extensions/docs/examples/api/cookies.zip | Bin 9295 -> 9239 bytes .../docs/examples/api/cookies/cookie.png | Bin 719 -> 663 bytes .../docs/examples/api/i18n/getMessage/icon.png | Bin 2809 -> 2799 bytes .../examples/api/idle/idle_simple/sample-128.png | Bin 3466 -> 2192 bytes .../examples/api/idle/idle_simple/sample-16.png | Bin 713 -> 591 bytes .../examples/api/idle/idle_simple/sample-19.png | Bin 309 -> 272 bytes .../examples/api/idle/idle_simple/sample-48.png | Bin 1347 -> 879 bytes .../api/infobars/sandwichbar/sandwich-128.png | Bin 8078 -> 7840 bytes .../api/infobars/sandwichbar/sandwich-16.png | Bin 708 -> 703 bytes .../api/infobars/sandwichbar/sandwich-19.png | Bin 657 -> 592 bytes .../api/infobars/sandwichbar/sandwich-48.png | Bin 2621 -> 2533 bytes .../docs/examples/api/messaging/timer/clock.png | Bin 383 -> 313 bytes .../extensions/docs/examples/api/notifications.zip | Bin 49989 -> 49928 bytes .../docs/examples/api/notifications/128.png | Bin 22858 -> 22857 bytes .../docs/examples/api/notifications/16.png | Bin 3592 -> 3534 bytes .../docs/examples/api/notifications/48.png | Bin 7366 -> 7365 bytes .../docs/examples/api/notifications/64.png | Bin 9899 -> 9898 bytes .../api/omnibox/extension-docs/icon-128.png | Bin 8449 -> 8181 bytes .../api/omnibox/extension-docs/icon-16.png | Bin 47675 -> 13252 bytes .../pageaction_by_content/sandwich-128.png | Bin 8078 -> 7840 bytes .../pageaction_by_content/sandwich-19.png | Bin 657 -> 592 bytes .../pageaction_by_content/sandwich-48.png | Bin 2621 -> 2533 bytes .../api/pageAction/pageaction_by_url/icon-128.png | Bin 10219 -> 9924 bytes .../api/pageAction/pageaction_by_url/icon-19.png | Bin 809 -> 715 bytes .../api/pageAction/pageaction_by_url/icon-48.png | Bin 2366 -> 1891 bytes .../examples/api/pageAction/set_icon/icon1.png | Bin 2809 -> 2799 bytes .../examples/api/pageAction/set_icon/icon2.png | Bin 2809 -> 2775 bytes .../api/processes/process_monitor/icon.png | Bin 2809 -> 2799 bytes .../docs/examples/api/processes/show_tabs/icon.png | Bin 2809 -> 2799 bytes .../docs/examples/api/tabs/screenshot/camera.png | Bin 1257 -> 1255 bytes .../windows/merge_windows/merge_windows_128.png | Bin 6583 -> 6072 bytes .../api/windows/merge_windows/merge_windows_48.png | Bin 2359 -> 2136 bytes .../docs/examples/extensions/app_launcher.zip | Bin 24932 -> 22452 bytes .../app_launcher/browser_action_icon.png | Bin 5563 -> 3817 bytes .../docs/examples/extensions/app_launcher/icon.png | Bin 5397 -> 4663 bytes .../docs/examples/extensions/benchmark.zip | Bin 258732 -> 258732 bytes .../docs/examples/extensions/buildbot.zip | Bin 28591 -> 27622 bytes .../docs/examples/extensions/buildbot/chromium.png | Bin 1736 -> 1699 bytes .../docs/examples/extensions/buildbot/icon.png | Bin 17504 -> 16572 bytes .../docs/examples/extensions/calendar.zip | Bin 40571 -> 40571 bytes .../docs/examples/extensions/chrome_search.zip | Bin 5610 -> 5592 bytes .../extensions/chrome_search/background.html | 9 +- .../extensions/chrome_search/manifest.json | 2 +- .../docs/examples/extensions/email_this_page.zip | Bin 11477 -> 10188 bytes .../extensions/email_this_page/email_16x16.png | Bin 572 -> 499 bytes .../extensions/email_this_page/mail_128x128.png | Bin 4696 -> 3480 bytes .../extensions/docs/examples/extensions/fx.zip | Bin 37899 -> 37897 bytes .../docs/examples/extensions/fx/icon.png | Bin 21948 -> 21946 bytes .../extensions/docs/examples/extensions/gdocs.zip | Bin 164296 -> 164294 bytes .../extensions/gdocs/img/icons/trashed.png | Bin 958 -> 956 bytes .../extensions/docs/examples/extensions/gmail.zip | Bin 57687 -> 55582 bytes .../examples/extensions/gmail/gmail_logged_in.png | Bin 3484 -> 3482 bytes .../extensions/gmail/gmail_not_logged_in.png | Bin 3412 -> 3360 bytes .../docs/examples/extensions/gmail/icon_128.png | Bin 7911 -> 5860 bytes .../docs/examples/extensions/imageinfo.zip | Bin 46603 -> 45362 bytes .../extensions/imageinfo/imageinfo-128.png | Bin 2040 -> 1387 bytes .../examples/extensions/imageinfo/imageinfo-16.png | Bin 492 -> 416 bytes .../examples/extensions/imageinfo/imageinfo-19.png | Bin 591 -> 486 bytes .../examples/extensions/imageinfo/imageinfo-48.png | Bin 1259 -> 852 bytes .../extensions/docs/examples/extensions/mappy.zip | Bin 21191 -> 20656 bytes .../docs/examples/extensions/mappy/icon.png | Bin 15702 -> 15198 bytes .../docs/examples/extensions/mappy/marker.png | Bin 770 -> 739 bytes .../docs/examples/extensions/maps_app/128.png | Bin 11999 -> 11998 bytes .../docs/examples/extensions/maps_app/24.png | Bin 3883 -> 3881 bytes .../extensions/docs/examples/extensions/news.zip | Bin 65941 -> 63981 bytes .../docs/examples/extensions/news/images/buzz.png | Bin 892 -> 845 bytes .../extensions/news/images/delete-icon.png | Bin 1030 -> 989 bytes .../docs/examples/extensions/news/images/fb.png | Bin 428 -> 361 bytes .../extensions/news/images/news_action.png | Bin 1109 -> 1082 bytes .../examples/extensions/news/images/news_icon.png | Bin 10782 -> 9056 bytes .../examples/extensions/news/images/twitter.png | Bin 588 -> 536 bytes .../docs/examples/extensions/news_a11y.zip | Bin 25302 -> 23549 bytes .../examples/extensions/news_a11y/news_action.png | Bin 1109 -> 1082 bytes .../examples/extensions/news_a11y/news_icon.png | Bin 10782 -> 9056 bytes .../docs/examples/extensions/news_i18n.zip | Bin 27729 -> 25976 bytes .../examples/extensions/news_i18n/news_action.png | Bin 1109 -> 1082 bytes .../examples/extensions/news_i18n/news_icon.png | Bin 10782 -> 9056 bytes .../docs/examples/extensions/oauth_contacts.zip | Bin 71953 -> 68325 bytes .../extensions/oauth_contacts/img/icon-128.png | Bin 10224 -> 7220 bytes .../extensions/oauth_contacts/img/icon-19-off.png | Bin 1596 -> 1563 bytes .../extensions/oauth_contacts/img/icon-19-on.png | Bin 1595 -> 1568 bytes .../extensions/oauth_contacts/img/icon-32.png | Bin 1443 -> 1273 bytes .../extensions/oauth_contacts/img/icon-48.png | Bin 2643 -> 2249 bytes .../extensions/docs/examples/extensions/wave.zip | Bin 98799 -> 96696 bytes .../docs/examples/extensions/wave/128.png | Bin 14567 -> 14565 bytes .../docs/examples/extensions/wave/16.png | Bin 3043 -> 2926 bytes .../docs/examples/extensions/wave/48.png | Bin 5909 -> 5907 bytes .../docs/examples/extensions/wave/64.png | Bin 7402 -> 7401 bytes .../docs/examples/extensions/wave/authorized.png | Bin 3043 -> 2926 bytes .../docs/examples/extensions/wave/logo.png | Bin 5122 -> 3376 bytes .../docs/examples/extensions/wave/unauthorized.png | Bin 3097 -> 2979 bytes .../howto/contentscript_xhr/sample-128.png | Bin 3466 -> 2192 bytes .../examples/howto/contentscript_xhr/sample-48.png | Bin 1347 -> 879 bytes .../analytics/analytics-extension-icon-128.png | Bin 7960 -> 7346 bytes .../analytics/analytics-extension-icon-19.png | Bin 632 -> 454 bytes .../analytics/analytics-extension-icon-48.png | Bin 3293 -> 2942 bytes .../docs/examples/tutorials/getstarted/icon.png | Bin 3789 -> 3675 bytes .../docs/experimental.contentSettings.misc.html | 574 +++++++ .../extensions/docs/experimental.extension.html | 1638 ++++++++++++++++++++ chrome/common/extensions/docs/experimental.html | 25 +- .../common/extensions/docs/experimental.proxy.html | 866 ++++++----- .../docs/experimental.webNavigation.html | 10 +- chrome/common/extensions/docs/faq.html | 312 ++-- .../docs/images/a11y/focus-outline-2.png | Bin 3444 -> 2778 bytes .../extensions/docs/images/a11y/focus-outline.png | Bin 5247 -> 3963 bytes .../docs/images/a11y/standard-html-controls.png | Bin 18670 -> 15646 bytes chrome/common/extensions/docs/images/bookmarks.png | Bin 19270 -> 17771 bytes .../extensions/docs/images/browser-action.png | Bin 22227 -> 20753 bytes .../docs/images/google-mail-checker-capture.png | Bin 13714 -> 10919 bytes .../extensions/docs/images/hello-world-small.png | Bin 51228 -> 50444 bytes .../common/extensions/docs/images/hello-world.png | Bin 123083 -> 121632 bytes chrome/common/extensions/docs/images/icon.png | Bin 41989 -> 39487 bytes .../extensions/docs/images/index/flashapp.png | Bin 95859 -> 82340 bytes .../extensions/docs/images/index/gmail-small.png | Bin 2594 -> 2383 bytes .../common/extensions/docs/images/index/gmail.png | Bin 6091 -> 4548 bytes .../extensions/docs/images/index/html5app.png | Bin 47166 -> 40439 bytes .../common/extensions/docs/images/index/news.png | Bin 8039 -> 7300 bytes chrome/common/extensions/docs/images/index/rss.png | Bin 3264 -> 2491 bytes chrome/common/extensions/docs/images/infobar.png | Bin 88579 -> 88457 bytes .../docs/images/intermediate/bookmarks.png | Bin 41959 -> 37606 bytes .../docs/images/intermediate/hello-world.png | Bin 248292 -> 245725 bytes .../extensions/docs/images/intermediate/news.png | Bin 37042 -> 30165 bytes .../extensions/docs/images/intermediate/tabs.png | Bin 26159 -> 23877 bytes .../docs/images/intermediate/windows.png | Bin 40185 -> 36993 bytes .../common/extensions/docs/images/load_after.png | Bin 46183 -> 42405 bytes .../extensions/docs/images/load_after_small.png | Bin 19738 -> 19365 bytes .../extensions/docs/images/notification-linux.png | Bin 15439 -> 14624 bytes .../extensions/docs/images/notification-mac.png | Bin 13590 -> 12704 bytes chrome/common/extensions/docs/images/ntp-blank.png | Bin 7779 -> 6597 bytes .../common/extensions/docs/images/ntp-default.png | Bin 21154 -> 19374 bytes chrome/common/extensions/docs/images/omnibox.png | Bin 47242 -> 41971 bytes .../common/extensions/docs/images/page-action.png | Bin 9504 -> 9093 bytes chrome/common/extensions/docs/images/perms-hw1.png | Bin 20247 -> 17074 bytes .../extensions/docs/images/perms-hw2-disabled.png | Bin 21881 -> 14196 bytes chrome/common/extensions/docs/images/perms-hw2.png | Bin 22511 -> 18628 bytes .../extensions/docs/images/sample-default-icon.png | Bin 5321 -> 3356 bytes .../extensions/docs/images/subscribe-cap1.png | Bin 7332 -> 6545 bytes .../extensions/docs/images/subscribe-cap2.png | Bin 17455 -> 14952 bytes chrome/common/extensions/docs/images/tabs.png | Bin 11141 -> 10387 bytes .../extensions/docs/images/toggle_sprite.png | Bin 417 -> 301 bytes .../docs/images/tut_analytics/screenshot01.png | Bin 20155 -> 17697 bytes .../docs/images/tut_analytics/screenshot02.png | Bin 16343 -> 14125 bytes .../docs/images/tut_analytics/screenshot03.png | Bin 75593 -> 60725 bytes .../docs/images/tut_analytics/screenshot04.png | Bin 105505 -> 94761 bytes chrome/common/extensions/docs/images/windows.png | Bin 16204 -> 15099 bytes chrome/common/extensions/docs/management.html | 70 +- chrome/common/extensions/docs/manifest.html | 33 +- chrome/common/extensions/docs/match_patterns.html | 9 +- chrome/common/extensions/docs/messaging.html | 2 +- chrome/common/extensions/docs/samples.html | 840 +++++----- chrome/common/extensions/docs/samples.json | 546 ++++--- .../extensions/docs/static/background_pages.html | 8 + .../extensions/docs/static/experimental.html | 23 +- .../extensions/docs/static/experimental.proxy.html | 262 ++++ chrome/common/extensions/docs/static/faq.html | 314 ++-- chrome/common/extensions/docs/static/manifest.html | 33 +- .../extensions/docs/static/match_patterns.html | 9 +- .../common/extensions/docs/static/messaging.html | 2 +- .../common/extensions/docs/static/whats_new.html | 31 +- chrome/common/extensions/docs/whats_new.html | 31 +- chrome/common/extensions/extension.cc | 175 ++- chrome/common/extensions/extension.h | 45 +- chrome/common/extensions/extension_constants.cc | 12 +- chrome/common/extensions/extension_constants.h | 64 + chrome/common/extensions/extension_file_util.cc | 12 +- chrome/common/extensions/extension_file_util.h | 6 + .../extensions/extension_file_util_unittest.cc | 10 +- chrome/common/extensions/extension_icon_set.cc | 2 +- chrome/common/extensions/extension_l10n_util.cc | 20 +- .../extensions/extension_localization_peer.cc | 8 +- .../extensions/extension_localization_peer.h | 3 +- .../extension_localization_peer_unittest.cc | 15 +- .../extensions/extension_manifests_unittest.cc | 141 +- chrome/common/extensions/extension_set_unittest.cc | 3 +- chrome/common/extensions/extension_unittest.cc | 94 +- chrome/common/extensions/extension_unpacker.cc | 26 +- chrome/common/extensions/update_manifest.cc | 4 +- chrome/common/extensions/url_pattern.cc | 76 +- chrome/common/extensions/url_pattern.h | 35 +- chrome/common/extensions/url_pattern_unittest.cc | 81 +- chrome/common/extensions/user_script.cc | 21 +- chrome/common/extensions/user_script.h | 6 +- chrome/common/extensions/user_script_unittest.cc | 12 +- .../common/file_system/file_system_dispatcher.cc | 277 ---- chrome/common/file_system/file_system_dispatcher.h | 102 -- .../file_system/file_system_dispatcher_dummy.cc | 21 - .../webfilesystem_callback_dispatcher.cc | 72 - .../webfilesystem_callback_dispatcher.h | 37 - chrome/common/file_system/webfilesystem_impl.cc | 116 -- chrome/common/file_system/webfilesystem_impl.h | 69 - chrome/common/file_system/webfilewriter_impl.cc | 79 - chrome/common/file_system/webfilewriter_impl.h | 34 - chrome/common/file_utilities_messages.cc | 8 - chrome/common/file_utilities_messages.h | 6 +- chrome/common/gpu_feature_flags.cc | 3 + chrome/common/gpu_feature_flags.h | 6 +- chrome/common/gpu_feature_flags_unittest.cc | 5 +- chrome/common/gpu_info.cc | 27 +- chrome/common/gpu_info.h | 16 +- chrome/common/gpu_info_unittest.cc | 1 + chrome/common/gpu_messages.cc | 8 +- chrome/common/gpu_messages_internal.h | 21 +- chrome/common/gpu_messages_unittest.cc | 6 +- chrome/common/gpu_plugin.cc | 36 - chrome/common/gpu_plugin.h | 16 - chrome/common/indexed_db_messages.h | 32 +- chrome/common/json_pref_store.cc | 4 + chrome/common/json_pref_store.h | 2 + chrome/common/logging_chrome.cc | 44 +- chrome/common/message_router.cc | 52 - chrome/common/message_router.h | 63 - chrome/common/metrics_helpers.cc | 12 + chrome/common/mime_registry_messages.cc | 8 - chrome/common/mime_registry_messages.h | 6 +- chrome/common/net/PRESUBMIT.py | 13 + .../common/net/gaia/gaia_auth_fetcher_unittest.cc | 33 + .../common/net/gaia/gaia_auth_fetcher_unittest.h | 27 +- chrome/common/net/socket_stream.h | 15 - chrome/common/net/test_url_fetcher_factory.cc | 13 +- chrome/common/net/test_url_fetcher_factory.h | 11 + chrome/common/net/url_fetcher.cc | 32 +- chrome/common/net/url_fetcher.h | 7 +- chrome/common/notification_details.cc | 18 - chrome/common/notification_details.h | 49 +- chrome/common/notification_observer.h | 17 +- chrome/common/notification_observer_mock.cc | 12 - chrome/common/notification_observer_mock.h | 26 - chrome/common/notification_registrar.cc | 115 -- chrome/common/notification_registrar.h | 58 +- chrome/common/notification_service.cc | 151 -- chrome/common/notification_service.h | 100 +- chrome/common/notification_service_unittest.cc | 164 -- chrome/common/notification_source.cc | 17 - chrome/common/notification_source.h | 47 +- chrome/common/notification_type.h | 1328 +--------------- chrome/common/page_transition_types.cc | 17 - chrome/common/page_transition_types.h | 3 - chrome/common/pepper_file_messages.cc | 32 +- chrome/common/pepper_file_messages.h | 27 +- chrome/common/pepper_messages.cc | 2 +- chrome/common/pepper_plugin_registry.cc | 73 +- chrome/common/pepper_plugin_registry.h | 19 +- chrome/common/persistent_pref_store.h | 7 +- chrome/common/plugin_messages.cc | 1 + chrome/common/plugin_messages_internal.h | 23 - chrome/common/pref_names.cc | 81 +- chrome/common/pref_names.h | 34 +- chrome/common/render_messages.cc | 279 +--- chrome/common/render_messages.h | 112 +- chrome/common/render_messages_internal.h | 327 +--- chrome/common/render_messages_params.cc | 242 +-- chrome/common/render_messages_params.h | 144 +- chrome/common/resource_dispatcher.cc | 623 -------- chrome/common/resource_dispatcher.h | 152 -- chrome/common/resource_dispatcher_dummy.cc | 35 - chrome/common/resource_dispatcher_unittest.cc | 330 ---- chrome/common/resource_response.cc | 19 - chrome/common/resource_response.h | 55 - chrome/common/safebrowsing_messages.h | 24 + chrome/common/sandbox_init_wrapper_win.cc | 18 +- chrome/common/sandbox_mac.mm | 17 +- chrome/common/sandbox_mac_unittest_helper.h | 4 +- chrome/common/sandbox_mac_unittest_helper.mm | 8 + chrome/common/sandbox_policy.cc | 38 +- chrome/common/security_filter_peer.cc | 213 --- chrome/common/security_filter_peer.h | 125 -- chrome/common/service_process_util.cc | 63 +- chrome/common/service_process_util.h | 24 +- chrome/common/service_process_util_linux.cc | 97 ++ chrome/common/service_process_util_mac.mm | 304 ++++ chrome/common/service_process_util_posix.cc | 172 +- chrome/common/service_process_util_posix.h | 77 + chrome/common/service_process_util_unittest.cc | 71 +- chrome/common/service_process_util_win.cc | 55 +- chrome/common/socket_stream_dispatcher.cc | 217 --- chrome/common/socket_stream_dispatcher.h | 48 - chrome/common/socket_stream_dispatcher_dummy.cc | 18 - chrome/common/speech_input_messages.cc | 83 - chrome/common/speech_input_messages.h | 62 +- chrome/common/unix_domain_socket_posix.cc | 11 +- chrome/common/url_constants.cc | 22 +- chrome/common/url_constants.h | 15 +- chrome/common/utility_messages.cc | 12 - chrome/common/utility_messages.h | 233 ++- chrome/common/utility_messages_internal.h | 150 -- chrome/common/web_apps_unittest.cc | 2 +- chrome/common/webkit_param_traits.cc | 41 + chrome/common/webkit_param_traits.h | 9 + chrome/common/webmessageportchannel_impl.cc | 4 +- chrome/common/win_safe_util.cc | 8 +- chrome/common/worker_messages.cc | 117 -- chrome/common/worker_messages.h | 197 ++- chrome/common/worker_messages_internal.h | 129 -- chrome/common/zip_unittest.cc | 2 +- 335 files changed, 7914 insertions(+), 9692 deletions(-) create mode 100644 chrome/common/auto_start_linux.cc create mode 100644 chrome/common/auto_start_linux.h delete mode 100644 chrome/common/child_process.cc delete mode 100644 chrome/common/child_process.h delete mode 100644 chrome/common/child_thread.cc delete mode 100644 chrome/common/child_thread.h delete mode 100644 chrome/common/database_messages.cc create mode 100644 chrome/common/extensions/docs/experimental.contentSettings.misc.html create mode 100644 chrome/common/extensions/docs/experimental.extension.html create mode 100644 chrome/common/extensions/docs/static/experimental.proxy.html delete mode 100644 chrome/common/file_system/file_system_dispatcher.cc delete mode 100644 chrome/common/file_system/file_system_dispatcher.h delete mode 100644 chrome/common/file_system/file_system_dispatcher_dummy.cc delete mode 100644 chrome/common/file_system/webfilesystem_callback_dispatcher.cc delete mode 100644 chrome/common/file_system/webfilesystem_callback_dispatcher.h delete mode 100644 chrome/common/file_system/webfilesystem_impl.cc delete mode 100644 chrome/common/file_system/webfilesystem_impl.h delete mode 100644 chrome/common/file_system/webfilewriter_impl.cc delete mode 100644 chrome/common/file_system/webfilewriter_impl.h delete mode 100644 chrome/common/file_utilities_messages.cc delete mode 100644 chrome/common/gpu_plugin.cc delete mode 100644 chrome/common/gpu_plugin.h delete mode 100644 chrome/common/message_router.cc delete mode 100644 chrome/common/message_router.h delete mode 100644 chrome/common/mime_registry_messages.cc create mode 100644 chrome/common/net/PRESUBMIT.py delete mode 100644 chrome/common/net/socket_stream.h delete mode 100644 chrome/common/notification_details.cc delete mode 100644 chrome/common/notification_observer_mock.cc delete mode 100644 chrome/common/notification_observer_mock.h delete mode 100644 chrome/common/notification_registrar.cc delete mode 100644 chrome/common/notification_service.cc delete mode 100644 chrome/common/notification_service_unittest.cc delete mode 100644 chrome/common/notification_source.cc delete mode 100644 chrome/common/resource_dispatcher.cc delete mode 100644 chrome/common/resource_dispatcher.h delete mode 100644 chrome/common/resource_dispatcher_dummy.cc delete mode 100644 chrome/common/resource_dispatcher_unittest.cc delete mode 100644 chrome/common/resource_response.cc delete mode 100644 chrome/common/resource_response.h create mode 100644 chrome/common/safebrowsing_messages.h delete mode 100644 chrome/common/security_filter_peer.cc delete mode 100644 chrome/common/security_filter_peer.h create mode 100644 chrome/common/service_process_util_linux.cc create mode 100644 chrome/common/service_process_util_mac.mm create mode 100644 chrome/common/service_process_util_posix.h delete mode 100644 chrome/common/socket_stream_dispatcher.cc delete mode 100644 chrome/common/socket_stream_dispatcher.h delete mode 100644 chrome/common/socket_stream_dispatcher_dummy.cc delete mode 100644 chrome/common/speech_input_messages.cc delete mode 100644 chrome/common/utility_messages.cc delete mode 100644 chrome/common/utility_messages_internal.h delete mode 100644 chrome/common/worker_messages.cc delete mode 100644 chrome/common/worker_messages_internal.h (limited to 'chrome/common') diff --git a/chrome/common/auto_start_linux.cc b/chrome/common/auto_start_linux.cc new file mode 100644 index 0000000..099cb5e --- /dev/null +++ b/chrome/common/auto_start_linux.cc @@ -0,0 +1,88 @@ +// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "chrome/common/auto_start_linux.h" + +#include "base/environment.h" +#include "base/file_path.h" +#include "base/file_util.h" +#include "base/logging.h" +#include "base/nix/xdg_util.h" +#include "base/string_tokenizer.h" + +namespace { + +const FilePath::CharType kAutostart[] = "autostart"; +const FilePath::CharType kConfig[] = ".config"; +const char kXdgConfigHome[] = "XDG_CONFIG_HOME"; + +FilePath GetAutostartDirectory(base::Environment* environment) { + FilePath result = + base::nix::GetXDGDirectory(environment, kXdgConfigHome, kConfig); + result = result.Append(kAutostart); + return result; +} + +} // namespace + +bool AutoStart::AddApplication(const std::string& autostart_filename, + const std::string& application_name, + const std::string& command_line, + bool is_terminal_app) { + scoped_ptr environment(base::Environment::Create()); + FilePath autostart_directory = GetAutostartDirectory(environment.get()); + if (!file_util::DirectoryExists(autostart_directory) && + !file_util::CreateDirectory(autostart_directory)) { + return false; + } + + FilePath autostart_file = autostart_directory.Append(autostart_filename); + std::string terminal = is_terminal_app ? "true" : "false"; + std::string autostart_file_contents = + "[Desktop Entry]\n" + "Type=Application\n" + "Terminal=" + terminal + "\n" + "Exec=" + command_line + "\n" + "Name=" + application_name + "\n"; + std::string::size_type content_length = autostart_file_contents.length(); + if (file_util::WriteFile(autostart_file, autostart_file_contents.c_str(), + content_length) != + static_cast(content_length)) { + file_util::Delete(autostart_file, false); + return false; + } + return true; +} + +bool AutoStart::Remove(const std::string& autostart_filename) { + scoped_ptr environment(base::Environment::Create()); + FilePath autostart_directory = GetAutostartDirectory(environment.get()); + FilePath autostart_file = autostart_directory.Append(autostart_filename); + return file_util::Delete(autostart_file, false); +} + +bool AutoStart::GetAutostartFileContents( + const std::string& autostart_filename, std::string* contents) { + scoped_ptr environment(base::Environment::Create()); + FilePath autostart_directory = GetAutostartDirectory(environment.get()); + FilePath autostart_file = autostart_directory.Append(autostart_filename); + return file_util::ReadFileToString(autostart_file, contents); +} + +bool AutoStart::GetAutostartFileValue(const std::string& autostart_filename, + const std::string& value_name, + std::string* value) { + std::string contents; + if (!GetAutostartFileContents(autostart_filename, &contents)) + return false; + StringTokenizer tokenizer(contents, "\n"); + std::string token = value_name + "="; + while (tokenizer.GetNext()) { + if (tokenizer.token().substr(0, token.length()) == token) { + *value = tokenizer.token().substr(token.length()); + return true; + } + } + return false; +} diff --git a/chrome/common/auto_start_linux.h b/chrome/common/auto_start_linux.h new file mode 100644 index 0000000..d6b1009 --- /dev/null +++ b/chrome/common/auto_start_linux.h @@ -0,0 +1,34 @@ +// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef CHROME_COMMON_AUTO_START_LINUX_H_ +#define CHROME_COMMON_AUTO_START_LINUX_H_ +#pragma once + +#include + +#include "base/basictypes.h" + +class AutoStart { + public: + // Registers an application to autostart on user login. |is_terminal_app| + // specifies whether the app will run in a terminal window. + static bool AddApplication(const std::string& autostart_filename, + const std::string& application_name, + const std::string& command_line, + bool is_terminal_app); + // Removes an autostart file. + static bool Remove(const std::string& autostart_filename); + // Gets the entire contents of an autostart file. + static bool GetAutostartFileContents(const std::string& autostart_filename, + std::string* contents); + // Gets a specific value from an autostart file. + static bool GetAutostartFileValue(const std::string& autostart_filename, + const std::string& value_name, + std::string* value); + private: + DISALLOW_IMPLICIT_CONSTRUCTORS(AutoStart); +}; + +#endif // CHROME_COMMON_AUTO_START_LINUX_H_ diff --git a/chrome/common/autofill_messages.cc b/chrome/common/autofill_messages.cc index 80b43f3..1243f1f 100644 --- a/chrome/common/autofill_messages.cc +++ b/chrome/common/autofill_messages.cc @@ -3,6 +3,7 @@ // found in the LICENSE file. #include "chrome/common/common_param_traits.h" +#include "content/common/common_param_traits.h" #include "webkit/glue/form_data.h" #include "webkit/glue/form_field.h" #include "webkit/glue/password_form.h" diff --git a/chrome/common/autofill_messages.h b/chrome/common/autofill_messages.h index 4e2f9bc..dd1776f 100644 --- a/chrome/common/autofill_messages.h +++ b/chrome/common/autofill_messages.h @@ -75,7 +75,7 @@ IPC_MESSAGE_ROUTED1(AutoFillMsg_FillPasswordForm, // AutoFill messages sent from the renderer to the browser. // Notification that forms have been seen that are candidates for -// filling/submitting by the AutoFillManager. +// filling/submitting by the AutofillManager. IPC_MESSAGE_ROUTED1(AutoFillHostMsg_FormsSeen, std::vector /* forms */) diff --git a/chrome/common/automation_constants.h b/chrome/common/automation_constants.h index c4aa683..cddd589 100644 --- a/chrome/common/automation_constants.h +++ b/chrome/common/automation_constants.h @@ -44,6 +44,12 @@ enum KeyModifierMasks { kMetaKeyMask = 1 << 3, }; +enum MouseButton { + kLeftButton = 0, + kMiddleButton, + kRightButton, +}; + } // namespace automation // Used by AutomationProxy, declared here so that other headers don't need diff --git a/chrome/common/automation_messages.cc b/chrome/common/automation_messages.cc index 8dcac0e..efa93a9 100644 --- a/chrome/common/automation_messages.cc +++ b/chrome/common/automation_messages.cc @@ -2,10 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include "content/common/common_param_traits.h" + #define IPC_MESSAGE_IMPL #include "chrome/common/automation_messages.h" - AutomationURLRequest::AutomationURLRequest() : resource_type(0), load_flags(0) { @@ -35,18 +36,18 @@ AutomationURLResponse::AutomationURLResponse() redirect_status(0) { } -AutomationURLResponse::AutomationURLResponse(const std::string& in_mime_type, - const std::string& in_headers, - int64 in_content_length, - const base::Time& in_last_modified, - const std::string& in_redirect_url, - int in_redirect_status) +AutomationURLResponse::AutomationURLResponse( + const std::string& in_mime_type, const std::string& in_headers, + int64 in_content_length, const base::Time& in_last_modified, + const std::string& in_redirect_url, int in_redirect_status, + const net::HostPortPair& host_socket_address) : mime_type(in_mime_type), headers(in_headers), content_length(in_content_length), last_modified(in_last_modified), redirect_url(in_redirect_url), - redirect_status(in_redirect_status) { + redirect_status(in_redirect_status), + socket_address(host_socket_address) { } @@ -445,6 +446,7 @@ void ParamTraits::Write(Message* m, WriteParam(m, p.last_modified); WriteParam(m, p.redirect_url); WriteParam(m, p.redirect_status); + WriteParam(m, p.socket_address); } // static @@ -456,7 +458,8 @@ bool ParamTraits::Read(const Message* m, ReadParam(m, iter, &p->content_length) && ReadParam(m, iter, &p->last_modified) && ReadParam(m, iter, &p->redirect_url) && - ReadParam(m, iter, &p->redirect_status); + ReadParam(m, iter, &p->redirect_status) && + ReadParam(m, iter, &p->socket_address); } // static @@ -474,6 +477,8 @@ void ParamTraits::Log(const param_type& p, LogParam(p.redirect_url, l); l->append(", "); LogParam(p.redirect_status, l); + l->append(", "); + LogParam(p.socket_address, l); l->append(")"); } diff --git a/chrome/common/automation_messages.h b/chrome/common/automation_messages.h index 8bc8153..14ede2a 100644 --- a/chrome/common/automation_messages.h +++ b/chrome/common/automation_messages.h @@ -14,6 +14,7 @@ #include "chrome/common/page_type.h" #include "chrome/common/security_style.h" #include "chrome/common/common_param_traits.h" +#include "net/base/host_port_pair.h" #include "net/base/upload_data.h" #include "ui/gfx/rect.h" @@ -41,7 +42,8 @@ struct AutomationURLResponse { int64 content_length, const base::Time& last_modified, const std::string& redirect_url, - int redirect_status); + int redirect_status, + const net::HostPortPair& host_socket_address); ~AutomationURLResponse(); std::string mime_type; @@ -50,6 +52,7 @@ struct AutomationURLResponse { base::Time last_modified; std::string redirect_url; int redirect_status; + net::HostPortPair socket_address; }; struct ExternalTabSettings { diff --git a/chrome/common/automation_messages_internal.h b/chrome/common/automation_messages_internal.h index d6008e0..decc420 100644 --- a/chrome/common/automation_messages_internal.h +++ b/chrome/common/automation_messages_internal.h @@ -1441,12 +1441,18 @@ IPC_SYNC_MESSAGE_CONTROL2_1(AutomationMsg_CaptureEntirePageAsPNG, // Notify the JavaScript engine in the render to change its parameters // while performing stress testing. -IPC_MESSAGE_ROUTED3(AutomationMsg_JavaScriptStressTestControl, - int /* tab handle */, - int /* command */, - int /* type or run */) +IPC_MESSAGE_CONTROL3(AutomationMsg_JavaScriptStressTestControl, + int /* tab handle */, + int /* command */, + int /* type or run */) // This message posts a task to the PROCESS_LAUNCHER thread. Once processed // the response is sent back. This is useful when you want to make sure all // changes to the number of processes have completed. IPC_SYNC_MESSAGE_CONTROL0_0(AutomationMsg_WaitForProcessLauncherThreadToGoIdle) + +// Gets a handle of the browser that owns the given tab. +IPC_SYNC_MESSAGE_CONTROL1_2(AutomationMsg_GetParentBrowserOfTab, + int /* tab handle */, + int /* browser handle */, + bool /* success */) diff --git a/chrome/common/child_process.cc b/chrome/common/child_process.cc deleted file mode 100644 index e32bb1b..0000000 --- a/chrome/common/child_process.cc +++ /dev/null @@ -1,112 +0,0 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "chrome/common/child_process.h" - -#if defined(OS_POSIX) -#include // For SigUSR1Handler below. -#endif - -#include "base/message_loop.h" -#include "base/process_util.h" -#include "base/string_number_conversions.h" -#include "base/threading/thread.h" -#include "base/utf_string_conversions.h" -#include "chrome/common/child_thread.h" -#include "grit/chromium_strings.h" - -#if defined(OS_POSIX) -static void SigUSR1Handler(int signal) { } -#endif - -ChildProcess* ChildProcess::child_process_; - -ChildProcess::ChildProcess() - : ref_count_(0), - shutdown_event_(true, false), - io_thread_("Chrome_ChildIOThread") { - DCHECK(!child_process_); - child_process_ = this; - - io_thread_.StartWithOptions(base::Thread::Options(MessageLoop::TYPE_IO, 0)); -} - -ChildProcess::~ChildProcess() { - DCHECK(child_process_ == this); - - // Signal this event before destroying the child process. That way all - // background threads can cleanup. - // For example, in the renderer the RenderThread instances will be able to - // notice shutdown before the render process begins waiting for them to exit. - shutdown_event_.Signal(); - - // Kill the main thread object before nulling child_process_, since - // destruction code might depend on it. - main_thread_.reset(); - - child_process_ = NULL; -} - -ChildThread* ChildProcess::main_thread() { - return main_thread_.get(); -} - -void ChildProcess::set_main_thread(ChildThread* thread) { - main_thread_.reset(thread); -} - -void ChildProcess::AddRefProcess() { - DCHECK(!main_thread_.get() || // null in unittests. - MessageLoop::current() == main_thread_->message_loop()); - ref_count_++; -} - -void ChildProcess::ReleaseProcess() { - DCHECK(!main_thread_.get() || // null in unittests. - MessageLoop::current() == main_thread_->message_loop()); - DCHECK(ref_count_); - DCHECK(child_process_); - if (--ref_count_) - return; - - if (main_thread_.get()) // null in unittests. - main_thread_->OnProcessFinalRelease(); -} - -base::WaitableEvent* ChildProcess::GetShutDownEvent() { - DCHECK(child_process_); - return &child_process_->shutdown_event_; -} - -void ChildProcess::WaitForDebugger(const std::wstring& label) { -#if defined(OS_WIN) -#if defined(GOOGLE_CHROME_BUILD) - std::wstring title = L"Google Chrome"; -#else // CHROMIUM_BUILD - std::wstring title = L"Chromium"; -#endif // CHROMIUM_BUILD - title += L" "; - title += label; // makes attaching to process easier - std::wstring message = label; - message += L" starting with pid: "; - message += UTF8ToWide(base::IntToString(base::GetCurrentProcId())); - ::MessageBox(NULL, message.c_str(), title.c_str(), - MB_OK | MB_SETFOREGROUND); -#elif defined(OS_POSIX) - // TODO(playmobil): In the long term, overriding this flag doesn't seem - // right, either use our own flag or open a dialog we can use. - // This is just to ease debugging in the interim. - LOG(ERROR) << label - << " (" - << getpid() - << ") paused waiting for debugger to attach @ pid"; - // Install a signal handler so that pause can be woken. - struct sigaction sa; - memset(&sa, 0, sizeof(sa)); - sa.sa_handler = SigUSR1Handler; - sigaction(SIGUSR1, &sa, NULL); - - pause(); -#endif // defined(OS_POSIX) -} diff --git a/chrome/common/child_process.h b/chrome/common/child_process.h deleted file mode 100644 index c656317..0000000 --- a/chrome/common/child_process.h +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef CHROME_COMMON_CHILD_PROCESS_H__ -#define CHROME_COMMON_CHILD_PROCESS_H__ -#pragma once - -#include "base/basictypes.h" -#include "base/scoped_ptr.h" -#include "base/threading/thread.h" -#include "base/synchronization/waitable_event.h" - -class ChildThread; - -// Base class for child processes of the browser process (i.e. renderer and -// plugin host). This is a singleton object for each child process. -class ChildProcess { - public: - // Child processes should have an object that derives from this class. - ChildProcess(); - virtual ~ChildProcess(); - - // Getter for the child process' main thread. - ChildThread* main_thread(); - void set_main_thread(ChildThread* thread); - - MessageLoop* io_message_loop() { return io_thread_.message_loop(); } - - // A global event object that is signalled when the main thread's message - // loop exits. This gives background threads a way to observe the main - // thread shutting down. This can be useful when a background thread is - // waiting for some information from the browser process. If the browser - // process goes away prematurely, the background thread can at least notice - // the child processes's main thread exiting to determine that it should give - // up waiting. - // For example, see the renderer code used to implement - // webkit_glue::GetCookies. - base::WaitableEvent* GetShutDownEvent(); - - // These are used for ref-counting the child process. The process shuts - // itself down when the ref count reaches 0. - // For example, in the renderer process, generally each tab managed by this - // process will hold a reference to the process, and release when closed. - void AddRefProcess(); - void ReleaseProcess(); - - // Getter for the one ChildProcess object for this process. - static ChildProcess* current() { return child_process_; } - - static void WaitForDebugger(const std::wstring& label); - private: - int ref_count_; - - // An event that will be signalled when we shutdown. - base::WaitableEvent shutdown_event_; - - // The thread that handles IO events. - base::Thread io_thread_; - - // NOTE: make sure that main_thread_ is listed after shutdown_event_, since - // it depends on it (indirectly through IPC::SyncChannel). Same for - // io_thread_. - scoped_ptr main_thread_; - - // The singleton instance for this process. - static ChildProcess* child_process_; - - DISALLOW_COPY_AND_ASSIGN(ChildProcess); -}; - -#endif // CHROME_COMMON_CHILD_PROCESS_H__ diff --git a/chrome/common/child_process_host.cc b/chrome/common/child_process_host.cc index 1b6459a..a74d0e1 100644 --- a/chrome/common/child_process_host.cc +++ b/chrome/common/child_process_host.cc @@ -12,7 +12,7 @@ #include "chrome/common/chrome_constants.h" #include "chrome/common/chrome_paths_internal.h" #include "chrome/common/chrome_switches.h" -#include "chrome/common/plugin_messages.h" +#include "content/common/child_process_messages.h" #include "ipc/ipc_logging.h" #if defined(OS_LINUX) @@ -129,10 +129,10 @@ bool ChildProcessHost::CreateChannel() { // Make sure these messages get sent first. #if defined(IPC_MESSAGE_LOG_ENABLED) bool enabled = IPC::Logging::GetInstance()->Enabled(); - Send(new PluginProcessMsg_SetIPCLoggingEnabled(enabled)); + Send(new ChildProcessMsg_SetIPCLoggingEnabled(enabled)); #endif - Send(new PluginProcessMsg_AskBeforeShutdown()); + Send(new ChildProcessMsg_AskBeforeShutdown()); opening_channel_ = true; @@ -196,9 +196,9 @@ bool ChildProcessHost::ListenerHook::OnMessageReceived( } } - if (!handled && msg.type() == PluginProcessHostMsg_ShutdownRequest::ID) { + if (!handled && msg.type() == ChildProcessHostMsg_ShutdownRequest::ID) { if (host_->CanShutdown()) - host_->Send(new PluginProcessMsg_Shutdown()); + host_->Send(new ChildProcessMsg_Shutdown()); handled = true; } @@ -234,5 +234,5 @@ void ChildProcessHost::ListenerHook::OnChannelError() { } void ChildProcessHost::ForceShutdown() { - Send(new PluginProcessMsg_Shutdown()); + Send(new ChildProcessMsg_Shutdown()); } diff --git a/chrome/common/child_thread.cc b/chrome/common/child_thread.cc deleted file mode 100644 index dd74aee..0000000 --- a/chrome/common/child_thread.cc +++ /dev/null @@ -1,207 +0,0 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "chrome/common/child_thread.h" - -#include "base/message_loop.h" -#include "base/string_util.h" -#include "base/command_line.h" -#include "chrome/common/child_process.h" -#include "chrome/common/chrome_switches.h" -#include "chrome/common/file_system/file_system_dispatcher.h" -#include "chrome/common/notification_service.h" -#include "chrome/common/plugin_messages.h" -#include "chrome/common/resource_dispatcher.h" -#include "chrome/common/socket_stream_dispatcher.h" -#include "ipc/ipc_logging.h" -#include "ipc/ipc_message.h" -#include "ipc/ipc_sync_channel.h" -#include "ipc/ipc_sync_message_filter.h" -#include "ipc/ipc_switches.h" -#include "webkit/glue/webkit_glue.h" - -ChildThread::ChildThread() { - channel_name_ = CommandLine::ForCurrentProcess()->GetSwitchValueASCII( - switches::kProcessChannelID); - Init(); -} - -ChildThread::ChildThread(const std::string& channel_name) - : channel_name_(channel_name) { - Init(); -} - -void ChildThread::Init() { - check_with_browser_before_shutdown_ = false; - on_channel_error_called_ = false; - message_loop_ = MessageLoop::current(); - if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kUserAgent)) { - webkit_glue::SetUserAgent( - CommandLine::ForCurrentProcess()->GetSwitchValueASCII( - switches::kUserAgent)); - } - - channel_.reset(new IPC::SyncChannel(channel_name_, - IPC::Channel::MODE_CLIENT, this, - ChildProcess::current()->io_message_loop(), true, - ChildProcess::current()->GetShutDownEvent())); -#ifdef IPC_MESSAGE_LOG_ENABLED - IPC::Logging::GetInstance()->SetIPCSender(this); -#endif - - resource_dispatcher_.reset(new ResourceDispatcher(this)); - socket_stream_dispatcher_.reset(new SocketStreamDispatcher()); - file_system_dispatcher_.reset(new FileSystemDispatcher()); - - sync_message_filter_ = - new IPC::SyncMessageFilter(ChildProcess::current()->GetShutDownEvent()); - channel_->AddFilter(sync_message_filter_.get()); - - // When running in unit tests, there is already a NotificationService object. - // Since only one can exist at a time per thread, check first. - if (!NotificationService::current()) - notification_service_.reset(new NotificationService); -} - -ChildThread::~ChildThread() { -#ifdef IPC_MESSAGE_LOG_ENABLED - IPC::Logging::GetInstance()->SetIPCSender(NULL); -#endif - - channel_->RemoveFilter(sync_message_filter_.get()); - - // Close this channel before resetting the message loop attached to it so - // the message loop can call ChannelProxy::Context::OnChannelClosed(), which - // releases the reference count to this channel. - channel_->Close(); - - // The ChannelProxy object caches a pointer to the IPC thread, so need to - // reset it as it's not guaranteed to outlive this object. - // NOTE: this also has the side-effect of not closing the main IPC channel to - // the browser process. This is needed because this is the signal that the - // browser uses to know that this process has died, so we need it to be alive - // until this process is shut down, and the OS closes the handle - // automatically. We used to watch the object handle on Windows to do this, - // but it wasn't possible to do so on POSIX. - channel_->ClearIPCMessageLoop(); -} - -void ChildThread::OnChannelError() { - set_on_channel_error_called(true); - MessageLoop::current()->Quit(); -} - -bool ChildThread::Send(IPC::Message* msg) { - if (!channel_.get()) { - delete msg; - return false; - } - - return channel_->Send(msg); -} - -void ChildThread::AddRoute(int32 routing_id, IPC::Channel::Listener* listener) { - DCHECK(MessageLoop::current() == message_loop()); - - router_.AddRoute(routing_id, listener); -} - -void ChildThread::RemoveRoute(int32 routing_id) { - DCHECK(MessageLoop::current() == message_loop()); - - router_.RemoveRoute(routing_id); -} - -IPC::Channel::Listener* ChildThread::ResolveRoute(int32 routing_id) { - DCHECK(MessageLoop::current() == message_loop()); - - return router_.ResolveRoute(routing_id); -} - -webkit_glue::ResourceLoaderBridge* ChildThread::CreateBridge( - const webkit_glue::ResourceLoaderBridge::RequestInfo& request_info, - int host_renderer_id, - int host_render_view_id) { - return resource_dispatcher()-> - CreateBridge(request_info, host_renderer_id, host_render_view_id); -} - -ResourceDispatcher* ChildThread::resource_dispatcher() { - return resource_dispatcher_.get(); -} - -IPC::SyncMessageFilter* ChildThread::sync_message_filter() { - return sync_message_filter_; -} - -MessageLoop* ChildThread::message_loop() { - return message_loop_; -} - -bool ChildThread::OnMessageReceived(const IPC::Message& msg) { - // Resource responses are sent to the resource dispatcher. - if (resource_dispatcher_->OnMessageReceived(msg)) - return true; - if (socket_stream_dispatcher_->OnMessageReceived(msg)) - return true; - if (file_system_dispatcher_->OnMessageReceived(msg)) - return true; - - bool handled = true; - IPC_BEGIN_MESSAGE_MAP(ChildThread, msg) - IPC_MESSAGE_HANDLER(PluginProcessMsg_AskBeforeShutdown, OnAskBeforeShutdown) - IPC_MESSAGE_HANDLER(PluginProcessMsg_Shutdown, OnShutdown) -#if defined(IPC_MESSAGE_LOG_ENABLED) - IPC_MESSAGE_HANDLER(PluginProcessMsg_SetIPCLoggingEnabled, - OnSetIPCLoggingEnabled) -#endif - IPC_MESSAGE_UNHANDLED(handled = false) - IPC_END_MESSAGE_MAP() - - if (handled) - return true; - - if (msg.routing_id() == MSG_ROUTING_CONTROL) - return OnControlMessageReceived(msg); - - return router_.OnMessageReceived(msg); -} - -bool ChildThread::OnControlMessageReceived(const IPC::Message& msg) { - return false; -} - -void ChildThread::OnAskBeforeShutdown() { - check_with_browser_before_shutdown_ = true; -} - -void ChildThread::OnShutdown() { - MessageLoop::current()->Quit(); -} - -#if defined(IPC_MESSAGE_LOG_ENABLED) -void ChildThread::OnSetIPCLoggingEnabled(bool enable) { - if (enable) - IPC::Logging::GetInstance()->Enable(); - else - IPC::Logging::GetInstance()->Disable(); -} -#endif // IPC_MESSAGE_LOG_ENABLED - -ChildThread* ChildThread::current() { - return ChildProcess::current()->main_thread(); -} - -void ChildThread::OnProcessFinalRelease() { - if (on_channel_error_called_ || !check_with_browser_before_shutdown_) { - MessageLoop::current()->Quit(); - return; - } - - // The child process shutdown sequence is a request response based mechanism, - // where we send out an initial feeler request to the child process host - // instance in the browser to verify if it's ok to shutdown the child process. - // The browser then sends back a response if it's ok to shutdown. - Send(new PluginProcessHostMsg_ShutdownRequest); -} diff --git a/chrome/common/child_thread.h b/chrome/common/child_thread.h deleted file mode 100644 index 4537f1b..0000000 --- a/chrome/common/child_thread.h +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef CHROME_COMMON_CHILD_THREAD_H_ -#define CHROME_COMMON_CHILD_THREAD_H_ -#pragma once - -#include "base/basictypes.h" -#include "base/scoped_ptr.h" -#include "chrome/common/message_router.h" -#include "ipc/ipc_message.h" -#include "webkit/glue/resource_loader_bridge.h" - -class FileSystemDispatcher; -class MessageLoop; -class NotificationService; -class ResourceDispatcher; -class SocketStreamDispatcher; - -namespace IPC { -class SyncChannel; -class SyncMessageFilter; -} - -// The main thread of a child process derives from this class. -class ChildThread : public IPC::Channel::Listener, - public IPC::Message::Sender { - public: - // Creates the thread. - ChildThread(); - // Used for single-process mode. - explicit ChildThread(const std::string& channel_name); - virtual ~ChildThread(); - - // IPC::Message::Sender implementation: - virtual bool Send(IPC::Message* msg); - - // See documentation on MessageRouter for AddRoute and RemoveRoute - void AddRoute(int32 routing_id, IPC::Channel::Listener* listener); - void RemoveRoute(int32 routing_id); - - IPC::Channel::Listener* ResolveRoute(int32 routing_id); - - // Creates a ResourceLoaderBridge. - // Tests can override this method if they want a custom loading behavior. - virtual webkit_glue::ResourceLoaderBridge* CreateBridge( - const webkit_glue::ResourceLoaderBridge::RequestInfo& request_info, - int host_renderer_id, - int host_render_view_id); - - ResourceDispatcher* resource_dispatcher(); - - SocketStreamDispatcher* socket_stream_dispatcher() { - return socket_stream_dispatcher_.get(); - } - - FileSystemDispatcher* file_system_dispatcher() const { - return file_system_dispatcher_.get(); - } - - // Safe to call on any thread, as long as it's guaranteed that the thread's - // lifetime is less than the main thread. - IPC::SyncMessageFilter* sync_message_filter(); - - MessageLoop* message_loop(); - - // Returns the one child thread. - static ChildThread* current(); - - protected: - friend class ChildProcess; - - // Called when the process refcount is 0. - void OnProcessFinalRelease(); - - virtual bool OnControlMessageReceived(const IPC::Message& msg); - virtual void OnAskBeforeShutdown(); - virtual void OnShutdown(); - -#ifdef IPC_MESSAGE_LOG_ENABLED - virtual void OnSetIPCLoggingEnabled(bool enable); -#endif - - IPC::SyncChannel* channel() { return channel_.get(); } - - void set_on_channel_error_called(bool on_channel_error_called) { - on_channel_error_called_ = on_channel_error_called; - } - - private: - void Init(); - - // IPC::Channel::Listener implementation: - virtual bool OnMessageReceived(const IPC::Message& msg); - virtual void OnChannelError(); - - std::string channel_name_; - scoped_ptr channel_; - - // Allows threads other than the main thread to send sync messages. - scoped_refptr sync_message_filter_; - - // Implements message routing functionality to the consumers of ChildThread. - MessageRouter router_; - - // Handles resource loads for this process. - scoped_ptr resource_dispatcher_; - - // Handles SocketStream for this process. - scoped_ptr socket_stream_dispatcher_; - - // If true, checks with the browser process before shutdown. This avoids race - // conditions if the process refcount is 0 but there's an IPC message inflight - // that would addref it. - bool check_with_browser_before_shutdown_; - - // The OnChannelError() callback was invoked - the channel is dead, don't - // attempt to communicate. - bool on_channel_error_called_; - - MessageLoop* message_loop_; - - scoped_ptr notification_service_; - - scoped_ptr file_system_dispatcher_; - - DISALLOW_COPY_AND_ASSIGN(ChildThread); -}; - -#endif // CHROME_COMMON_CHILD_THREAD_H_ diff --git a/chrome/common/chrome_constants.cc b/chrome/common/chrome_constants.cc index 0cb0fca..43c36a4 100644 --- a/chrome/common/chrome_constants.cc +++ b/chrome/common/chrome_constants.cc @@ -118,8 +118,6 @@ const int kStatsMaxThreads = 32; const int kStatsMaxCounters = 3000; const size_t kMaxTitleChars = 4 * 1024; -const size_t kMaxURLChars = 2 * 1024 * 1024; -const size_t kMaxURLDisplayChars = 32 * 1024; // We don't enable record mode in the released product because users could // potentially be tricked into running a product in record mode without diff --git a/chrome/common/chrome_constants.h b/chrome/common/chrome_constants.h index 56be2f8..c94ac25 100644 --- a/chrome/common/chrome_constants.h +++ b/chrome/common/chrome_constants.h @@ -78,14 +78,6 @@ extern const int kStatsMaxCounters; // The maximum number of characters of the document's title that we're willing // to accept in the browser process. extern const size_t kMaxTitleChars; -// The maximum number of characters in the URL that we're willing to accept -// in the browser process. It is set low enough to avoid damage to the browser -// but high enough that a web site can abuse location.hash for a little storage. -// We have different values for "max accepted" and "max displayed" because -// a data: URI may be legitimately massive, but the full URI would kill all -// known operating systems if you dropped it into a UI control. -extern const size_t kMaxURLChars; -extern const size_t kMaxURLDisplayChars; extern const bool kRecordModeEnabled; diff --git a/chrome/common/chrome_paths.cc b/chrome/common/chrome_paths.cc index 584bd9e..afa0b7a 100644 --- a/chrome/common/chrome_paths.cc +++ b/chrome/common/chrome_paths.cc @@ -30,6 +30,27 @@ const FilePath::CharType kInternalFlashPluginFileName[] = FILE_PATH_LITERAL("libgcflashplayer.so"); #endif +// File name of the internal PDF plugin on different platforms. +const FilePath::CharType kInternalPDFPluginFileName[] = +#if defined(OS_WIN) + FILE_PATH_LITERAL("pdf.dll"); +#elif defined(OS_MACOSX) + FILE_PATH_LITERAL("PDF.plugin"); +#else // Linux and Chrome OS + FILE_PATH_LITERAL("libpdf.so"); +#endif + +// File name of the internal NaCl plugin on different platforms. +const FilePath::CharType kInternalNaClPluginFileName[] = +#if defined(OS_WIN) + FILE_PATH_LITERAL("ppGoogleNaClPluginChrome.dll"); +#elif defined(OS_MACOSX) + // TODO(noelallen) Please verify this extention name is correct. + FILE_PATH_LITERAL("ppGoogleNaClPluginChrome.plugin"); +#else // Linux and Chrome OS + FILE_PATH_LITERAL("libppGoogleNaClPluginChrome.so"); +#endif + } // namespace namespace chrome { @@ -230,25 +251,12 @@ bool PathProvider(int key, FilePath* result) { case chrome::FILE_PDF_PLUGIN: if (!GetInternalPluginsDirectory(&cur)) return false; -#if defined(OS_WIN) - cur = cur.Append(FILE_PATH_LITERAL("pdf.dll")); -#elif defined(OS_MACOSX) - cur = cur.Append(FILE_PATH_LITERAL("PDF.plugin")); -#else // Linux and Chrome OS - cur = cur.Append(FILE_PATH_LITERAL("libpdf.so")); -#endif + cur = cur.Append(kInternalPDFPluginFileName); break; case chrome::FILE_NACL_PLUGIN: if (!GetInternalPluginsDirectory(&cur)) return false; -#if defined(OS_WIN) - cur = cur.Append(FILE_PATH_LITERAL("ppGoogleNaClPluginChrome.dll")); -#elif defined(OS_MACOSX) - // TODO(noelallen) Please verify this extention name is correct. - cur = cur.Append(FILE_PATH_LITERAL("ppGoogleNaClPluginChrome.plugin")); -#else // Linux and Chrome OS - cur = cur.Append(FILE_PATH_LITERAL("libppGoogleNaClPluginChrome.so")); -#endif + cur = cur.Append(kInternalNaClPluginFileName); break; case chrome::FILE_RESOURCES_PACK: #if defined(OS_MACOSX) diff --git a/chrome/common/chrome_paths_linux.cc b/chrome/common/chrome_paths_linux.cc index a7fdb07..ff525db 100644 --- a/chrome/common/chrome_paths_linux.cc +++ b/chrome/common/chrome_paths_linux.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -10,6 +10,14 @@ #include "base/scoped_ptr.h" #include "base/nix/xdg_util.h" +namespace { + +const char kDotConfigDir[] = ".config"; +const char kDownloadsDir[] = "Downloads"; +const char kXdgConfigHomeEnvVar[] = "XDG_CONFIG_HOME"; + +} // namespace + namespace chrome { // See http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html @@ -19,8 +27,9 @@ namespace chrome { // (This also helps us sidestep issues with other apps grabbing ~/.chromium .) bool GetDefaultUserDataDirectory(FilePath* result) { scoped_ptr env(base::Environment::Create()); - FilePath config_dir( - base::nix::GetXDGDirectory(env.get(), "XDG_CONFIG_HOME", ".config")); + FilePath config_dir(base::nix::GetXDGDirectory(env.get(), + kXdgConfigHomeEnvVar, + kDotConfigDir)); #if defined(GOOGLE_CHROME_BUILD) *result = config_dir.Append("google-chrome"); #else @@ -46,8 +55,9 @@ void GetUserCacheDirectory(const FilePath& profile_dir, FilePath* result) { FilePath cache_dir; if (!PathService::Get(base::DIR_CACHE, &cache_dir)) return; - FilePath config_dir( - base::nix::GetXDGDirectory(env.get(), "XDG_CONFIG_HOME", ".config")); + FilePath config_dir(base::nix::GetXDGDirectory(env.get(), + kXdgConfigHomeEnvVar, + kDotConfigDir)); if (!config_dir.AppendRelativePath(profile_dir, &cache_dir)) return; @@ -57,8 +67,9 @@ void GetUserCacheDirectory(const FilePath& profile_dir, FilePath* result) { bool GetChromeFrameUserDataDirectory(FilePath* result) { scoped_ptr env(base::Environment::Create()); - FilePath config_dir( - base::nix::GetXDGDirectory(env.get(), "XDG_CONFIG_HOME", ".config")); + FilePath config_dir(base::nix::GetXDGDirectory(env.get(), + kXdgConfigHomeEnvVar, + kDotConfigDir)); #if defined(GOOGLE_CHROME_BUILD) *result = config_dir.Append("google-chrome-frame"); #else @@ -77,18 +88,19 @@ bool GetUserDocumentsDirectory(FilePath* result) { // ~ or their desktop directory, in which case we default to ~/Downloads. bool GetUserDownloadsDirectory(FilePath* result) { scoped_ptr env(base::Environment::Create()); - *result = base::nix::GetXDGUserDirectory(env.get(), "DOWNLOAD", "Downloads"); + *result = base::nix::GetXDGUserDirectory(env.get(), "DOWNLOAD", + kDownloadsDir); FilePath home = file_util::GetHomeDir(); if (*result == home) { - *result = home.Append("Downloads"); + *result = home.Append(kDownloadsDir); return true; } FilePath desktop; GetUserDesktop(&desktop); if (*result == desktop) { - *result = home.Append("Downloads"); + *result = home.Append(kDownloadsDir); } return true; diff --git a/chrome/common/chrome_switches.cc b/chrome/common/chrome_switches.cc index c4d19bf..aefed69 100644 --- a/chrome/common/chrome_switches.cc +++ b/chrome/common/chrome_switches.cc @@ -5,7 +5,6 @@ #include "chrome/common/chrome_switches.h" #include "base/base_switches.h" -#include "base/command_line.h" namespace switches { @@ -18,10 +17,6 @@ namespace switches { // is launched on the command line (e.g. by Selenium). Only needed on Mac. const char kActivateOnLaunch[] = "activate-on-launch"; -// By default, file:// URIs cannot read other file:// URIs. This is an -// override for developers who need the old behavior for testing. -const char kAllowFileAccessFromFiles[] = "allow-file-access-from-files"; - // On ChromeOS, file:// access is disabled except for certain whitelisted // directories. This switch re-enables file:// for testing. const char kAllowFileAccess[] = "allow-file-access"; @@ -35,9 +30,6 @@ const char kAllowOutdatedPlugins[] = "allow-outdated-plugins"; // connections. const char kAllowSSLMITMProxies[] = "allow-ssl-mitm-proxies"; -// Allows debugging of sandboxed processes (see zygote_main_linux.cc). -const char kAllowSandboxDebugging[] = "allow-sandbox-debugging"; - // Allows injecting extensions and user scripts on the extensions // gallery site. Normally prevented for security reasons, but can be // useful for automation testing of the gallery. @@ -150,6 +142,10 @@ const char kDebugPrint[] = "debug-print"; // device management backend. const char kDeviceManagementUrl[] = "device-management-url"; +// Specifies the directory in which to store the shared device policy cache +// file. If not specified, device policy will be disabled. +const char kDevicePolicyCacheDir[] = "device-policy-cache-dir"; + // Triggers a pletora of diagnostic modes. const char kDiagnostics[] = "diagnostics"; @@ -163,6 +159,9 @@ const char kDisable3DAPIs[] = "disable-3d-apis"; const char kDisableAcceleratedCompositing[] = "disable-accelerated-compositing"; +// Disables the hardware acceleration of 3D CSS and animation. +const char kDisableAcceleratedLayers[] = "disable-accelerated-layers"; + // Disables GPU accelerated video display. const char kDisableAcceleratedVideo[] = "disable-accelerated-video"; @@ -195,9 +194,8 @@ const char kDisableBackgroundMode[] = "disable-background-mode"; // in the measurements. const char kDisableBackgroundNetworking[] = "disable-background-networking"; -// Disable limits on the number of backing stores. Can prevent blinking for -// users with many windows/tabs and lots of memory. -const char kDisableBackingStoreLimit[] = "disable-backing-store-limit"; +// Disable the Confirm to Quit experiment (Mac only). +const char kDisableConfirmToQuit[] = "disable-confirm-to-quit"; // Disables blocked content warning animation. Currently shows animation for // blocked pop-ups only. @@ -240,9 +238,6 @@ const char kDisableExtensions[] = "disable-extensions"; const char kDisableExtensionsFileAccessCheck[] = "disable-extensions-file-access-check"; -// Disable FileSystem API. -const char kDisableFileSystem[] = "disable-file-system"; - // Disables the sandbox for the built-in flash player. const char kDisableFlashSandbox[] = "disable-flash-sandbox"; @@ -255,10 +250,6 @@ const char kDisableGLMultisampling[] = "disable-gl-multisampling"; // Disable the GLSL translator. const char kDisableGLSLTranslator[] = "disable-glsl-translator"; -// Disable the thread that crashes the GPU process if it stops responding to -// messages. -const char kDisableGpuWatchdog[] = "disable-gpu-watchdog"; - // Suppresses hang monitor dialogs in renderer processes. This may allow slow // unload handlers on a page to prevent the tab from closing, but the Task // Manager can be used to terminate the offending process in this case. @@ -298,20 +289,10 @@ const char kDisableJava[] = "disable-java"; // Disable LocalStorage. const char kDisableLocalStorage[] = "disable-local-storage"; -// Force logging to be disabled. Logging is enabled by default in debug -// builds. -const char kDisableLogging[] = "disable-logging"; - // Whether we should prevent the new tab page from showing the first run // notification. const char kDisableNewTabFirstRun[] = "disable-new-tab-first-run"; -// Prevent plugins from running. -const char kDisablePlugins[] = "disable-plugins"; - -// Disable pop-up blocking. -const char kDisablePopupBlocking[] = "disable-popup-blocking"; - // Normally when the user attempts to navigate to a page that was the result of // a post we prompt to make sure they want to. This switch may be used to // disable that check. This switch is used during automated testing. @@ -362,8 +343,13 @@ const char kDisableSyncBookmarks[] = "disable-sync-bookmarks"; // Disable syncing of extensions. const char kDisableSyncExtensions[] = "disable-sync-extensions"; +#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_CHROMEOS) +// Enable syncing browser passwords. +const char kEnableSyncPasswords[] = "enable-sync-passwords"; +#else // Disable syncing browser passwords. const char kDisableSyncPasswords[] = "disable-sync-passwords"; +#endif // Disable syncing of preferences. const char kDisableSyncPreferences[] = "disable-sync-preferences"; @@ -392,9 +378,6 @@ const char kDisableWebResources[] = "disable-web-resources"; // Don't enforce the same-origin policy. (Used by people testing their sites.) const char kDisableWebSecurity[] = "disable-web-security"; -// Disable Web Sockets support. -const char kDisableWebSockets[] = "disable-web-sockets"; - // Disable WebKit's XSSAuditor. The XSSAuditor mitigates reflective XSS. const char kDisableXSSAuditor[] = "disable-xss-auditor"; @@ -430,9 +413,6 @@ extern const char kLogNetLog[] = "log-net-log"; // Enable gpu-accelerated 2d canvas. const char kEnableAccelerated2dCanvas[] = "enable-accelerated-2d-canvas"; -// Enables the hardware acceleration of 3D CSS and animation. -const char kEnableAcceleratedLayers[] = "enable-accelerated-layers"; - // Enables the hardware acceleration of plugins. const char kEnableAcceleratedPlugins[] = "enable-accelerated-plugins"; @@ -447,9 +427,6 @@ const char kEnableAeroPeekTabs[] = "enable-aero-peek-tabs"; // for more background. const char kEnableAuthNegotiatePort[] = "enable-auth-negotiate-port"; -// Enables the benchmarking extensions. -const char kEnableBenchmarking[] = "enable-benchmarking"; - // In the browser process this switch is used to enable or disable the // client-side phishing detection. In the renderer this switch is only enabled // if this switch is enabled in the browser and the user has opted in to UMA @@ -457,6 +434,13 @@ const char kEnableBenchmarking[] = "enable-benchmarking"; const char kEnableClientSidePhishingDetection[] = "enable-client-side-phishing-detection"; +// At this point, even if client-side phishing detection is enabled we will not, +// by default, display an interstitial if we detected a phishing site. Once +// we are confident that the false-positive rate is as low as expected we can +// remove this flag. +const char kEnableClientSidePhishingInterstitial[] = + "enable-client-side-phishing-interstitial"; + // This flag enables UI for clearing server data. Temporarily in place // until there's a server endpoint deployed. const char kEnableClearServerData[] = "enable-clear-server-data"; @@ -471,8 +455,8 @@ const char kEnableCloudPrintProxy[] = "enable-cloud-print-proxy"; // Enables the Cloud Print dialog hosting code. const char kEnableCloudPrint[] = "enable-cloud-print"; -// Enable the Confirm to Quit experiment. -const char kEnableConfirmToQuit[] = "enable-confirm-to-quit"; +// Enables compositing to texture instead of display. +const char kEnableCompositeToTexture[] = "enable-composite-to-texture"; // Enables establishing a backup TCP connection if a specified timeout is // exceeded. @@ -505,8 +489,11 @@ const char kEnableFastback[] = "enable-fastback"; // testing, for example page cycler and layout tests. See bug 1157243. const char kEnableFileCookies[] = "enable-file-cookies"; -// Enable FileSystem API URLs. -const char kEnableFileSystemURLScheme[] = "enable-filesystem-url-scheme"; +// Enable the use of the HistoryQuickProvider for autocomplete results. +const char kEnableHistoryQuickProvider[] = "enable-history-quick-provider"; + +// Enable the JavaScript Full Screen API. +const char kEnableFullScreen[] = "enable-fullscreen"; // Enable the in-browser thumbnailing, which is more efficient than the // in-renderer thumbnailing, as we can use more information to determine @@ -519,24 +506,12 @@ const char kEnableInBrowserThumbnailing[] = "enable-in-browser-thumbnailing"; // This flag overrides "disable-ipv6" which appears elswhere in this file. const char kEnableIPv6[] = "enable-ipv6"; -// Enable the GPU plugin and Pepper 3D rendering. -const char kEnableGPUPlugin[] = "enable-gpu-plugin"; - // Enable experimental JavaScript I18N API. const char kEnableJavaScriptI18NAPI[] = "enable-javascript-i18n-api"; -// Force logging to be enabled. Logging is disabled by default in release -// builds. -const char kEnableLogging[] = "enable-logging"; - // Allows reporting memory info (JS heap size) to page. const char kEnableMemoryInfo[] = "enable-memory-info"; -// On Windows, converts the page to the currently-installed monitor profile. -// This does NOT enable color management for images. The source is still -// assumed to be sRGB. -const char kEnableMonitorProfile[] = "enable-monitor-profile"; - // Runs the Native Client inside the renderer process and enables GPU plugin // (internally adds lEnableGpuPlugin to the command line). const char kEnableNaCl[] = "enable-nacl"; @@ -544,9 +519,6 @@ const char kEnableNaCl[] = "enable-nacl"; // Enables debugging via RSP over a socket. const char kEnableNaClDebug[] = "enable-nacl-debug"; -// Enable Native Web Worker support. -const char kEnableNativeWebWorkers[] = "enable-native-web-workers"; - // This applies only when the process type is "service". Enables the // Chromoting Host Process within the service process. const char kEnableRemoting[] = "enable-remoting"; @@ -555,12 +527,12 @@ const char kEnableRemoting[] = "enable-remoting"; const char kEnableResourceContentSettings[] = "enable-resource-content-settings"; +// Enable Pepper and JavaScript P2P API. +const char kEnableP2PApi[] = "enable-p2papi"; + // Enable speculative TCP/IP preconnection. const char kEnablePreconnect[] = "enable-preconnect"; -// Enable caching of pre-parsed JS script data. See http://crbug.com/32407. -const char kEnablePreparsedJsCaching[] = "enable-preparsed-js-caching"; - // Enable print preview (work in progress). const char kEnablePrintPreview[] = "enable-print-preview"; @@ -571,12 +543,6 @@ const char kEnableSearchProviderApiV2[] = "enable-search-provider-api-v2"; // Enables 0-RTT HTTPS handshakes. const char kEnableSnapStart[] = "enable-snap-start"; -// Enables speech input. -const char kEnableSpeechInput[] = "enable-speech-input"; - -// Enables StatsTable, logging statistics to a global named shared memory table. -const char kEnableStatsTable[] = "enable-stats-table"; - // Enable syncing browser data to a Google Account. const char kEnableSync[] = "enable-sync"; @@ -617,13 +583,6 @@ const char kEnableWatchdog[] = "enable-watchdog"; // Enable web audio API. const char kEnableWebAudio[] = "enable-webaudio"; -// Enables experimental features for the geolocation API. -// Current features: -// - CoreLocation support for Mac OS X 10.6 -// - Gateway location for Linux and Windows -// - Location platform support for Windows 7 -const char kExperimentalLocationFeatures[] = "experimental-location-features"; - // Enables experimental features for Spellchecker. Right now, the first // experimental feature is auto spell correct, which corrects words which are // misppelled by typing the word with two consecutive letters swapped. The @@ -658,6 +617,9 @@ const char kFeedbackServer[] = "feedback-server"; // gracefully. const char kFileDescriptorLimit[] = "file-descriptor-limit"; +// If true opening a url from the omnibox attepts to focus an existing tab. +const char kFocusExistingTabOnOpen[] = "focus-existing-tab-on-open"; + // Display the First Run experience when the browser is started, regardless of // whether or not it's actually the first run. const char kFirstRun[] = "first-run"; @@ -683,16 +645,6 @@ const char kForceFieldTestNameAndValue[] = "force-fieldtest"; // overrides this if present. const char kForceRendererAccessibility[] = "force-renderer-accessibility"; -// Extra command line options for launching the GPU process (normally used -// for debugging). Use like renderer-cmd-prefix. -const char kGpuLauncher[] = "gpu-launcher"; - -// Makes this process a GPU sub-process. -const char kGpuProcess[] = "gpu-process"; - -// Causes the GPU process to display a dialog on launch. -const char kGpuStartupDialog[] = "gpu-startup-dialog"; - // Specifies a custom name for the GSSAPI library to load. const char kGSSAPILibraryName[] = "gssapi-library-name"; @@ -774,19 +726,6 @@ const char kLoadExtension[] = "load-extension"; // Uninstall an extension with the specified extension id. const char kUninstallExtension[] = "uninstall-extension"; -// Load an NPAPI plugin from the specified path. -const char kLoadPlugin[] = "load-plugin"; - -// Load NPAPI plugins from the specified directory. -const char kExtraPluginDir[] = "extra-plugin-dir"; - -// Make plugin processes log their sent and received messages to VLOG(1). -const char kLogPluginMessages[] = "log-plugin-messages"; - -// Sets the minimum log level. Valid values are from 0 to 3: -// INFO = 0, WARNING = 1, LOG_ERROR = 2, LOG_FATAL = 3. -const char kLoggingLevel[] = "log-level"; - // Make Chrome default browser const char kMakeDefaultBrowser[] = "make-default-browser"; @@ -812,6 +751,9 @@ const char kMetricsRecordingOnly[] = "metrics-recording-only"; // The minimum version of Flash that implements the NPP_ClearSiteData API. const char kMinClearSiteDataFlashVersion[] = "min-clearsitedata-flash-version"; +// Enables multiprofile Chrome. +const char kMultiProfiles[] = "multi-profiles"; + // Sets the default IP address (interface) for the stub (normally 127.0.0.1). const char kNaClDebugIP[] = "nacl-debug-ip"; @@ -846,9 +788,6 @@ const char kNoExperiments[] = "no-experiments"; // you're for some reason tempted to pass them both. const char kNoFirstRun[] = "no-first-run"; -// Don't Sandbox the GPU process, does not affect other sandboxed processes. -const char kNoGpuSandbox[] = "no-gpu-sandbox"; - // Support a separate switch that enables the v8 playback extension. // The extension causes javascript calls to Date.now() and Math.random() // to return consistent values, such that subsequent loads of the same @@ -863,12 +802,14 @@ const char kNoPings[] = "no-pings"; // other proxy server flags that are passed. const char kNoProxyServer[] = "no-proxy-server"; -// Don't send HTTP-Referer headers. -const char kNoReferrers[] = "no-referrers"; - // Disables the sandbox for all process types that are normally sandboxed. const char kNoSandbox[] = "no-sandbox"; +// Disables the service process from adding itself as an autorun process. This +// does not delete existing autorun registrations, it just prevents the service +// from registering a new one. +const char kNoServiceAutorun[] = "no-service-autorun"; + // Does not automatically open a browser window on startup (used when launching // Chrome for the purpose of hosting background apps). const char kNoStartupWindow[] = "no-startup-window"; @@ -904,32 +845,6 @@ const char kPlaybackMode[] = "playback-mode"; // specifically) will store its state. const char kPluginDataDir[] = "plugin-data-dir"; -// Specifies a command that should be used to launch the plugin process. Useful -// for running the plugin process through purify or quantify. Ex: -// --plugin-launcher="path\to\purify /Run=yes" -const char kPluginLauncher[] = "plugin-launcher"; - -// Tells the plugin process the path of the plugin to load -const char kPluginPath[] = "plugin-path"; - -// Causes the process to run as a plugin subprocess. -const char kPluginProcess[] = "plugin"; - -// Causes the plugin process to display a dialog on launch. -const char kPluginStartupDialog[] = "plugin-startup-dialog"; - -// Runs PPAPI (Pepper) plugins out-of-process. -const char kPpapiOutOfProcess[] = "ppapi-out-of-process"; - -// Like kPluginLauncher for PPAPI plugins. -const char kPpapiPluginLauncher[] = "ppapi-plugin-launcher"; - -// Argument to the process type that indicates a PPAPI plugin process type. -const char kPpapiPluginProcess[] = "ppapi"; - -// Causes the PPAPI sub process to display a dialog on launch. -const char kPpapiStartupDialog[] = "ppapi-startup-dialog"; - // Controls speculative prerendering of pages, and content prefetching. Both // are dispatched from elements. const char kPrerender[] = "prerender"; @@ -946,22 +861,6 @@ const char kPrerenderSwitchValuePrefetchOnly[] = "prefetch_only"; // Prints the pages on the screen. const char kPrint[] = "print"; -// Runs a single process for each site (i.e., group of pages from the same -// registered domain) the user visits. We default to using a renderer process -// for each site instance (i.e., group of pages from the same registered -// domain with script connections to each other). -const char kProcessPerSite[] = "process-per-site"; - -// Runs each set of script-connected tabs (i.e., a BrowsingInstance) in its own -// renderer process. We default to using a renderer process for each -// site instance (i.e., group of pages from the same registered domain with -// script connections to each other). -const char kProcessPerTab[] = "process-per-tab"; - -// The value of this switch determines whether the process is started as a -// renderer or plugin host. If it's empty, it's the browser. -const char kProcessType[] = "type"; - // Output the product version information and quit. Used as an internal api to // detect the installed version of Chrome on Linux. const char kProductVersion[] = "product-version"; @@ -1019,9 +918,6 @@ const char kPurgeMemoryButton[] = "purge-memory-button"; // See also kPlaybackMode. const char kRecordMode[] = "record-mode"; -// Register pepper plugins that should be loaded into the renderer. -const char kRegisterPepperPlugins[] = "register-pepper-plugins"; - // Reload pages that have been killed when they are next focused by the user. const char kReloadKilledTabs[] = "reload-killed-tabs"; @@ -1039,28 +935,12 @@ const char kRendererAssertTest[] = "renderer-assert-test"; const char kRendererCheckFalseTest[] = "renderer-check-false-test"; #endif -// On POSIX only: the contents of this flag are prepended to the renderer -// command line. Useful values might be "valgrind" or "xterm -e gdb --args". -const char kRendererCmdPrefix[] = "renderer-cmd-prefix"; - -// Causes the renderer process to crash on launch. -const char kRendererCrashTest[] = "renderer-crash-test"; - -// Causes the process to run as renderer instead of as browser. -const char kRendererProcess[] = "renderer"; - -// Causes the renderer process to display a dialog on launch. -const char kRendererStartupDialog[] = "renderer-startup-dialog"; - // Indicates the last session should be restored on startup. This overrides // the preferences value and is primarily intended for testing. The value of // this switch is the number of tabs to wait until loaded before // 'load completed' is sent to the ui_test. const char kRestoreLastSession[] = "restore-last-session"; -// Runs the plugin processes inside the sandbox. -const char kSafePlugins[] = "safe-plugins"; - // URL prefix used by safebrowsing to fetch hash, download data and // report malware. const char kSbInfoURLPrefix[] = "safebrowsing-info-url-prefix"; @@ -1077,6 +957,13 @@ const char kSbDisableAutoUpdate[] = "safebrowsing-disable-auto-update"; // to make sure the content are not malicious. const char kSbEnableDownloadProtection[] = "safebrowsing-download-protection"; +// This flag is used together with kSbEnableDownloadProtection. When that flag +// is present but this flag is absent, we won't show the warning ui. The purpose +// of this flag is to make sure we roll out download url detection smoothly. +// We will remove this flag once we verify that the download url detection works +// as expectecd according to UMA reports. +const char kSbEnableDownloadWarningUI[] = "safebrowsing-download-warning-ui"; + // Enable support for SDCH filtering (dictionary based expansion of content). // Optional argument is *the* only domain name that will have SDCH suppport. // Default is "-enable-sdch" to advertise SDCH on all domains. @@ -1101,6 +988,13 @@ const char kShowIcons[] = "show-icons"; // layer compositing. const char kShowCompositedLayerBorders[] = "show-composited-layer-borders"; +// Draws a textual dump of the compositor layer tree to help debug and study +// layer compositing. +const char kShowCompositedLayerTree[] = "show-composited-layer-tree"; + +// Draws a FPS indicator +const char kShowFPSCounter[] = "show-fps-counter"; + // Visibly render a border around paint rects in the web page to help debug // and study painting behavior. const char kShowPaintRects[] = "show-paint-rects"; @@ -1117,9 +1011,6 @@ const char kSilentDumpOnDCHECK[] = "silent-dump-on-dcheck"; // is cleaned up and playback testing completed. const char kSimpleDataSource[] = "simple-data-source"; -// Runs the renderer and plugins in the same process as the browser -const char kSingleProcess[] = "single-process"; - // Start the browser maximized, regardless of any previous settings. const char kStartMaximized[] = "start-maximized"; @@ -1149,12 +1040,12 @@ const char kSyncServiceURL[] = "sync-url"; // Try to connect to XMPP using SSLTCP first (for testing). const char kSyncTrySsltcpFirstForXmpp[] = "sync-try-ssltcp-first-for-xmpp"; +// Use new experimental SyncerThread implementation and friends. +const char kNewSyncerThread[] = "new-syncer-thread"; + // Pass the name of the current running automated test to Chrome. const char kTestName[] = "test-name"; -// Runs the security test for the renderer sandbox. -const char kTestSandbox[] = "test-sandbox"; - // Runs the security test for the NaCl loader sandbox. const char kTestNaClSandbox[] = "test-nacl-sandbox"; @@ -1189,23 +1080,6 @@ const char kMaxSpdySessionsPerDomain[] = "max-spdy-sessions-per-domain"; // Set the maximum concurrent streams over a SPDY session. const char kMaxSpdyConcurrentStreams[] = "max-spdy-concurrent-streams"; -// Grant unlimited quota to store files to this process. -// Used for testing Pepper's FileRef/FileIO/FileSystem implementations. -// DO NOT USE FOR OTHER PURPOSES. -// TODO(dumi): remove the switch when we have a real quota implementation. -const char kUnlimitedQuotaForFiles[] = "unlimited-quota-for-files"; - -// This is for testing IndexedDB and will give any website you visit unlimited -// quota in IndexedDB. This should only be used for development and not general -// browsing. It is ignored in single process mode. -const char kUnlimitedQuotaForIndexedDB[] = "unlimited-quota-for-indexeddb"; - -// Use the low fragmentation heap for the CRT. -const char kUseLowFragHeapCrt[] = "use-lf-heap"; - -// A string used to override the default user agent with a custom one. -const char kUserAgent[] = "user-agent"; - // Specifies the user data directory, which is where the browser will look // for all of its state. const char kUserDataDir[] = "user-data-dir"; @@ -1228,31 +1102,10 @@ const char kUtilityProcessAllowedDir[] = "utility-allowed-dir"; // Print version information and quit. const char kVersion[] = "version"; -// Will add kWaitForDebugger to every child processes. If a value is passed, it -// will be used as a filter to determine if the child process should have the -// kWaitForDebugger flag passed on or not. -const char kWaitForDebuggerChildren[] = "wait-for-debugger-children"; - -// Causes the worker process allocation to use as many processes as cores. -const char kWebWorkerProcessPerCore[] = "web-worker-process-per-core"; - -// Causes workers to run together in one process, depending on their domains. -// Note this is duplicated in webworkerclient_impl.cc -const char kWebWorkerShareProcesses[] = "web-worker-share-processes"; - // Use WinHTTP to fetch and evaluate PAC scripts. Otherwise the default is // to use Chromium's network stack to fetch, and V8 to evaluate. const char kWinHttpProxyResolver[] = "winhttp-proxy-resolver"; -// Causes the process to run as a worker subprocess. -const char kWorkerProcess[] = "worker"; - -// The prefix used when starting the zygote process. (i.e. 'gdb --args') -const char kZygoteCmdPrefix[] = "zygote-cmd-prefix"; - -// Causes the process to run as a renderer zygote. -const char kZygoteProcess[] = "zygote"; - #if defined(OS_CHROMEOS) // Enable the redirection of viewable document requests to the Google // Document Viewer. @@ -1348,22 +1201,13 @@ const char kEnableCrashReporter[] = "enable-crash-reporter"; // This switch is used during automated testing. const char kNoProcessSingletonDialog[] = "no-process-singleton-dialog"; -#if !defined(OS_MACOSX) +#if !defined(OS_MACOSX) && !defined(OS_CHROMEOS) // Specifies which password store to use (detect, default, gnome, kwallet). const char kPasswordStore[] = "password-store"; #endif #endif -#if defined(OS_MACOSX) -// Temporary flag to disable hole punching for accelerated surfaces. This is -// here to aid debugging eventual problems, it can be removed once hole punching -// has been out there for a few dev channel releases without problems. -const char kDisableHolePunching[] = "disable-hole-punching"; - -// Cause the OS X sandbox write to syslog every time an access to a resource -// is denied by the sandbox. -const char kEnableSandboxLogging[] = "enable-sandbox-logging"; -#else +#if !defined(OS_MACOSX) // Enable Kiosk mode. const char kKioskMode[] = "kiosk"; #endif @@ -1399,21 +1243,6 @@ const char kTouchDevices[] = "touch-devices"; #endif -// SeccompSandboxEnabled() controls whether we are using Seccomp. -// It is currently off by default on all platforms. -// TODO(evan): unify all of these once we turn the seccomp sandbox always -// on. Also remove the #include of command_line.h above. - -// Disable the seccomp sandbox (Linux only) -const char kDisableSeccompSandbox[] = "disable-seccomp-sandbox"; -// Enable the seccomp sandbox (Linux only) -const char kEnableSeccompSandbox[] = "enable-seccomp-sandbox"; - -bool SeccompSandboxEnabled() { - return CommandLine::ForCurrentProcess()->HasSwitch( - switches::kEnableSeccompSandbox); -} - // ----------------------------------------------------------------------------- // DO NOT ADD YOUR CRAP TO THE BOTTOM OF THIS FILE. // diff --git a/chrome/common/chrome_switches.h b/chrome/common/chrome_switches.h index 988c2f2..5a2c4e3 100644 --- a/chrome/common/chrome_switches.h +++ b/chrome/common/chrome_switches.h @@ -9,23 +9,24 @@ #pragma once #include "build/build_config.h" + #include "base/base_switches.h" +#include "content/common/content_switches.h" namespace switches { // ----------------------------------------------------------------------------- -// Can't find the switch you are looking for? Try looking in -// base/base_switches.cc instead. +// Can't find the switch you are looking for? Try looking in app/app_switches.cc +// or base/base_switches.cc or content/common/content_switches.cc or +// media/base/media_switches.cc instead. // ----------------------------------------------------------------------------- // All switches in alphabetical order. The switches should be documented // alongside the definition of their values in the .cc file. extern const char kActivateOnLaunch[]; -extern const char kAllowFileAccessFromFiles[]; extern const char kAllowFileAccess[]; extern const char kAllowOutdatedPlugins[]; extern const char kAllowSSLMITMProxies[]; -extern const char kAllowSandboxDebugging[]; extern const char kAllowScriptingGallery[]; extern const char kAlwaysAuthorizePlugins[]; extern const char kAlwaysEnableDevTools[]; @@ -54,9 +55,11 @@ extern const char kConflictingModulesCheck[]; extern const char kCountry[]; extern const char kDebugPrint[]; extern const char kDeviceManagementUrl[]; +extern const char kDevicePolicyCacheDir[]; extern const char kDiagnostics[]; extern const char kDisable3DAPIs[]; extern const char kDisableAcceleratedCompositing[]; +extern const char kDisableAcceleratedLayers[]; extern const char kDisableAcceleratedVideo[]; extern const char kDisableAltWinstation[]; extern const char kDisableApplicationCache[]; @@ -64,8 +67,8 @@ extern const char kDisableAudio[]; extern const char kDisableAuthNegotiateCnameLookup[]; extern const char kDisableBackgroundMode[]; extern const char kDisableBackgroundNetworking[]; -extern const char kDisableBackingStoreLimit[]; extern const char kDisableBlockContentAnimation[]; +extern const char kDisableConfirmToQuit[]; extern const char kDisableConnectBackupJobs[]; extern const char kDisableCustomJumpList[]; extern const char kDisableDatabases[]; @@ -76,12 +79,10 @@ extern const char kDisableEnforcedThrottling[]; extern const char kDisableExperimentalWebGL[]; extern const char kDisableExtensionsFileAccessCheck[]; extern const char kDisableExtensions[]; -extern const char kDisableFileSystem[]; extern const char kDisableFlashSandbox[]; extern const char kDisableGLMultisampling[]; extern const char kDisableGLSLTranslator[]; extern const char kDisableGeolocation[]; -extern const char kDisableGpuWatchdog[]; extern const char kDisableHangMonitor[]; extern const char kDisableHistoryQuickProvider[]; extern const char kDisableHistoryURLProvider[]; @@ -92,10 +93,7 @@ extern const char kDisableIPv6[]; extern const char kDisableJavaScript[]; extern const char kDisableJava[]; extern const char kDisableLocalStorage[]; -extern const char kDisableLogging[]; extern const char kDisableNewTabFirstRun[]; -extern const char kDisablePlugins[]; -extern const char kDisablePopupBlocking[]; extern const char kDisablePreconnect[]; extern const char kDisablePromptOnRepost[]; extern const char kDisableRemoteFonts[]; @@ -112,7 +110,6 @@ extern const char kDisableSyncAutofill[]; extern const char kDisableSyncAutofillProfile[]; extern const char kDisableSyncBookmarks[]; extern const char kDisableSyncExtensions[]; -extern const char kDisableSyncPasswords[]; extern const char kDisableSyncPreferences[]; extern const char kDisableSyncThemes[]; extern const char kDisableTabbedOptions[]; @@ -120,7 +117,6 @@ extern const char kDisableTabCloseableStateWatcher[]; extern const char kDisableTranslate[]; extern const char kDisableWebResources[]; extern const char kDisableWebSecurity[]; -extern const char kDisableWebSockets[]; extern const char kDisableXSSAuditor[]; extern const char kDiskCacheDir[]; extern const char kDiskCacheSize[]; @@ -130,18 +126,17 @@ extern const char kDnsServer[]; extern const char kDomAutomationController[]; extern const char kDumpHistogramsOnExit[]; extern const char kEnableAccelerated2dCanvas[]; -extern const char kEnableAcceleratedLayers[]; extern const char kEnableAcceleratedPlugins[]; extern const char kEnableAccessibility[]; extern const char kEnableAeroPeekTabs[]; extern const char kEnableAuthNegotiatePort[]; -extern const char kEnableBenchmarking[]; extern const char kEnableClientSidePhishingDetection[]; +extern const char kEnableClientSidePhishingInterstitial[]; extern const char kEnableClearServerData[]; extern const char kEnableClickToPlay[]; extern const char kEnableCloudPrintProxy[]; extern const char kEnableCloudPrint[]; -extern const char kEnableConfirmToQuit[]; +extern const char kEnableCompositeToTexture[]; extern const char kEnableConnectBackupJobs[]; extern const char kEnableCrxlessWebApps[]; extern const char kEnableDeviceMotion[]; @@ -151,26 +146,21 @@ extern const char kEnableExperimentalExtensionApis[]; extern const char kEnableExtensionTimelineApi[]; extern const char kEnableFastback[]; extern const char kEnableFileCookies[]; -extern const char kEnableFileSystemURLScheme[]; -extern const char kEnableGPUPlugin[]; +extern const char kEnableFullScreen[]; +extern const char kEnableHistoryQuickProvider[]; extern const char kEnableInBrowserThumbnailing[]; extern const char kEnableIPv6[]; extern const char kEnableJavaScriptI18NAPI[]; -extern const char kEnableLogging[]; extern const char kEnableMemoryInfo[]; -extern const char kEnableMonitorProfile[]; extern const char kEnableNaCl[]; extern const char kEnableNaClDebug[]; -extern const char kEnableNativeWebWorkers[]; +extern const char kEnableP2PApi[]; extern const char kEnablePreconnect[]; -extern const char kEnablePreparsedJsCaching[]; extern const char kEnablePrintPreview[]; extern const char kEnableRemoting[]; extern const char kEnableResourceContentSettings[]; extern const char kEnableSearchProviderApiV2[]; extern const char kEnableSnapStart[]; -extern const char kEnableSpeechInput[]; -extern const char kEnableStatsTable[]; extern const char kEnableSync[]; extern const char kEnableSyncAutofill[]; extern const char kEnableSyncPreferences[]; @@ -184,10 +174,7 @@ extern const char kEnableVideoFullscreen[]; extern const char kEnableVideoLogging[]; extern const char kEnableWatchdog[]; extern const char kEnableWebAudio[]; -// Experimental features. -extern const char kExperimentalLocationFeatures[]; extern const char kExperimentalSpellcheckerFeatures[]; -// End experimental features. extern const char kExplicitlyAllowedPorts[]; extern const char kExtensionProcess[]; extern const char kExtensionsUpdateFrequency[]; @@ -195,14 +182,12 @@ extern const char kFlagSwitchesBegin[]; extern const char kFlagSwitchesEnd[]; extern const char kFeedbackServer[]; extern const char kFileDescriptorLimit[]; +extern const char kFocusExistingTabOnOpen[]; extern const char kFirstRun[]; extern const char kForceAppsPromoVisible[]; extern const char kForceFieldTestNameAndValue[]; extern const char kForceRendererAccessibility[]; extern const char kForceStubLibcros[]; -extern const char kGpuLauncher[]; -extern const char kGpuProcess[]; -extern const char kGpuStartupDialog[]; extern const char kGSSAPILibraryName[]; extern const char kHelp[]; extern const char kHelpShort[]; @@ -223,17 +208,14 @@ extern const char kJavaScriptFlags[]; extern const char kKeepAliveForTest[]; extern const char kLoadExtension[]; extern const char kUninstallExtension[]; -extern const char kLoadPlugin[]; -extern const char kExtraPluginDir[]; extern const char kLogNetLog[]; -extern const char kLogPluginMessages[]; -extern const char kLoggingLevel[]; extern const char kMakeDefaultBrowser[]; extern const char kMediaCacheSize[]; extern const char kMemoryProfiling[]; extern const char kMessageLoopHistogrammer[]; extern const char kMetricsRecordingOnly[]; extern const char kMinClearSiteDataFlashVersion[]; +extern const char kMultiProfiles[]; extern const char kNaClDebugIP[]; extern const char kNaClDebugPorts[]; extern const char kNaClBrokerProcess[]; @@ -243,12 +225,11 @@ extern const char kNoDefaultBrowserCheck[]; extern const char kNoEvents[]; extern const char kNoExperiments[]; extern const char kNoFirstRun[]; -extern const char kNoGpuSandbox[]; extern const char kNoJsRandomness[]; extern const char kNoProxyServer[]; -extern const char kNoReferrers[]; extern const char kNoPings[]; extern const char kNoSandbox[]; +extern const char kNoServiceAutorun[]; extern const char kNoStartupWindow[]; extern const char kNotifyCloudPrintTokenExpired[]; extern const char kNumPacThreads[]; @@ -259,23 +240,12 @@ extern const char kPackExtensionKey[]; extern const char kParentProfile[]; extern const char kPlaybackMode[]; extern const char kPluginDataDir[]; -extern const char kPluginLauncher[]; -extern const char kPluginPath[]; -extern const char kPluginProcess[]; -extern const char kPluginStartupDialog[]; -extern const char kPpapiOutOfProcess[]; -extern const char kPpapiPluginLauncher[]; -extern const char kPpapiPluginProcess[]; -extern const char kPpapiStartupDialog[]; extern const char kPrerender[]; extern const char kPrerenderSwitchValueAuto[]; extern const char kPrerenderSwitchValueDisabled[]; extern const char kPrerenderSwitchValueEnabled[]; extern const char kPrerenderSwitchValuePrefetchOnly[]; extern const char kPrint[]; -extern const char kProcessPerSite[]; -extern const char kProcessPerTab[]; -extern const char kProcessType[]; extern const char kProductVersion[]; extern const char kProfileImportProcess[]; extern const char kProfilingAtStart[]; @@ -287,31 +257,27 @@ extern const char kProxyPacUrl[]; extern const char kProxyServer[]; extern const char kPurgeMemoryButton[]; extern const char kRecordMode[]; -extern const char kRegisterPepperPlugins[]; extern const char kReloadKilledTabs[]; extern const char kRemoteDebuggingPort[]; extern const char kRemoteShellPort[]; extern const char kRendererAssertTest[]; -extern const char kRendererCmdPrefix[]; -extern const char kRendererCrashTest[]; -extern const char kRendererProcess[]; -extern const char kRendererStartupDialog[]; extern const char kRestoreLastSession[]; -extern const char kSafePlugins[]; extern const char kSbInfoURLPrefix[]; extern const char kSbMacKeyURLPrefix[]; extern const char kSbDisableAutoUpdate[]; extern const char kSbEnableDownloadProtection[]; +extern const char kSbEnableDownloadWarningUI[]; extern const char kSdchFilter[]; extern const char kSearchInOmniboxHint[]; extern const char kServiceProcess[]; extern const char kServiceAccountLsid[]; extern const char kShowCompositedLayerBorders[]; +extern const char kShowCompositedLayerTree[]; +extern const char kShowFPSCounter[]; extern const char kShowIcons[]; extern const char kShowPaintRects[]; extern const char kSilentDumpOnDCHECK[]; extern const char kSimpleDataSource[]; -extern const char kSingleProcess[]; extern const char kStartMaximized[]; extern const char kSyncAllowInsecureXmppConnection[]; extern const char kSyncInvalidateXmppLogin[]; @@ -320,9 +286,9 @@ extern const char kSyncNotificationMethod[]; extern const char kSyncNotificationHost[]; extern const char kSyncServiceURL[]; extern const char kSyncTrySsltcpFirstForXmpp[]; +extern const char kNewSyncerThread[]; extern const char kTestNaClSandbox[]; extern const char kTestName[]; -extern const char kTestSandbox[]; extern const char kTestType[]; extern const char kTestingChannelID[]; extern const char kTrustedPlugins[]; @@ -332,23 +298,13 @@ extern const char kUseSpdy[]; extern const char kIgnoreCertificateErrors[]; extern const char kMaxSpdySessionsPerDomain[]; extern const char kMaxSpdyConcurrentStreams[]; -extern const char kUnlimitedQuotaForFiles[]; -extern const char kUnlimitedQuotaForIndexedDB[]; -extern const char kUseLowFragHeapCrt[]; -extern const char kUserAgent[]; extern const char kUserDataDir[]; extern const char kUserScriptsDir[]; extern const char kUtilityCmdPrefix[]; extern const char kUtilityProcess[]; extern const char kUtilityProcessAllowedDir[]; extern const char kVersion[]; -extern const char kWaitForDebuggerChildren[]; -extern const char kWebWorkerProcessPerCore[]; -extern const char kWebWorkerShareProcesses[]; extern const char kWinHttpProxyResolver[]; -extern const char kWorkerProcess[]; -extern const char kZygoteCmdPrefix[]; -extern const char kZygoteProcess[]; #if defined(OS_CHROMEOS) extern const char kEnableGView[]; @@ -386,15 +342,20 @@ extern const char kUseSystemSSL[]; #if defined(OS_POSIX) extern const char kEnableCrashReporter[]; extern const char kNoProcessSingletonDialog[]; -#if !defined(OS_MACOSX) +#if !defined(OS_MACOSX) && !defined(OS_CHROMEOS) extern const char kPasswordStore[]; #endif #endif -#if defined(OS_MACOSX) -extern const char kDisableHolePunching[]; -extern const char kEnableSandboxLogging[]; +#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_CHROMEOS) +// Linux, mostly, but also BSDs and such. Password syncing and GNOME Keyring +// don't play together at the moment so we require explicit opt-in for it. +extern const char kEnableSyncPasswords[]; #else +extern const char kDisableSyncPasswords[]; +#endif + +#if !defined(OS_MACOSX) extern const char kKioskMode[]; #endif @@ -417,12 +378,6 @@ extern const char kRendererCheckFalseTest[]; extern const char kTouchDevices[]; #endif -extern const char kDisableSeccompSandbox[]; -extern const char kEnableSeccompSandbox[]; - -// Return true if the switches indicate the seccomp sandbox is enabled. -bool SeccompSandboxEnabled(); - // DON'T ADD RANDOM STUFF HERE. Put it in the main section above in // alphabetical order, or in one of the ifdefs (also in order in each section). diff --git a/chrome/common/common_message_generator.h b/chrome/common/common_message_generator.h index 3a31c77..a59e82e 100644 --- a/chrome/common/common_message_generator.h +++ b/chrome/common/common_message_generator.h @@ -4,26 +4,27 @@ // Multiply-included file, hence no include guard. +#include "chrome/common/database_messages.h" +#include "chrome/common/file_utilities_messages.h" #include "chrome/common/indexed_db_messages.h" +#include "chrome/common/mime_registry_messages.h" +#include "chrome/common/safebrowsing_messages.h" +#include "chrome/common/speech_input_messages.h" +#include "chrome/common/utility_messages.h" +#include "chrome/common/worker_messages.h" #if 0 // This feature is not yet enabled for these files. #include "chrome/common/autofill_messages.h" #include "chrome/common/automation_messages.h" -#include "chrome/common/database_messages.h" #include "chrome/common/devtools_messages.h" #include "chrome/common/dom_storage_messages.h" -#include "chrome/common/file_utilities_messages.h" #include "chrome/common/gpu_messages.h" -#include "chrome/common/mime_registry_messages.h" #include "chrome/common/nacl_messages.h" #include "chrome/common/pepper_file_messages.h" #include "chrome/common/pepper_messages.h" #include "chrome/common/plugin_messages.h" #include "chrome/common/render_messages.h" #include "chrome/common/service_messages.h" -#include "chrome/common/speech_input_messages.h" -#include "chrome/common/utility_messages.h" -#include "chrome/common/worker_messages.h" #endif diff --git a/chrome/common/common_param_traits.cc b/chrome/common/common_param_traits.cc index 64fa35c..38792bb 100644 --- a/chrome/common/common_param_traits.cc +++ b/chrome/common/common_param_traits.cc @@ -10,8 +10,8 @@ #include "chrome/common/geoposition.h" #include "chrome/common/thumbnail_score.h" #include "chrome/common/web_apps.h" +#include "content/common/common_param_traits.h" #include "googleurl/src/gurl.h" -#include "net/base/upload_data.h" #include "printing/backend/print_backend.h" #include "printing/native_metafile.h" #include "printing/page_range.h" @@ -103,25 +103,6 @@ void ParamTraits::Log(const SkBitmap& p, std::string* l) { #endif // EXCLUDE_SKIA_DEPENDENCIES -void ParamTraits::Write(Message* m, const GURL& p) { - m->WriteString(p.possibly_invalid_spec()); - // TODO(brettw) bug 684583: Add encoding for query params. -} - -bool ParamTraits::Read(const Message* m, void** iter, GURL* p) { - std::string s; - if (!m->ReadString(iter, &s) || s.length() > chrome::kMaxURLChars) { - *p = GURL(); - return false; - } - *p = GURL(s); - return true; -} - -void ParamTraits::Log(const GURL& p, std::string* l) { - l->append(p.spec()); -} - void ParamTraits::Write(Message* m, const gfx::Point& p) { m->WriteInt(p.x()); m->WriteInt(p.y()); @@ -290,190 +271,6 @@ void ParamTraits::Log(const WebApplicationInfo& p, l->append(""); } -void ParamTraits::Write(Message* m, - const param_type& p) { - WriteParam(m, static_cast(p.status())); - WriteParam(m, p.os_error()); -} - -bool ParamTraits::Read(const Message* m, void** iter, - param_type* r) { - int status, os_error; - if (!ReadParam(m, iter, &status) || - !ReadParam(m, iter, &os_error)) - return false; - r->set_status(static_cast(status)); - r->set_os_error(os_error); - return true; -} - -void ParamTraits::Log(const param_type& p, - std::string* l) { - std::string status; - switch (p.status()) { - case net::URLRequestStatus::SUCCESS: - status = "SUCCESS"; - break; - case net::URLRequestStatus::IO_PENDING: - status = "IO_PENDING "; - break; - case net::URLRequestStatus::HANDLED_EXTERNALLY: - status = "HANDLED_EXTERNALLY"; - break; - case net::URLRequestStatus::CANCELED: - status = "CANCELED"; - break; - case net::URLRequestStatus::FAILED: - status = "FAILED"; - break; - default: - status = "UNKNOWN"; - break; - } - if (p.status() == net::URLRequestStatus::FAILED) - l->append("("); - - LogParam(status, l); - - if (p.status() == net::URLRequestStatus::FAILED) { - l->append(", "); - LogParam(p.os_error(), l); - l->append(")"); - } -} - -// Only the net::UploadData ParamTraits<> definition needs this definition, so -// keep this in the implementation file so we can forward declare UploadData in -// the header. -template <> -struct ParamTraits { - typedef net::UploadData::Element param_type; - static void Write(Message* m, const param_type& p) { - WriteParam(m, static_cast(p.type())); - switch (p.type()) { - case net::UploadData::TYPE_BYTES: { - m->WriteData(&p.bytes()[0], static_cast(p.bytes().size())); - break; - } - case net::UploadData::TYPE_CHUNK: { - m->WriteData(&p.bytes()[0], static_cast(p.bytes().size())); - // If this element is part of a chunk upload then send over information - // indicating if this is the last chunk. - WriteParam(m, p.is_last_chunk()); - break; - } - case net::UploadData::TYPE_FILE: { - WriteParam(m, p.file_path()); - WriteParam(m, p.file_range_offset()); - WriteParam(m, p.file_range_length()); - WriteParam(m, p.expected_file_modification_time()); - break; - } - default: { - WriteParam(m, p.blob_url()); - break; - } - } - } - static bool Read(const Message* m, void** iter, param_type* r) { - int type; - if (!ReadParam(m, iter, &type)) - return false; - switch (type) { - case net::UploadData::TYPE_BYTES: { - const char* data; - int len; - if (!m->ReadData(iter, &data, &len)) - return false; - r->SetToBytes(data, len); - break; - } - case net::UploadData::TYPE_CHUNK: { - const char* data; - int len; - if (!m->ReadData(iter, &data, &len)) - return false; - r->SetToBytes(data, len); - // If this element is part of a chunk upload then we need to explicitly - // set the type of the element and whether it is the last chunk. - bool is_last_chunk = false; - if (!ReadParam(m, iter, &is_last_chunk)) - return false; - r->set_type(net::UploadData::TYPE_CHUNK); - r->set_is_last_chunk(is_last_chunk); - break; - } - case net::UploadData::TYPE_FILE: { - FilePath file_path; - uint64 offset, length; - base::Time expected_modification_time; - if (!ReadParam(m, iter, &file_path)) - return false; - if (!ReadParam(m, iter, &offset)) - return false; - if (!ReadParam(m, iter, &length)) - return false; - if (!ReadParam(m, iter, &expected_modification_time)) - return false; - r->SetToFilePathRange(file_path, offset, length, - expected_modification_time); - break; - } - default: { - DCHECK(type == net::UploadData::TYPE_BLOB); - GURL blob_url; - if (!ReadParam(m, iter, &blob_url)) - return false; - r->SetToBlobUrl(blob_url); - break; - } - } - return true; - } - static void Log(const param_type& p, std::string* l) { - l->append(""); - } -}; - -void ParamTraits >::Write(Message* m, - const param_type& p) { - WriteParam(m, p.get() != NULL); - if (p) { - WriteParam(m, *p->elements()); - WriteParam(m, p->identifier()); - WriteParam(m, p->is_chunked()); - } -} - -bool ParamTraits >::Read(const Message* m, - void** iter, - param_type* r) { - bool has_object; - if (!ReadParam(m, iter, &has_object)) - return false; - if (!has_object) - return true; - std::vector elements; - if (!ReadParam(m, iter, &elements)) - return false; - int64 identifier; - if (!ReadParam(m, iter, &identifier)) - return false; - bool is_chunked = false; - if (!ReadParam(m, iter, &is_chunked)) - return false; - *r = new net::UploadData; - (*r)->swap_elements(&elements); - (*r)->set_identifier(identifier); - (*r)->set_is_chunked(is_chunked); - return true; -} - -void ParamTraits >::Log(const param_type& p, - std::string* l) { - l->append(""); -} - void ParamTraits::Write(Message* m, const param_type& p) { IPC::ParamTraits::Write(m, p.boring_score); IPC::ParamTraits::Write(m, p.good_clipping); @@ -647,49 +444,6 @@ void ParamTraits::Log( l->append(""); } -void ParamTraits::Write( - Message* m, const param_type& p) { - WriteParam(m, p.size); - WriteParam(m, p.is_directory); - WriteParam(m, p.last_modified.ToDoubleT()); - WriteParam(m, p.last_accessed.ToDoubleT()); - WriteParam(m, p.creation_time.ToDoubleT()); -} - -bool ParamTraits::Read( - const Message* m, void** iter, param_type* p) { - double last_modified; - double last_accessed; - double creation_time; - bool result = - ReadParam(m, iter, &p->size) && - ReadParam(m, iter, &p->is_directory) && - ReadParam(m, iter, &last_modified) && - ReadParam(m, iter, &last_accessed) && - ReadParam(m, iter, &creation_time); - if (result) { - p->last_modified = base::Time::FromDoubleT(last_modified); - p->last_accessed = base::Time::FromDoubleT(last_accessed); - p->creation_time = base::Time::FromDoubleT(creation_time); - } - return result; -} - -void ParamTraits::Log( - const param_type& p, std::string* l) { - l->append("("); - LogParam(p.size, l); - l->append(","); - LogParam(p.is_directory, l); - l->append(","); - LogParam(p.last_modified.ToDoubleT(), l); - l->append(","); - LogParam(p.last_accessed.ToDoubleT(), l); - l->append(","); - LogParam(p.creation_time.ToDoubleT(), l); - l->append(")"); -} - void ParamTraits::Write( Message* m, const param_type& p) { WriteParam(m, p.printer_capabilities); diff --git a/chrome/common/common_param_traits.h b/chrome/common/common_param_traits.h index f1e8cb0..28b48bc 100644 --- a/chrome/common/common_param_traits.h +++ b/chrome/common/common_param_traits.h @@ -14,12 +14,10 @@ #include "app/surface/transport_dib.h" #include "base/file_util.h" -#include "base/platform_file.h" #include "base/ref_counted.h" #include "chrome/common/content_settings.h" #include "chrome/common/page_zoom.h" #include "ipc/ipc_message_utils.h" -#include "net/url_request/url_request_status.h" #include "printing/native_metafile.h" // !!! WARNING: DO NOT ADD NEW WEBKIT DEPENDENCIES !!! // @@ -27,7 +25,7 @@ // 'third_party/WebKit/'. Chrome Frame and NACL build parts of base/ and // chrome/common/ for a mini-library that doesn't depend on webkit. // -// TODO(erg): The following two headers are historical and only work because +// TODO(erg): The following headers are historical and only work because // their definitions are inlined, which also needs to be fixed. #include "ui/gfx/native_widget_types.h" #include "webkit/glue/webcursor.h" @@ -35,7 +33,6 @@ // Forward declarations. struct Geoposition; -class GURL; class SkBitmap; class DictionaryValue; class ListValue; @@ -49,11 +46,6 @@ class Rect; class Size; } // namespace gfx -namespace net { -class UploadData; -class URLRequestStatus; -} - namespace printing { struct PageRange; struct PrinterCapsAndDefaults; @@ -77,16 +69,6 @@ struct ParamTraits { static void Log(const param_type& p, std::string* l); }; - -template <> -struct ParamTraits { - typedef GURL param_type; - static void Write(Message* m, const param_type& p); - static bool Read(const Message* m, void** iter, param_type* p); - static void Log(const param_type& p, std::string* l); -}; - - template <> struct ParamTraits { typedef gfx::Point param_type; @@ -263,24 +245,6 @@ struct ParamTraits { }; #endif -// Traits for URLRequestStatus -template <> -struct ParamTraits { - typedef net::URLRequestStatus param_type; - static void Write(Message* m, const param_type& p); - static bool Read(const Message* m, void** iter, param_type* r); - static void Log(const param_type& p, std::string* l); -}; - -// Traits for net::UploadData. -template <> -struct ParamTraits > { - typedef scoped_refptr param_type; - static void Write(Message* m, const param_type& p); - static bool Read(const Message* m, void** iter, param_type* r); - static void Log(const param_type& p, std::string* l); -}; - template<> struct ParamTraits { typedef ThumbnailScore param_type; @@ -322,20 +286,6 @@ struct ParamTraits { }; template <> -struct ParamTraits { - typedef base::PlatformFileInfo param_type; - static void Write(Message* m, const param_type& p); - static bool Read(const Message* m, void** iter, param_type* r); - static void Log(const param_type& p, std::string* l); -}; - -// Traits for base::PlatformFileError -template <> -struct SimilarTypeTraits { - typedef int Type; -}; - -template <> struct ParamTraits { typedef printing::PrinterCapsAndDefaults param_type; static void Write(Message* m, const param_type& p); diff --git a/chrome/common/common_param_traits_unittest.cc b/chrome/common/common_param_traits_unittest.cc index a11ddd1..186e68e 100644 --- a/chrome/common/common_param_traits_unittest.cc +++ b/chrome/common/common_param_traits_unittest.cc @@ -9,16 +9,22 @@ #include "base/values.h" #include "chrome/common/common_param_traits.h" #include "chrome/common/geoposition.h" +#include "content/common/common_param_traits.h" #include "googleurl/src/gurl.h" #include "ipc/ipc_message.h" #include "ipc/ipc_message_utils.h" +#include "net/base/host_port_pair.h" #include "printing/backend/print_backend.h" -#include "printing/native_metafile.h" #include "printing/page_range.h" #include "testing/gtest/include/gtest/gtest.h" #include "third_party/skia/include/core/SkBitmap.h" #include "ui/gfx/rect.h" +#if defined(OS_WIN) +#include "printing/native_metafile_factory.h" +#include "printing/native_metafile.h" +#endif + // Tests that serialize/deserialize correctly understand each other TEST(IPCMessageTest, Serialize) { const char* serialize_cases[] = { @@ -226,42 +232,45 @@ TEST(IPCMessageTest, PageRange) { EXPECT_TRUE(input == output); } -// Tests printing::NativeMetafile serialization. +// Tests printing::Emf serialization. // TODO(sanjeevr): Make this test meaningful for non-Windows platforms. We // need to initialize the metafile using alternate means on the other OSes. #if defined(OS_WIN) TEST(IPCMessageTest, Metafile) { - printing::NativeMetafile metafile; + scoped_ptr metafile( + printing::NativeMetafileFactory::CreateMetafile()); RECT test_rect = {0, 0, 100, 100}; - // Create a metsfile using the screen DC as a reference. - metafile.CreateDc(NULL, NULL); - metafile.CloseDc(); + // Create a metafile using the screen DC as a reference. + metafile->CreateDc(NULL, NULL); + metafile->CloseDc(); IPC::Message msg(1, 2, IPC::Message::PRIORITY_NORMAL); - IPC::ParamTraits::Write(&msg, metafile); + IPC::ParamTraits::Write(&msg, *metafile); - printing::NativeMetafile output; + scoped_ptr output( + printing::NativeMetafileFactory::CreateMetafile()); void* iter = NULL; EXPECT_TRUE(IPC::ParamTraits::Read( - &msg, &iter, &output)); + &msg, &iter, output.get())); - EXPECT_EQ(metafile.GetDataSize(), output.GetDataSize()); - EXPECT_EQ(metafile.GetBounds(), output.GetBounds()); - EXPECT_EQ(::GetDeviceCaps(metafile.hdc(), LOGPIXELSX), - ::GetDeviceCaps(output.hdc(), LOGPIXELSX)); + EXPECT_EQ(metafile->GetDataSize(), output->GetDataSize()); + EXPECT_EQ(metafile->GetBounds(), output->GetBounds()); + EXPECT_EQ(::GetDeviceCaps(metafile->hdc(), LOGPIXELSX), + ::GetDeviceCaps(output->hdc(), LOGPIXELSX)); // Also test the corrupt case. IPC::Message bad_msg(1, 2, IPC::Message::PRIORITY_NORMAL); // Write some bogus metafile data. - const size_t bogus_data_size = metafile.GetDataSize() * 2; + const size_t bogus_data_size = metafile->GetDataSize() * 2; scoped_array bogus_data(new char[bogus_data_size]); memset(bogus_data.get(), 'B', bogus_data_size); bad_msg.WriteData(bogus_data.get(), bogus_data_size); // Make sure we don't read out the metafile! - printing::NativeMetafile bad_output; + scoped_ptr bad_output( + printing::NativeMetafileFactory::CreateMetafile()); iter = NULL; EXPECT_FALSE(IPC::ParamTraits::Read( - &bad_msg, &iter, &bad_output)); + &bad_msg, &iter, bad_output.get())); } #endif // defined(OS_WIN) @@ -286,3 +295,16 @@ TEST(IPCMessageTest, PrinterCapsAndDefaults) { EXPECT_TRUE(input.defaults_mime_type == output.defaults_mime_type); } +// Tests net::HostPortPair serialization +TEST(IPCMessageTest, HostPortPair) { + net::HostPortPair input("host.com", 12345); + + IPC::Message msg(1, 2, IPC::Message::PRIORITY_NORMAL); + IPC::ParamTraits::Write(&msg, input); + + net::HostPortPair output; + void* iter = NULL; + EXPECT_TRUE(IPC::ParamTraits::Read(&msg, &iter, &output)); + EXPECT_EQ(input.host(), output.host()); + EXPECT_EQ(input.port(), output.port()); +} diff --git a/chrome/common/content_settings_types.h b/chrome/common/content_settings_types.h index 938adbf..a19b798 100644 --- a/chrome/common/content_settings_types.h +++ b/chrome/common/content_settings_types.h @@ -19,6 +19,7 @@ enum ContentSettingsType { CONTENT_SETTINGS_TYPE_POPUPS, CONTENT_SETTINGS_TYPE_GEOLOCATION, CONTENT_SETTINGS_TYPE_NOTIFICATIONS, + CONTENT_SETTINGS_TYPE_PRERENDER, CONTENT_SETTINGS_NUM_TYPES }; diff --git a/chrome/common/database_messages.cc b/chrome/common/database_messages.cc deleted file mode 100644 index 0b1b5d9..0000000 --- a/chrome/common/database_messages.cc +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "chrome/common/common_param_traits.h" - -#define IPC_MESSAGE_IMPL -#include "chrome/common/database_messages.h" diff --git a/chrome/common/database_messages.h b/chrome/common/database_messages.h index bb910b0..7cf64a1 100644 --- a/chrome/common/database_messages.h +++ b/chrome/common/database_messages.h @@ -2,9 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CHROME_COMMON_DATABASE_MESSAGES_H_ -#define CHROME_COMMON_DATABASE_MESSAGES_H_ -#pragma once +// Multiply-included message file, no include guard. #include "ipc/ipc_message_macros.h" #include "ipc/ipc_param_traits.h" @@ -76,4 +74,3 @@ IPC_MESSAGE_CONTROL2(DatabaseHostMsg_Closed, string16 /* origin identifier */, string16 /* database name */) -#endif // CHROME_COMMON_DATABASE_MESSAGES_H_ diff --git a/chrome/common/database_util.cc b/chrome/common/database_util.cc index 9e4a99d..2a985d3 100644 --- a/chrome/common/database_util.cc +++ b/chrome/common/database_util.cc @@ -4,8 +4,8 @@ #include "chrome/common/database_util.h" -#include "chrome/common/child_thread.h" #include "chrome/common/database_messages.h" +#include "content/common/child_thread.h" #include "ipc/ipc_sync_message_filter.h" #include "third_party/sqlite/sqlite3.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h" diff --git a/chrome/common/dom_storage_messages.cc b/chrome/common/dom_storage_messages.cc index 9aee345..3ee1f8d 100644 --- a/chrome/common/dom_storage_messages.cc +++ b/chrome/common/dom_storage_messages.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "chrome/common/common_param_traits.h" +#include "content/common/common_param_traits.h" #define IPC_MESSAGE_IMPL #include "chrome/common/dom_storage_messages.h" diff --git a/chrome/common/extensions/api/extension_api.json b/chrome/common/extensions/api/extension_api.json index 55c2946..d23f1ae 100644 --- a/chrome/common/extensions/api/extension_api.json +++ b/chrome/common/extensions/api/extension_api.json @@ -3186,6 +3186,16 @@ "expirationDate": {"type": "number", "optional": true, "description": "The expiration date of the cookie as the number of seconds since the UNIX epoch. If omitted, the cookie becomes a session cookie."}, "storeId": {"type": "string", "optional": true, "description": "The ID of the cookie store in which to set the cookie. By default, the cookie is set in the current execution context's cookie store."} } + }, + { + "type": "function", + "name": "callback", + "optional": true, + "parameters": [ + { + "name": "cookie", "$ref": "Cookie", "optional": true, "description": "Contains details about the cookie that's been set. If setting failed for any reason, this will be \"null\", and \"chrome.extension.lastError\" will be set." + } + ] } ] }, @@ -3203,6 +3213,24 @@ "name": {"type": "string", "description": "The name of the cookie to remove."}, "storeId": {"type": "string", "optional": true, "description": "The ID of the cookie store to look in for the cookie. If unspecified, the cookie is looked for by default in the current execution context's cookie store."} } + }, + { + "type": "function", + "name": "callback", + "optional": true, + "parameters": [ + { + "name": "details", + "type": "object", + "description": "Contains details about the cookie that's been removed. If removal failed for any reason, this will be \"null\", and \"chrome.extension.lastError\" will be set.", + "optional": true, + "properties": { + "url": {"type": "string", "description": "The URL associated with the cookie that's been removed."}, + "name": {"type": "string", "description": "The name of the cookie that's been removed."}, + "storeId": {"type": "string", "description": "The ID of the cookie store from which the cookie was removed."} + } + } + ] } ] }, @@ -3328,7 +3356,7 @@ "url": {"type": "string"}, "frameId": {"type": "integer", "description": "0 indicates the navigation happens in the tab content window; positive value indicates navigation in a subframe."}, "transitionType": {"type": "string", "enum": ["link", "typed", "auto_bookmark", "auto_subframe", "manual_subframe", "generated", "start_page", "form_submit", "reload", "keyword", "keyword_generated"], "description": "Cause of the navigation. The same transition types as defined in the history API are used."}, - "transitionQualifiers": {"type": "string", "description": "Zero or more transition qualifiers delimited by \"|\". Possible qualifiers are \"client_redirect\", \"server_redirect\", and \"forward_back\"."}, + "transitionQualifiers": {"type": "array", "description": "A list of transition qualifiers.", "items:": {"type": "string", "enum": ["client_redirect", "server_redirect", "forward_back"]}}, "timeStamp": {"type": "number", "description": "The time when the navigation was committed, in milliseconds since the epoch."} } } @@ -3397,7 +3425,7 @@ "properties": { "sourceTabId": {"type": "integer", "description": "The ID of the tab in which the navigation is triggered."}, "sourceUrl": {"type": "string", "description": "The URL of the document that is opening the new window."}, - "targetUrl": {"type": "string", "description": "The URL to be opened in the new window."}, + "url": {"type": "string", "description": "The URL to be opened in the new window."}, "timeStamp": {"type": "number", "description": "The time when the browser was about to create a new view, in milliseconds since the epoch."} } } @@ -3684,30 +3712,31 @@ "type": "object", "description": "An object encapsulating a single proxy server's specification.", "properties": { - "scheme": {"type": "string", "optional": true, "enum": ["http", "https", "socks", "socks4", "socks5"], "description": "The scheme (protocol) of the proxy server itself."}, - "host": {"type": "string", "description": "The URI of the proxy server."}, - "port": {"type": "integer", "optional": true, "description": "The port of the proxy server."} + "scheme": {"type": "string", "optional": true, "enum": ["http", "https", "socks4", "socks5"], "description": "The scheme (protocol) of the proxy server itself. Defaults to 'http'."}, + "host": {"type": "string", "description": "The URI of the proxy server. This must be an ASCII hostname (in Punycode format). IDNA is not supported, yet."}, + "port": {"type": "integer", "optional": true, "description": "The port of the proxy server. Defaults to a port that depends on the scheme."} } }, { "id": "ProxyRules", "type": "object", - "description": "An object encapsulating the set of proxy rules for all protocols. Use either 'singleProxy' or (a subset of) 'proxyForHttp', 'proxyForHttps', 'proxyForFtp' and 'socksProxy'.", + "description": "An object encapsulating the set of proxy rules for all protocols. Use either 'singleProxy' or (a subset of) 'proxyForHttp', 'proxyForHttps', 'proxyForFtp' and 'fallbackProxy'.", "properties": { - "singleProxy": {"$ref": "ProxyServer", "optional": true, "description": "The proxy server to be used for all per-URL requests (i.e., http, https, and ftp)."}, + "singleProxy": {"$ref": "ProxyServer", "optional": true, "description": "The proxy server to be used for all per-URL requests (that is http, https, and ftp)."}, "proxyForHttp": {"$ref": "ProxyServer", "optional": true, "description": "The proxy server to be used for HTTP requests."}, "proxyForHttps": {"$ref": "ProxyServer", "optional": true, "description": "The proxy server to be used for HTTPS requests."}, "proxyForFtp": {"$ref": "ProxyServer", "optional": true, "description": "The proxy server to be used for FTP requests."}, - "socksProxy": {"$ref": "ProxyServer", "optional": true, "description": "The proxy server to be used for SOCKS requests."}, + "fallbackProxy": {"$ref": "ProxyServer", "optional": true, "description": "The proxy server to be used for everthing else or if any of the specific proxyFor... is not specified."}, "bypassList": {"type": "array", "items": {"type": "string"}, "optional": true, "description": "List of servers to connect to without a proxy server."} } }, { "id": "PacScript", "type": "object", - "description": "An object holding proxy auto-config information. Only one of the fields should be non-empty.", + "description": "An object holding proxy auto-config information. Exactly one of the fields should be non-empty.", "properties": { - "url": {"type": "string", "optional": true, "description": "URL of he PAC file to be used."} + "url": {"type": "string", "optional": true, "description": "URL of the PAC file to be used."}, + "data": {"type": "string", "optional": true, "description": "A PAC script."} } }, { @@ -3725,57 +3754,43 @@ } } ], - "functions": [ - { - "name": "useCustomProxySettings", - "type": "function", - "description": "Apply the given proxy configuration.", - "parameters": [ - { - "name": "config", - "$ref": "ProxyConfig" - }, - { - "name": "incognito", - "type": "boolean", - "description": "If true, the proxy settings apply only to incognito windows. Otherwise they apply to regular windows (and incognito windows if no specific settings are provided for incognito windows)", - "optional": true - } - ] - }, - { - "name": "removeCustomProxySettings", - "type": "function", - "description": "Remove a custom proxy set by the current extension. This is the inverse of useCustomProxySettings.", - "parameters": [ + "properties": { + "settings": { + "$ref": "Preference", + "description": "Proxy settings to be used. The value of this preference is a ProxyConfig object.", + "value": [ + "proxy", + {"$ref": "ProxyConfig"}, { - "name": "incognito", - "type": "boolean", - "description": "See incognito parameter of useCustomProxySettings.", - "optional": true + "get": "experimental.proxy.get", + "set": "experimental.proxy.set" } ] - }, + } + }, + "events": [ { - "name": "getCurrentProxySettings", + "name": "onProxyError", "type": "function", - "description": "Returns the currently effective proxy settings. These can originate from default values, command line options, the extension settings API, policies and possibly other sources in the future.", + "description": "Notifies about proxy errors.", "parameters": [ { - "name": "incognito", - "type": "boolean", - "description": "See incognito parameter of useCustomProxySettings." - }, - { - "name": "callback", - "type": "function", - "parameters": [ - { - "name": "config", - "$ref": "ProxyConfig", - "description": "Configuration, not necessarily a literal copy of the configuration passed to useCustomProxySettings." + "type": "object", + "name": "details", + "properties": { + "fatal": { + "type": "boolean", + "description": "If true, the error was fatal and the network transaction was aborted. Otherwise, a direct connection is used instead." + }, + "error": { + "type": "string", + "description": "The error description." + }, + "details": { + "type": "string", + "description": "Additional details about the error such as a JavaScript runtime error." } - ] + } } ] } @@ -4177,7 +4192,7 @@ "type": "object", "properties": { "size": { "type": "integer", "description": "A number representing the width and height of the icon. Likely values include (but are not limited to) 128, 48, 24, and 16." }, - "url": { "type": "string", "description": "The url for this icon image." } + "url": { "type": "string", "description": "The URL for this icon image. To display a grayscale version of the icon (to indicate that an extension is disabled, for example), append ?grayscale=true to the URL." } } }, { @@ -4214,6 +4229,11 @@ "type": "string", "optional": true }, + "homepageUrl": { + "description": "The URL of the homepage of this extension or app", + "type": "string", + "optional": true + }, "optionsUrl": { "description": "The url for the item's options page, if it has one.", "type": "string" @@ -4502,5 +4522,125 @@ ] } ] + }, + { + "namespace": "experimental.extension", + "types": [ + { + "id": "Preference", + "type": "object", + "customBindings": "Preference", + "description": "An object which allows access to a preference.", + "functions": [ + { + "name": "get", + "type": "function", + "description": "Get the setting from the user preferences.", + "parameters": [ + { + "name": "details", + "type": "object", + "description": "What setting to return.", + "properties": { + "incognito": { + "type": "boolean", + "optional": true, + "description": "Whether to return the setting that applies to the incognito session only (default false)." + } + } + }, + { + "name": "callback", + "type": "function", + "parameters": [ + { + "name": "details", + "type": "object", + "description": "Details of the currently effective preference value.", + "properties": { + "value": { + "description": "The value of the preference.", + "type": "any" + }, + "levelOfControl": { + "description": "One of
NotControllable = cannot be controlled by any extension
ControlledByOtherExtensions = controlled by extensions with higher precedence
ControllableByThisExtension = can be controlled by this extension
ControlledByThisExtension = controlled by this extension", + "type": "string", + "enum": ["NotControllable", "ControlledByOtherExtensions", "ControllableByThisExtension", "ControlledByThisExtension"] + } + } + } + ] + } + ] + }, + { + "name": "set", + "type": "function", + "description": "Set the setting in the user preferences", + "parameters": [ + { + "name": "details", + "type": "object", + "description": "What setting to change.", + "properties": { + "value": { + "description": "The value of the preference.", + "type": "any" + }, + "incognito": { + "type": "boolean", + "optional": true, + "description": "Whether to modify the setting for the incognito session only (default false)." + } + } + }, + { + "name": "callback", + "type": "function", + "description": "Called after the preference has been set.", + "optional": true, + "parameters": [] + } + ] + }, + { + "name": "clear", + "type": "function", + "description": "Clears the setting in the user preferences. This way default settings can become effective again.", + "parameters": [ + { + "name": "details", + "type": "object", + "description": "What setting to clear.", + "properties": { + "incognito": { + "type": "boolean", + "optional": true, + "description": "Whether to clear the setting for the incognito session only (default false)." + } + } + }, + { + "name": "callback", + "type": "function", + "description": "Called after the preference has been cleared.", + "optional": true, + "parameters": [] + } + ] + } + ] + } + ] + }, + { + "namespace": "experimental.contentSettings.misc", + "properties": { + "blockThirdPartyCookies": { + "$ref": "Preference", + "value": ["blockThirdPartyCookies", {"type": "boolean"}], + "description": "Whether third party cookies should be blocked. The value of this preference is of type boolean." + } + } } ] diff --git a/chrome/common/extensions/docs/background_pages.html b/chrome/common/extensions/docs/background_pages.html index 2516499..3df0cc7 100644 --- a/chrome/common/extensions/docs/background_pages.html +++ b/chrome/common/extensions/docs/background_pages.html @@ -369,6 +369,14 @@ like this: ... } +

+If you need the browser to start up early—so +you can display notifications, for example—then +you might also want to specify the +"background" permission. +

+ +

Details

diff --git a/chrome/common/extensions/docs/cookies.html b/chrome/common/extensions/docs/cookies.html index 247b976..14c8cf6 100644 --- a/chrome/common/extensions/docs/cookies.html +++ b/chrome/common/extensions/docs/cookies.html @@ -1824,7 +1824,8 @@ see Samples.

void chrome.cookies.remove(, object - details)
+ details, function + callback)
@@ -2102,6 +2103,76 @@ see Samples.
+
+
+
+ callback + + + +
+ ( + optional + + + + Type + + + + array of + + function + + + + ) +
+ +
+
+
+ Undocumented. +
+
+ Description of this parameter from the json schema. +
+
+ This parameter was added in version + . + You must omit this parameter in earlier versions, + and you may omit it in any version. If you require this + parameter, the manifest key + minimum_chrome_version + can ensure that your extension won't be run in an earlier browser version. +
+ + +
+
+
+
+
+
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ +
@@ -2115,10 +2186,10 @@ see Samples. -
+

Callback function

-

+

The callback parameter should specify a function that looks like this:

@@ -2128,11 +2199,277 @@ see Samples.

-
function(Type param1, Type param2) {...};
+
function(object details) {...};
-
+
+ details + + + +
+ ( + optional + + + + Type + + + + array of + + object + + + + ) +
+ +
+
+ +
Contains details about the cookie that's been removed. If removal failed for any reason, this will be "null", and "chrome.extension.lastError" will be set.
+
+ This parameter was added in version + . + You must omit this parameter in earlier versions, + and you may omit it in any version. If you require this + parameter, the manifest key + minimum_chrome_version + can ensure that your extension won't be run in an earlier browser version. +
+ + +
+
+
+
+
+ url + + + +
+ ( + + + + + Type + + + + array of + + string + + + + ) +
+ +
+
+ +
The URL associated with the cookie that's been removed.
+
+ This parameter was added in version + . + You must omit this parameter in earlier versions, + and you may omit it in any version. If you require this + parameter, the manifest key + minimum_chrome_version + can ensure that your extension won't be run in an earlier browser version. +
+ + +
+
+
+
+
+
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ +
+
+
+
+ name + + + +
+ ( + + + + + Type + + + + array of + + string + + + + ) +
+ +
+
+ +
The name of the cookie that's been removed.
+
+ This parameter was added in version + . + You must omit this parameter in earlier versions, + and you may omit it in any version. If you require this + parameter, the manifest key + minimum_chrome_version + can ensure that your extension won't be run in an earlier browser version. +
+ + +
+
+
+
+
+
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ +
+
+
+
+ storeId + + + +
+ ( + + + + + Type + + + + array of + + string + + + + ) +
+ +
+
+ +
The ID of the cookie store from which the cookie was removed.
+
+ This parameter was added in version + . + You must omit this parameter in earlier versions, + and you may omit it in any version. If you require this + parameter, the manifest key + minimum_chrome_version + can ensure that your extension won't be run in an earlier browser version. +
+ + +
+
+
+
+
+
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ +
+
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ +
@@ -2154,7 +2491,8 @@ see Samples.
void chrome.cookies.set(, object - details)
+ details, function + callback)
@@ -2840,6 +3178,76 @@ see Samples.
+
+
+
+ callback + + + +
+ ( + optional + + + + Type + + + + array of + + function + + + + ) +
+ +
+
+
+ Undocumented. +
+
+ Description of this parameter from the json schema. +
+
+ This parameter was added in version + . + You must omit this parameter in earlier versions, + and you may omit it in any version. If you require this + parameter, the manifest key + minimum_chrome_version + can ensure that your extension won't be run in an earlier browser version. +
+ + +
+
+
+
+
+
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ +
@@ -2853,10 +3261,10 @@ see Samples. -
+

Callback function

-

+

The callback parameter should specify a function that looks like this:

@@ -2866,11 +3274,76 @@ see Samples.

-
function(Type param1, Type param2) {...};
+
function(Cookie cookie) {...};
-
+
+ cookie + + + +
+ ( + optional + + + + Cookie + + + + array of + + paramType + + + + ) +
+ +
+
+ +
Contains details about the cookie that's been set. If setting failed for any reason, this will be "null", and "chrome.extension.lastError" will be set.
+
+ This parameter was added in version + . + You must omit this parameter in earlier versions, + and you may omit it in any version. If you require this + parameter, the manifest key + minimum_chrome_version + can ensure that your extension won't be run in an earlier browser version. +
+ + +
+
+
+
+
+
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ +
diff --git a/chrome/common/extensions/docs/examples/api/bookmarks/basic/icon.png b/chrome/common/extensions/docs/examples/api/bookmarks/basic/icon.png index 9a79a46..84c4be3 100644 Binary files a/chrome/common/extensions/docs/examples/api/bookmarks/basic/icon.png and b/chrome/common/extensions/docs/examples/api/bookmarks/basic/icon.png differ diff --git a/chrome/common/extensions/docs/examples/api/browserAction/make_page_red/icon.png b/chrome/common/extensions/docs/examples/api/browserAction/make_page_red/icon.png index 9a79a46..84c4be3 100644 Binary files a/chrome/common/extensions/docs/examples/api/browserAction/make_page_red/icon.png and b/chrome/common/extensions/docs/examples/api/browserAction/make_page_red/icon.png differ diff --git a/chrome/common/extensions/docs/examples/api/browserAction/print/print_16x16.png b/chrome/common/extensions/docs/examples/api/browserAction/print/print_16x16.png index d145964..a38a537 100644 Binary files a/chrome/common/extensions/docs/examples/api/browserAction/print/print_16x16.png and b/chrome/common/extensions/docs/examples/api/browserAction/print/print_16x16.png differ diff --git a/chrome/common/extensions/docs/examples/api/browserAction/set_icon_path/icon1.png b/chrome/common/extensions/docs/examples/api/browserAction/set_icon_path/icon1.png index 9a79a46..84c4be3 100644 Binary files a/chrome/common/extensions/docs/examples/api/browserAction/set_icon_path/icon1.png and b/chrome/common/extensions/docs/examples/api/browserAction/set_icon_path/icon1.png differ diff --git a/chrome/common/extensions/docs/examples/api/browserAction/set_icon_path/icon2.png b/chrome/common/extensions/docs/examples/api/browserAction/set_icon_path/icon2.png index 8d3f710..9bb6f33 100644 Binary files a/chrome/common/extensions/docs/examples/api/browserAction/set_icon_path/icon2.png and b/chrome/common/extensions/docs/examples/api/browserAction/set_icon_path/icon2.png differ diff --git a/chrome/common/extensions/docs/examples/api/browserAction/set_icon_path/icon3.png b/chrome/common/extensions/docs/examples/api/browserAction/set_icon_path/icon3.png index 2d9dec3..1659dbf 100644 Binary files a/chrome/common/extensions/docs/examples/api/browserAction/set_icon_path/icon3.png and b/chrome/common/extensions/docs/examples/api/browserAction/set_icon_path/icon3.png differ diff --git a/chrome/common/extensions/docs/examples/api/browserAction/set_icon_path/icon4.png b/chrome/common/extensions/docs/examples/api/browserAction/set_icon_path/icon4.png index 896fc36..2e5aeee 100644 Binary files a/chrome/common/extensions/docs/examples/api/browserAction/set_icon_path/icon4.png and b/chrome/common/extensions/docs/examples/api/browserAction/set_icon_path/icon4.png differ diff --git a/chrome/common/extensions/docs/examples/api/browserAction/set_icon_path/icon5.png b/chrome/common/extensions/docs/examples/api/browserAction/set_icon_path/icon5.png index a5afa25..b4eea57 100644 Binary files a/chrome/common/extensions/docs/examples/api/browserAction/set_icon_path/icon5.png and b/chrome/common/extensions/docs/examples/api/browserAction/set_icon_path/icon5.png differ diff --git a/chrome/common/extensions/docs/examples/api/browserAction/set_page_color/icon.png b/chrome/common/extensions/docs/examples/api/browserAction/set_page_color/icon.png index 1f1c906..4924db1 100644 Binary files a/chrome/common/extensions/docs/examples/api/browserAction/set_page_color/icon.png and b/chrome/common/extensions/docs/examples/api/browserAction/set_page_color/icon.png differ diff --git a/chrome/common/extensions/docs/examples/api/contextMenus/basic.zip b/chrome/common/extensions/docs/examples/api/contextMenus/basic.zip index af4689f..6b6bb81 100644 Binary files a/chrome/common/extensions/docs/examples/api/contextMenus/basic.zip and b/chrome/common/extensions/docs/examples/api/contextMenus/basic.zip differ diff --git a/chrome/common/extensions/docs/examples/api/cookies.zip b/chrome/common/extensions/docs/examples/api/cookies.zip index 561ac09..cb167fc 100644 Binary files a/chrome/common/extensions/docs/examples/api/cookies.zip and b/chrome/common/extensions/docs/examples/api/cookies.zip differ diff --git a/chrome/common/extensions/docs/examples/api/cookies/cookie.png b/chrome/common/extensions/docs/examples/api/cookies/cookie.png index ca72eca..0f78760 100644 Binary files a/chrome/common/extensions/docs/examples/api/cookies/cookie.png and b/chrome/common/extensions/docs/examples/api/cookies/cookie.png differ diff --git a/chrome/common/extensions/docs/examples/api/i18n/getMessage/icon.png b/chrome/common/extensions/docs/examples/api/i18n/getMessage/icon.png index 9a79a46..84c4be3 100644 Binary files a/chrome/common/extensions/docs/examples/api/i18n/getMessage/icon.png and b/chrome/common/extensions/docs/examples/api/i18n/getMessage/icon.png differ diff --git a/chrome/common/extensions/docs/examples/api/idle/idle_simple/sample-128.png b/chrome/common/extensions/docs/examples/api/idle/idle_simple/sample-128.png index 1c961db..d733b1e 100644 Binary files a/chrome/common/extensions/docs/examples/api/idle/idle_simple/sample-128.png and b/chrome/common/extensions/docs/examples/api/idle/idle_simple/sample-128.png differ diff --git a/chrome/common/extensions/docs/examples/api/idle/idle_simple/sample-16.png b/chrome/common/extensions/docs/examples/api/idle/idle_simple/sample-16.png index a10636f..dcc5c14 100644 Binary files a/chrome/common/extensions/docs/examples/api/idle/idle_simple/sample-16.png and b/chrome/common/extensions/docs/examples/api/idle/idle_simple/sample-16.png differ diff --git a/chrome/common/extensions/docs/examples/api/idle/idle_simple/sample-19.png b/chrome/common/extensions/docs/examples/api/idle/idle_simple/sample-19.png index 32f265a..01e0aa8 100644 Binary files a/chrome/common/extensions/docs/examples/api/idle/idle_simple/sample-19.png and b/chrome/common/extensions/docs/examples/api/idle/idle_simple/sample-19.png differ diff --git a/chrome/common/extensions/docs/examples/api/idle/idle_simple/sample-48.png b/chrome/common/extensions/docs/examples/api/idle/idle_simple/sample-48.png index bee88b7..3af1eb8 100644 Binary files a/chrome/common/extensions/docs/examples/api/idle/idle_simple/sample-48.png and b/chrome/common/extensions/docs/examples/api/idle/idle_simple/sample-48.png differ diff --git a/chrome/common/extensions/docs/examples/api/infobars/sandwichbar/sandwich-128.png b/chrome/common/extensions/docs/examples/api/infobars/sandwichbar/sandwich-128.png index a233154..98f5b50 100644 Binary files a/chrome/common/extensions/docs/examples/api/infobars/sandwichbar/sandwich-128.png and b/chrome/common/extensions/docs/examples/api/infobars/sandwichbar/sandwich-128.png differ diff --git a/chrome/common/extensions/docs/examples/api/infobars/sandwichbar/sandwich-16.png b/chrome/common/extensions/docs/examples/api/infobars/sandwichbar/sandwich-16.png index 86f3b3c..2258238 100644 Binary files a/chrome/common/extensions/docs/examples/api/infobars/sandwichbar/sandwich-16.png and b/chrome/common/extensions/docs/examples/api/infobars/sandwichbar/sandwich-16.png differ diff --git a/chrome/common/extensions/docs/examples/api/infobars/sandwichbar/sandwich-19.png b/chrome/common/extensions/docs/examples/api/infobars/sandwichbar/sandwich-19.png index e84dc86..dfe3ae1 100644 Binary files a/chrome/common/extensions/docs/examples/api/infobars/sandwichbar/sandwich-19.png and b/chrome/common/extensions/docs/examples/api/infobars/sandwichbar/sandwich-19.png differ diff --git a/chrome/common/extensions/docs/examples/api/infobars/sandwichbar/sandwich-48.png b/chrome/common/extensions/docs/examples/api/infobars/sandwichbar/sandwich-48.png index d7f2324..d61dea6 100644 Binary files a/chrome/common/extensions/docs/examples/api/infobars/sandwichbar/sandwich-48.png and b/chrome/common/extensions/docs/examples/api/infobars/sandwichbar/sandwich-48.png differ diff --git a/chrome/common/extensions/docs/examples/api/messaging/timer/clock.png b/chrome/common/extensions/docs/examples/api/messaging/timer/clock.png index 7889ac0..107d6e7 100644 Binary files a/chrome/common/extensions/docs/examples/api/messaging/timer/clock.png and b/chrome/common/extensions/docs/examples/api/messaging/timer/clock.png differ diff --git a/chrome/common/extensions/docs/examples/api/notifications.zip b/chrome/common/extensions/docs/examples/api/notifications.zip index 46af038..9685730 100644 Binary files a/chrome/common/extensions/docs/examples/api/notifications.zip and b/chrome/common/extensions/docs/examples/api/notifications.zip differ diff --git a/chrome/common/extensions/docs/examples/api/notifications/128.png b/chrome/common/extensions/docs/examples/api/notifications/128.png index 7013aa9..8cc7c37 100644 Binary files a/chrome/common/extensions/docs/examples/api/notifications/128.png and b/chrome/common/extensions/docs/examples/api/notifications/128.png differ diff --git a/chrome/common/extensions/docs/examples/api/notifications/16.png b/chrome/common/extensions/docs/examples/api/notifications/16.png index 669c791..4d38399 100644 Binary files a/chrome/common/extensions/docs/examples/api/notifications/16.png and b/chrome/common/extensions/docs/examples/api/notifications/16.png differ diff --git a/chrome/common/extensions/docs/examples/api/notifications/48.png b/chrome/common/extensions/docs/examples/api/notifications/48.png index 8a151ad..1e9eb41 100644 Binary files a/chrome/common/extensions/docs/examples/api/notifications/48.png and b/chrome/common/extensions/docs/examples/api/notifications/48.png differ diff --git a/chrome/common/extensions/docs/examples/api/notifications/64.png b/chrome/common/extensions/docs/examples/api/notifications/64.png index 347e28f..d87bbbb 100644 Binary files a/chrome/common/extensions/docs/examples/api/notifications/64.png and b/chrome/common/extensions/docs/examples/api/notifications/64.png differ diff --git a/chrome/common/extensions/docs/examples/api/omnibox/extension-docs/icon-128.png b/chrome/common/extensions/docs/examples/api/omnibox/extension-docs/icon-128.png index c7e114f..a463186 100644 Binary files a/chrome/common/extensions/docs/examples/api/omnibox/extension-docs/icon-128.png and b/chrome/common/extensions/docs/examples/api/omnibox/extension-docs/icon-128.png differ diff --git a/chrome/common/extensions/docs/examples/api/omnibox/extension-docs/icon-16.png b/chrome/common/extensions/docs/examples/api/omnibox/extension-docs/icon-16.png index 23b34a0..e2d5d3a 100644 Binary files a/chrome/common/extensions/docs/examples/api/omnibox/extension-docs/icon-16.png and b/chrome/common/extensions/docs/examples/api/omnibox/extension-docs/icon-16.png differ diff --git a/chrome/common/extensions/docs/examples/api/pageAction/pageaction_by_content/sandwich-128.png b/chrome/common/extensions/docs/examples/api/pageAction/pageaction_by_content/sandwich-128.png index a233154..98f5b50 100644 Binary files a/chrome/common/extensions/docs/examples/api/pageAction/pageaction_by_content/sandwich-128.png and b/chrome/common/extensions/docs/examples/api/pageAction/pageaction_by_content/sandwich-128.png differ diff --git a/chrome/common/extensions/docs/examples/api/pageAction/pageaction_by_content/sandwich-19.png b/chrome/common/extensions/docs/examples/api/pageAction/pageaction_by_content/sandwich-19.png index e84dc86..dfe3ae1 100644 Binary files a/chrome/common/extensions/docs/examples/api/pageAction/pageaction_by_content/sandwich-19.png and b/chrome/common/extensions/docs/examples/api/pageAction/pageaction_by_content/sandwich-19.png differ diff --git a/chrome/common/extensions/docs/examples/api/pageAction/pageaction_by_content/sandwich-48.png b/chrome/common/extensions/docs/examples/api/pageAction/pageaction_by_content/sandwich-48.png index d7f2324..d61dea6 100644 Binary files a/chrome/common/extensions/docs/examples/api/pageAction/pageaction_by_content/sandwich-48.png and b/chrome/common/extensions/docs/examples/api/pageAction/pageaction_by_content/sandwich-48.png differ diff --git a/chrome/common/extensions/docs/examples/api/pageAction/pageaction_by_url/icon-128.png b/chrome/common/extensions/docs/examples/api/pageAction/pageaction_by_url/icon-128.png index fbfe538..0734990 100644 Binary files a/chrome/common/extensions/docs/examples/api/pageAction/pageaction_by_url/icon-128.png and b/chrome/common/extensions/docs/examples/api/pageAction/pageaction_by_url/icon-128.png differ diff --git a/chrome/common/extensions/docs/examples/api/pageAction/pageaction_by_url/icon-19.png b/chrome/common/extensions/docs/examples/api/pageAction/pageaction_by_url/icon-19.png index 91679f0..9c3fa8f 100644 Binary files a/chrome/common/extensions/docs/examples/api/pageAction/pageaction_by_url/icon-19.png and b/chrome/common/extensions/docs/examples/api/pageAction/pageaction_by_url/icon-19.png differ diff --git a/chrome/common/extensions/docs/examples/api/pageAction/pageaction_by_url/icon-48.png b/chrome/common/extensions/docs/examples/api/pageAction/pageaction_by_url/icon-48.png index 59e9935..0574e0e 100644 Binary files a/chrome/common/extensions/docs/examples/api/pageAction/pageaction_by_url/icon-48.png and b/chrome/common/extensions/docs/examples/api/pageAction/pageaction_by_url/icon-48.png differ diff --git a/chrome/common/extensions/docs/examples/api/pageAction/set_icon/icon1.png b/chrome/common/extensions/docs/examples/api/pageAction/set_icon/icon1.png index 9a79a46..84c4be3 100644 Binary files a/chrome/common/extensions/docs/examples/api/pageAction/set_icon/icon1.png and b/chrome/common/extensions/docs/examples/api/pageAction/set_icon/icon1.png differ diff --git a/chrome/common/extensions/docs/examples/api/pageAction/set_icon/icon2.png b/chrome/common/extensions/docs/examples/api/pageAction/set_icon/icon2.png index 8d3f710..9bb6f33 100644 Binary files a/chrome/common/extensions/docs/examples/api/pageAction/set_icon/icon2.png and b/chrome/common/extensions/docs/examples/api/pageAction/set_icon/icon2.png differ diff --git a/chrome/common/extensions/docs/examples/api/processes/process_monitor/icon.png b/chrome/common/extensions/docs/examples/api/processes/process_monitor/icon.png index 9a79a46..84c4be3 100644 Binary files a/chrome/common/extensions/docs/examples/api/processes/process_monitor/icon.png and b/chrome/common/extensions/docs/examples/api/processes/process_monitor/icon.png differ diff --git a/chrome/common/extensions/docs/examples/api/processes/show_tabs/icon.png b/chrome/common/extensions/docs/examples/api/processes/show_tabs/icon.png index 9a79a46..84c4be3 100644 Binary files a/chrome/common/extensions/docs/examples/api/processes/show_tabs/icon.png and b/chrome/common/extensions/docs/examples/api/processes/show_tabs/icon.png differ diff --git a/chrome/common/extensions/docs/examples/api/tabs/screenshot/camera.png b/chrome/common/extensions/docs/examples/api/tabs/screenshot/camera.png index be26c39..687525f 100644 Binary files a/chrome/common/extensions/docs/examples/api/tabs/screenshot/camera.png and b/chrome/common/extensions/docs/examples/api/tabs/screenshot/camera.png differ diff --git a/chrome/common/extensions/docs/examples/api/windows/merge_windows/merge_windows_128.png b/chrome/common/extensions/docs/examples/api/windows/merge_windows/merge_windows_128.png index 00bea8e..a083b58 100644 Binary files a/chrome/common/extensions/docs/examples/api/windows/merge_windows/merge_windows_128.png and b/chrome/common/extensions/docs/examples/api/windows/merge_windows/merge_windows_128.png differ diff --git a/chrome/common/extensions/docs/examples/api/windows/merge_windows/merge_windows_48.png b/chrome/common/extensions/docs/examples/api/windows/merge_windows/merge_windows_48.png index 2d8f727..7defec6 100644 Binary files a/chrome/common/extensions/docs/examples/api/windows/merge_windows/merge_windows_48.png and b/chrome/common/extensions/docs/examples/api/windows/merge_windows/merge_windows_48.png differ diff --git a/chrome/common/extensions/docs/examples/extensions/app_launcher.zip b/chrome/common/extensions/docs/examples/extensions/app_launcher.zip index 6f71c38..432b93e 100644 Binary files a/chrome/common/extensions/docs/examples/extensions/app_launcher.zip and b/chrome/common/extensions/docs/examples/extensions/app_launcher.zip differ diff --git a/chrome/common/extensions/docs/examples/extensions/app_launcher/browser_action_icon.png b/chrome/common/extensions/docs/examples/extensions/app_launcher/browser_action_icon.png index 046ee42..fb40a52 100644 Binary files a/chrome/common/extensions/docs/examples/extensions/app_launcher/browser_action_icon.png and b/chrome/common/extensions/docs/examples/extensions/app_launcher/browser_action_icon.png differ diff --git a/chrome/common/extensions/docs/examples/extensions/app_launcher/icon.png b/chrome/common/extensions/docs/examples/extensions/app_launcher/icon.png index 4aa2994..8e64d3d 100644 Binary files a/chrome/common/extensions/docs/examples/extensions/app_launcher/icon.png and b/chrome/common/extensions/docs/examples/extensions/app_launcher/icon.png differ diff --git a/chrome/common/extensions/docs/examples/extensions/benchmark.zip b/chrome/common/extensions/docs/examples/extensions/benchmark.zip index 3370dc1..3623358 100644 Binary files a/chrome/common/extensions/docs/examples/extensions/benchmark.zip and b/chrome/common/extensions/docs/examples/extensions/benchmark.zip differ diff --git a/chrome/common/extensions/docs/examples/extensions/buildbot.zip b/chrome/common/extensions/docs/examples/extensions/buildbot.zip index 472d88e..b873501 100644 Binary files a/chrome/common/extensions/docs/examples/extensions/buildbot.zip and b/chrome/common/extensions/docs/examples/extensions/buildbot.zip differ diff --git a/chrome/common/extensions/docs/examples/extensions/buildbot/chromium.png b/chrome/common/extensions/docs/examples/extensions/buildbot/chromium.png index cc9fb60..8c07cf8 100644 Binary files a/chrome/common/extensions/docs/examples/extensions/buildbot/chromium.png and b/chrome/common/extensions/docs/examples/extensions/buildbot/chromium.png differ diff --git a/chrome/common/extensions/docs/examples/extensions/buildbot/icon.png b/chrome/common/extensions/docs/examples/extensions/buildbot/icon.png index b3c3474..691d382 100644 Binary files a/chrome/common/extensions/docs/examples/extensions/buildbot/icon.png and b/chrome/common/extensions/docs/examples/extensions/buildbot/icon.png differ diff --git a/chrome/common/extensions/docs/examples/extensions/calendar.zip b/chrome/common/extensions/docs/examples/extensions/calendar.zip index addfe53..ba1b874 100644 Binary files a/chrome/common/extensions/docs/examples/extensions/calendar.zip and b/chrome/common/extensions/docs/examples/extensions/calendar.zip differ diff --git a/chrome/common/extensions/docs/examples/extensions/chrome_search.zip b/chrome/common/extensions/docs/examples/extensions/chrome_search.zip index 81693c0..0095c3d 100644 Binary files a/chrome/common/extensions/docs/examples/extensions/chrome_search.zip and b/chrome/common/extensions/docs/examples/extensions/chrome_search.zip differ diff --git a/chrome/common/extensions/docs/examples/extensions/chrome_search/background.html b/chrome/common/extensions/docs/examples/extensions/chrome_search/background.html index e796e77..59c0292 100644 --- a/chrome/common/extensions/docs/examples/extensions/chrome_search/background.html +++ b/chrome/common/extensions/docs/examples/extensions/chrome_search/background.html @@ -116,7 +116,7 @@ function search(query, callback) { query = '"' + query + '"'; var url = "http://www.google.com/codesearch/feeds/search?" + - "q=package:src.chromium.org/git/chromium.git+" + query; + "vert=chromium&as_q=" + query; var req = new XMLHttpRequest(); req.open("GET", url, true); @@ -131,7 +131,8 @@ function search(query, callback) { } function getUrl(path, line) { - var url = "http://www.google.com/codesearch/p#hfE6470xZHk/" + path; + var url = "http://www.google.com/codesearch/p#OAMlx_jo-ck/" + path + "&exact_package=chromium"; if (line) url += "&l=" + line; return url; @@ -161,8 +162,8 @@ chrome.omnibox.onInputEntered.addListener(function(text) { } else if (text == 'halp') { // TODO(aa) } else { - navigate("http://codesearch.google.com/codesearch?q=" + - "package:src.chromium.org/git/chromium.git " + text); + navigate("http://codesearch.google.com/codesearch?" + + "vert=chromium&as_q=" + text); } }); diff --git a/chrome/common/extensions/docs/examples/extensions/chrome_search/manifest.json b/chrome/common/extensions/docs/examples/extensions/chrome_search/manifest.json index 54de17c..a30e25f 100644 --- a/chrome/common/extensions/docs/examples/extensions/chrome_search/manifest.json +++ b/chrome/common/extensions/docs/examples/extensions/chrome_search/manifest.json @@ -4,6 +4,6 @@ "name": "Chromium Search", "omnibox": { "keyword" : "src" }, "permissions": [ "tabs", "http://www.google.com/" ], - "version": "5", + "version": "6", "minimum_chrome_version": "9" } diff --git a/chrome/common/extensions/docs/examples/extensions/email_this_page.zip b/chrome/common/extensions/docs/examples/extensions/email_this_page.zip index ab63c9b..b8ba712 100644 Binary files a/chrome/common/extensions/docs/examples/extensions/email_this_page.zip and b/chrome/common/extensions/docs/examples/extensions/email_this_page.zip differ diff --git a/chrome/common/extensions/docs/examples/extensions/email_this_page/email_16x16.png b/chrome/common/extensions/docs/examples/extensions/email_this_page/email_16x16.png index 492bdc6..155ce5c 100644 Binary files a/chrome/common/extensions/docs/examples/extensions/email_this_page/email_16x16.png and b/chrome/common/extensions/docs/examples/extensions/email_this_page/email_16x16.png differ diff --git a/chrome/common/extensions/docs/examples/extensions/email_this_page/mail_128x128.png b/chrome/common/extensions/docs/examples/extensions/email_this_page/mail_128x128.png index 4221ec5..581c97a 100644 Binary files a/chrome/common/extensions/docs/examples/extensions/email_this_page/mail_128x128.png and b/chrome/common/extensions/docs/examples/extensions/email_this_page/mail_128x128.png differ diff --git a/chrome/common/extensions/docs/examples/extensions/fx.zip b/chrome/common/extensions/docs/examples/extensions/fx.zip index f2c66fa..962f30a 100644 Binary files a/chrome/common/extensions/docs/examples/extensions/fx.zip and b/chrome/common/extensions/docs/examples/extensions/fx.zip differ diff --git a/chrome/common/extensions/docs/examples/extensions/fx/icon.png b/chrome/common/extensions/docs/examples/extensions/fx/icon.png index c8322c3..ce610f6 100644 Binary files a/chrome/common/extensions/docs/examples/extensions/fx/icon.png and b/chrome/common/extensions/docs/examples/extensions/fx/icon.png differ diff --git a/chrome/common/extensions/docs/examples/extensions/gdocs.zip b/chrome/common/extensions/docs/examples/extensions/gdocs.zip index 60b27a4..d3b62bc 100644 Binary files a/chrome/common/extensions/docs/examples/extensions/gdocs.zip and b/chrome/common/extensions/docs/examples/extensions/gdocs.zip differ diff --git a/chrome/common/extensions/docs/examples/extensions/gdocs/img/icons/trashed.png b/chrome/common/extensions/docs/examples/extensions/gdocs/img/icons/trashed.png index 7afd3fb..eaee07f 100644 Binary files a/chrome/common/extensions/docs/examples/extensions/gdocs/img/icons/trashed.png and b/chrome/common/extensions/docs/examples/extensions/gdocs/img/icons/trashed.png differ diff --git a/chrome/common/extensions/docs/examples/extensions/gmail.zip b/chrome/common/extensions/docs/examples/extensions/gmail.zip index 16ad002..19f8b93 100644 Binary files a/chrome/common/extensions/docs/examples/extensions/gmail.zip and b/chrome/common/extensions/docs/examples/extensions/gmail.zip differ diff --git a/chrome/common/extensions/docs/examples/extensions/gmail/gmail_logged_in.png b/chrome/common/extensions/docs/examples/extensions/gmail/gmail_logged_in.png index 8d5e256..eec9019 100644 Binary files a/chrome/common/extensions/docs/examples/extensions/gmail/gmail_logged_in.png and b/chrome/common/extensions/docs/examples/extensions/gmail/gmail_logged_in.png differ diff --git a/chrome/common/extensions/docs/examples/extensions/gmail/gmail_not_logged_in.png b/chrome/common/extensions/docs/examples/extensions/gmail/gmail_not_logged_in.png index 582d262..ac38fa4 100644 Binary files a/chrome/common/extensions/docs/examples/extensions/gmail/gmail_not_logged_in.png and b/chrome/common/extensions/docs/examples/extensions/gmail/gmail_not_logged_in.png differ diff --git a/chrome/common/extensions/docs/examples/extensions/gmail/icon_128.png b/chrome/common/extensions/docs/examples/extensions/gmail/icon_128.png index 1ddc33b..3a33f40 100644 Binary files a/chrome/common/extensions/docs/examples/extensions/gmail/icon_128.png and b/chrome/common/extensions/docs/examples/extensions/gmail/icon_128.png differ diff --git a/chrome/common/extensions/docs/examples/extensions/imageinfo.zip b/chrome/common/extensions/docs/examples/extensions/imageinfo.zip index 1629fef..7d14906 100644 Binary files a/chrome/common/extensions/docs/examples/extensions/imageinfo.zip and b/chrome/common/extensions/docs/examples/extensions/imageinfo.zip differ diff --git a/chrome/common/extensions/docs/examples/extensions/imageinfo/imageinfo-128.png b/chrome/common/extensions/docs/examples/extensions/imageinfo/imageinfo-128.png index 697fe31..23a7de3 100644 Binary files a/chrome/common/extensions/docs/examples/extensions/imageinfo/imageinfo-128.png and b/chrome/common/extensions/docs/examples/extensions/imageinfo/imageinfo-128.png differ diff --git a/chrome/common/extensions/docs/examples/extensions/imageinfo/imageinfo-16.png b/chrome/common/extensions/docs/examples/extensions/imageinfo/imageinfo-16.png index 23a5de2..ef3bd02 100644 Binary files a/chrome/common/extensions/docs/examples/extensions/imageinfo/imageinfo-16.png and b/chrome/common/extensions/docs/examples/extensions/imageinfo/imageinfo-16.png differ diff --git a/chrome/common/extensions/docs/examples/extensions/imageinfo/imageinfo-19.png b/chrome/common/extensions/docs/examples/extensions/imageinfo/imageinfo-19.png index 3769c38..afac004 100644 Binary files a/chrome/common/extensions/docs/examples/extensions/imageinfo/imageinfo-19.png and b/chrome/common/extensions/docs/examples/extensions/imageinfo/imageinfo-19.png differ diff --git a/chrome/common/extensions/docs/examples/extensions/imageinfo/imageinfo-48.png b/chrome/common/extensions/docs/examples/extensions/imageinfo/imageinfo-48.png index 22781b7..e3e2754 100644 Binary files a/chrome/common/extensions/docs/examples/extensions/imageinfo/imageinfo-48.png and b/chrome/common/extensions/docs/examples/extensions/imageinfo/imageinfo-48.png differ diff --git a/chrome/common/extensions/docs/examples/extensions/mappy.zip b/chrome/common/extensions/docs/examples/extensions/mappy.zip index e5c9f3b..097306a 100644 Binary files a/chrome/common/extensions/docs/examples/extensions/mappy.zip and b/chrome/common/extensions/docs/examples/extensions/mappy.zip differ diff --git a/chrome/common/extensions/docs/examples/extensions/mappy/icon.png b/chrome/common/extensions/docs/examples/extensions/mappy/icon.png index 40ebbff..f48e213 100644 Binary files a/chrome/common/extensions/docs/examples/extensions/mappy/icon.png and b/chrome/common/extensions/docs/examples/extensions/mappy/icon.png differ diff --git a/chrome/common/extensions/docs/examples/extensions/mappy/marker.png b/chrome/common/extensions/docs/examples/extensions/mappy/marker.png index 3aa768b..83c8889 100644 Binary files a/chrome/common/extensions/docs/examples/extensions/mappy/marker.png and b/chrome/common/extensions/docs/examples/extensions/mappy/marker.png differ diff --git a/chrome/common/extensions/docs/examples/extensions/maps_app/128.png b/chrome/common/extensions/docs/examples/extensions/maps_app/128.png index f8109e1..8148d6c 100644 Binary files a/chrome/common/extensions/docs/examples/extensions/maps_app/128.png and b/chrome/common/extensions/docs/examples/extensions/maps_app/128.png differ diff --git a/chrome/common/extensions/docs/examples/extensions/maps_app/24.png b/chrome/common/extensions/docs/examples/extensions/maps_app/24.png index 86daf92..0b4433e 100644 Binary files a/chrome/common/extensions/docs/examples/extensions/maps_app/24.png and b/chrome/common/extensions/docs/examples/extensions/maps_app/24.png differ diff --git a/chrome/common/extensions/docs/examples/extensions/news.zip b/chrome/common/extensions/docs/examples/extensions/news.zip index 7c8d358..d8b6015 100644 Binary files a/chrome/common/extensions/docs/examples/extensions/news.zip and b/chrome/common/extensions/docs/examples/extensions/news.zip differ diff --git a/chrome/common/extensions/docs/examples/extensions/news/images/buzz.png b/chrome/common/extensions/docs/examples/extensions/news/images/buzz.png index c81c585..c02f12d 100644 Binary files a/chrome/common/extensions/docs/examples/extensions/news/images/buzz.png and b/chrome/common/extensions/docs/examples/extensions/news/images/buzz.png differ diff --git a/chrome/common/extensions/docs/examples/extensions/news/images/delete-icon.png b/chrome/common/extensions/docs/examples/extensions/news/images/delete-icon.png index 732b36e..4087427 100644 Binary files a/chrome/common/extensions/docs/examples/extensions/news/images/delete-icon.png and b/chrome/common/extensions/docs/examples/extensions/news/images/delete-icon.png differ diff --git a/chrome/common/extensions/docs/examples/extensions/news/images/fb.png b/chrome/common/extensions/docs/examples/extensions/news/images/fb.png index b6cba93..6298d4f 100644 Binary files a/chrome/common/extensions/docs/examples/extensions/news/images/fb.png and b/chrome/common/extensions/docs/examples/extensions/news/images/fb.png differ diff --git a/chrome/common/extensions/docs/examples/extensions/news/images/news_action.png b/chrome/common/extensions/docs/examples/extensions/news/images/news_action.png index 24b0ca7..98fe9b2 100644 Binary files a/chrome/common/extensions/docs/examples/extensions/news/images/news_action.png and b/chrome/common/extensions/docs/examples/extensions/news/images/news_action.png differ diff --git a/chrome/common/extensions/docs/examples/extensions/news/images/news_icon.png b/chrome/common/extensions/docs/examples/extensions/news/images/news_icon.png index 42da406..7d69f79 100644 Binary files a/chrome/common/extensions/docs/examples/extensions/news/images/news_icon.png and b/chrome/common/extensions/docs/examples/extensions/news/images/news_icon.png differ diff --git a/chrome/common/extensions/docs/examples/extensions/news/images/twitter.png b/chrome/common/extensions/docs/examples/extensions/news/images/twitter.png index 111f3f4..278ea7f 100644 Binary files a/chrome/common/extensions/docs/examples/extensions/news/images/twitter.png and b/chrome/common/extensions/docs/examples/extensions/news/images/twitter.png differ diff --git a/chrome/common/extensions/docs/examples/extensions/news_a11y.zip b/chrome/common/extensions/docs/examples/extensions/news_a11y.zip index 7a98522..33deba2 100644 Binary files a/chrome/common/extensions/docs/examples/extensions/news_a11y.zip and b/chrome/common/extensions/docs/examples/extensions/news_a11y.zip differ diff --git a/chrome/common/extensions/docs/examples/extensions/news_a11y/news_action.png b/chrome/common/extensions/docs/examples/extensions/news_a11y/news_action.png index 24b0ca7..98fe9b2 100644 Binary files a/chrome/common/extensions/docs/examples/extensions/news_a11y/news_action.png and b/chrome/common/extensions/docs/examples/extensions/news_a11y/news_action.png differ diff --git a/chrome/common/extensions/docs/examples/extensions/news_a11y/news_icon.png b/chrome/common/extensions/docs/examples/extensions/news_a11y/news_icon.png index 42da406..7d69f79 100644 Binary files a/chrome/common/extensions/docs/examples/extensions/news_a11y/news_icon.png and b/chrome/common/extensions/docs/examples/extensions/news_a11y/news_icon.png differ diff --git a/chrome/common/extensions/docs/examples/extensions/news_i18n.zip b/chrome/common/extensions/docs/examples/extensions/news_i18n.zip index 212a07b..d11612a 100644 Binary files a/chrome/common/extensions/docs/examples/extensions/news_i18n.zip and b/chrome/common/extensions/docs/examples/extensions/news_i18n.zip differ diff --git a/chrome/common/extensions/docs/examples/extensions/news_i18n/news_action.png b/chrome/common/extensions/docs/examples/extensions/news_i18n/news_action.png index 24b0ca7..98fe9b2 100644 Binary files a/chrome/common/extensions/docs/examples/extensions/news_i18n/news_action.png and b/chrome/common/extensions/docs/examples/extensions/news_i18n/news_action.png differ diff --git a/chrome/common/extensions/docs/examples/extensions/news_i18n/news_icon.png b/chrome/common/extensions/docs/examples/extensions/news_i18n/news_icon.png index 42da406..7d69f79 100644 Binary files a/chrome/common/extensions/docs/examples/extensions/news_i18n/news_icon.png and b/chrome/common/extensions/docs/examples/extensions/news_i18n/news_icon.png differ diff --git a/chrome/common/extensions/docs/examples/extensions/oauth_contacts.zip b/chrome/common/extensions/docs/examples/extensions/oauth_contacts.zip index a8d23ea..8982836 100644 Binary files a/chrome/common/extensions/docs/examples/extensions/oauth_contacts.zip and b/chrome/common/extensions/docs/examples/extensions/oauth_contacts.zip differ diff --git a/chrome/common/extensions/docs/examples/extensions/oauth_contacts/img/icon-128.png b/chrome/common/extensions/docs/examples/extensions/oauth_contacts/img/icon-128.png index 1a50790..d04874d 100644 Binary files a/chrome/common/extensions/docs/examples/extensions/oauth_contacts/img/icon-128.png and b/chrome/common/extensions/docs/examples/extensions/oauth_contacts/img/icon-128.png differ diff --git a/chrome/common/extensions/docs/examples/extensions/oauth_contacts/img/icon-19-off.png b/chrome/common/extensions/docs/examples/extensions/oauth_contacts/img/icon-19-off.png index 73bb72d..123cbf7 100644 Binary files a/chrome/common/extensions/docs/examples/extensions/oauth_contacts/img/icon-19-off.png and b/chrome/common/extensions/docs/examples/extensions/oauth_contacts/img/icon-19-off.png differ diff --git a/chrome/common/extensions/docs/examples/extensions/oauth_contacts/img/icon-19-on.png b/chrome/common/extensions/docs/examples/extensions/oauth_contacts/img/icon-19-on.png index 74b1172..4451534 100644 Binary files a/chrome/common/extensions/docs/examples/extensions/oauth_contacts/img/icon-19-on.png and b/chrome/common/extensions/docs/examples/extensions/oauth_contacts/img/icon-19-on.png differ diff --git a/chrome/common/extensions/docs/examples/extensions/oauth_contacts/img/icon-32.png b/chrome/common/extensions/docs/examples/extensions/oauth_contacts/img/icon-32.png index 4434c81..6e05a2b 100644 Binary files a/chrome/common/extensions/docs/examples/extensions/oauth_contacts/img/icon-32.png and b/chrome/common/extensions/docs/examples/extensions/oauth_contacts/img/icon-32.png differ diff --git a/chrome/common/extensions/docs/examples/extensions/oauth_contacts/img/icon-48.png b/chrome/common/extensions/docs/examples/extensions/oauth_contacts/img/icon-48.png index 6b55784..93960b9 100644 Binary files a/chrome/common/extensions/docs/examples/extensions/oauth_contacts/img/icon-48.png and b/chrome/common/extensions/docs/examples/extensions/oauth_contacts/img/icon-48.png differ diff --git a/chrome/common/extensions/docs/examples/extensions/wave.zip b/chrome/common/extensions/docs/examples/extensions/wave.zip index 32f3231..81e5379 100644 Binary files a/chrome/common/extensions/docs/examples/extensions/wave.zip and b/chrome/common/extensions/docs/examples/extensions/wave.zip differ diff --git a/chrome/common/extensions/docs/examples/extensions/wave/128.png b/chrome/common/extensions/docs/examples/extensions/wave/128.png index cec8dae..b2ef48c 100644 Binary files a/chrome/common/extensions/docs/examples/extensions/wave/128.png and b/chrome/common/extensions/docs/examples/extensions/wave/128.png differ diff --git a/chrome/common/extensions/docs/examples/extensions/wave/16.png b/chrome/common/extensions/docs/examples/extensions/wave/16.png index 80a6968..6b82d6a 100644 Binary files a/chrome/common/extensions/docs/examples/extensions/wave/16.png and b/chrome/common/extensions/docs/examples/extensions/wave/16.png differ diff --git a/chrome/common/extensions/docs/examples/extensions/wave/48.png b/chrome/common/extensions/docs/examples/extensions/wave/48.png index 06c8adc..0ec2b62 100644 Binary files a/chrome/common/extensions/docs/examples/extensions/wave/48.png and b/chrome/common/extensions/docs/examples/extensions/wave/48.png differ diff --git a/chrome/common/extensions/docs/examples/extensions/wave/64.png b/chrome/common/extensions/docs/examples/extensions/wave/64.png index 2090cfb..11a31b4 100644 Binary files a/chrome/common/extensions/docs/examples/extensions/wave/64.png and b/chrome/common/extensions/docs/examples/extensions/wave/64.png differ diff --git a/chrome/common/extensions/docs/examples/extensions/wave/authorized.png b/chrome/common/extensions/docs/examples/extensions/wave/authorized.png index 80a6968..6b82d6a 100644 Binary files a/chrome/common/extensions/docs/examples/extensions/wave/authorized.png and b/chrome/common/extensions/docs/examples/extensions/wave/authorized.png differ diff --git a/chrome/common/extensions/docs/examples/extensions/wave/logo.png b/chrome/common/extensions/docs/examples/extensions/wave/logo.png index 6593b01..0004103 100644 Binary files a/chrome/common/extensions/docs/examples/extensions/wave/logo.png and b/chrome/common/extensions/docs/examples/extensions/wave/logo.png differ diff --git a/chrome/common/extensions/docs/examples/extensions/wave/unauthorized.png b/chrome/common/extensions/docs/examples/extensions/wave/unauthorized.png index dc8f763..eef5b09 100644 Binary files a/chrome/common/extensions/docs/examples/extensions/wave/unauthorized.png and b/chrome/common/extensions/docs/examples/extensions/wave/unauthorized.png differ diff --git a/chrome/common/extensions/docs/examples/howto/contentscript_xhr/sample-128.png b/chrome/common/extensions/docs/examples/howto/contentscript_xhr/sample-128.png index 1c961db..d733b1e 100644 Binary files a/chrome/common/extensions/docs/examples/howto/contentscript_xhr/sample-128.png and b/chrome/common/extensions/docs/examples/howto/contentscript_xhr/sample-128.png differ diff --git a/chrome/common/extensions/docs/examples/howto/contentscript_xhr/sample-48.png b/chrome/common/extensions/docs/examples/howto/contentscript_xhr/sample-48.png index bee88b7..3af1eb8 100644 Binary files a/chrome/common/extensions/docs/examples/howto/contentscript_xhr/sample-48.png and b/chrome/common/extensions/docs/examples/howto/contentscript_xhr/sample-48.png differ diff --git a/chrome/common/extensions/docs/examples/tutorials/analytics/analytics-extension-icon-128.png b/chrome/common/extensions/docs/examples/tutorials/analytics/analytics-extension-icon-128.png index 105443f..de390dc 100644 Binary files a/chrome/common/extensions/docs/examples/tutorials/analytics/analytics-extension-icon-128.png and b/chrome/common/extensions/docs/examples/tutorials/analytics/analytics-extension-icon-128.png differ diff --git a/chrome/common/extensions/docs/examples/tutorials/analytics/analytics-extension-icon-19.png b/chrome/common/extensions/docs/examples/tutorials/analytics/analytics-extension-icon-19.png index b91a8b8..08c2b2e 100644 Binary files a/chrome/common/extensions/docs/examples/tutorials/analytics/analytics-extension-icon-19.png and b/chrome/common/extensions/docs/examples/tutorials/analytics/analytics-extension-icon-19.png differ diff --git a/chrome/common/extensions/docs/examples/tutorials/analytics/analytics-extension-icon-48.png b/chrome/common/extensions/docs/examples/tutorials/analytics/analytics-extension-icon-48.png index 391f064..80395b8 100644 Binary files a/chrome/common/extensions/docs/examples/tutorials/analytics/analytics-extension-icon-48.png and b/chrome/common/extensions/docs/examples/tutorials/analytics/analytics-extension-icon-48.png differ diff --git a/chrome/common/extensions/docs/examples/tutorials/getstarted/icon.png b/chrome/common/extensions/docs/examples/tutorials/getstarted/icon.png index 103ff36..0fe39b0 100644 Binary files a/chrome/common/extensions/docs/examples/tutorials/getstarted/icon.png and b/chrome/common/extensions/docs/examples/tutorials/getstarted/icon.png differ diff --git a/chrome/common/extensions/docs/experimental.contentSettings.misc.html b/chrome/common/extensions/docs/experimental.contentSettings.misc.html new file mode 100644 index 0000000..61631d8 --- /dev/null +++ b/chrome/common/extensions/docs/experimental.contentSettings.misc.html @@ -0,0 +1,574 @@ + + + + + + + + + chrome.experimental.contentSettings.misc - Google Chrome Extensions - Google Code +
+
+ You are viewing extension docs in chrome via the 'file:' scheme: are you expecting to see local changes when you refresh? You'll need run chrome with --allow-file-access-from-files. +
+ + +
+ + +
+
+ paramName + + + +
+ ( + optional + enumerated + + + Type + + + + array of + + paramType + + + + ) +
+ +
+
+
+ Undocumented. +
+
+ Description of this parameter from the json schema. +
+
+ This parameter was added in version + . + You must omit this parameter in earlier versions, + and you may omit it in any version. If you require this + parameter, the manifest key + minimum_chrome_version + can ensure that your extension won't be run in an earlier browser version. +
+ + +
+
+
+
+
+
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ +
+ +
+
Parameters
+
+
+
+
+
+
+
+
+ + + + + + + + + + + +
+ + +
+

Google Chrome Extensions (Labs)

+ +
+ +
+ + + + +
+
+

chrome.experimental.contentSettings.misc

+
+ +
+

Contents

+
    +
  1. + h2Name +
      +
    1. + h3Name +
    2. +
    +
  2. +
  3. + API reference: chrome.experimental.contentSettings.misc +
      +
    1. + Properties +
        +
      1. + blockThirdPartyCookies +
      2. +
      +
    2. +
    3. + Methods +
        +
      1. + methodName +
      2. +
      +
    4. +
    5. + Events +
        +
      1. + eventName +
      2. +
      +
    6. +
    7. + Types +
        +
      1. + id +
      2. +
      +
    8. +
    +
  4. +
+
+ + + +

+ For information on how to use experimental APIs, see the chrome.experimental.* APIs page. +

+ + +
+ + +
+ +

API reference: chrome.experimental.contentSettings.misc

+ + +
+ +

Properties

+ +
+ +

blockThirdPartyCookies

+
+ + chrome.experimental.contentSettings.misc.blockThirdPartyCookies +
+
+
+ blockThirdPartyCookies + + + +
+ ( + + + + + Preference + + + + array of + + paramType + + + + ) +
+ +
+
+ +
Whether third party cookies should be blocked. The value of this preference is of type boolean.
+
+ This parameter was added in version + . + You must omit this parameter in earlier versions, + and you may omit it in any version. If you require this + parameter, the manifest key + minimum_chrome_version + can ensure that your extension won't be run in an earlier browser version. +
+ + +
+
+
+
+
+
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ +
+
+ +
+ + + + + + + + + + +
+
+
+
+ +
+ diff --git a/chrome/common/extensions/docs/experimental.extension.html b/chrome/common/extensions/docs/experimental.extension.html new file mode 100644 index 0000000..4d203ae --- /dev/null +++ b/chrome/common/extensions/docs/experimental.extension.html @@ -0,0 +1,1638 @@ + + + + + + + + + chrome.experimental.extension - Google Chrome Extensions - Google Code +
+
+ You are viewing extension docs in chrome via the 'file:' scheme: are you expecting to see local changes when you refresh? You'll need run chrome with --allow-file-access-from-files. +
+ + +
+ + +
+
+ paramName + + + +
+ ( + optional + enumerated + + + Type + + + + array of + + paramType + + + + ) +
+ +
+
+
+ Undocumented. +
+
+ Description of this parameter from the json schema. +
+
+ This parameter was added in version + . + You must omit this parameter in earlier versions, + and you may omit it in any version. If you require this + parameter, the manifest key + minimum_chrome_version + can ensure that your extension won't be run in an earlier browser version. +
+ + +
+
+
+
+
+
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ +
+ +
+
Parameters
+
+
+
+
+
+
+
+
+ + + + + + + + + + + +
+ + +
+

Google Chrome Extensions (Labs)

+ +
+ +
+ + + + +
+
+

chrome.experimental.extension

+
+ +
+

Contents

+
    +
  1. + h2Name +
      +
    1. + h3Name +
    2. +
    +
  2. +
  3. + API reference: chrome.experimental.extension +
      +
    1. + Properties +
        +
      1. + propertyName +
      2. +
      +
    2. +
    3. + Methods +
        +
      1. + methodName +
      2. +
      +
    4. +
    5. + Events +
        +
      1. + eventName +
      2. +
      +
    6. +
    7. + Types +
        +
      1. + Preference +
      2. +
      +
    8. +
    +
  4. +
+
+ + + +

+ For information on how to use experimental APIs, see the chrome.experimental.* APIs page. +

+ + +
+ + +
+ +

API reference: chrome.experimental.extension

+ + + + + + + + + + + +
+ +

Types

+ + +
+ +

Preference

+ +
+
+ paramName + + + +
+ ( + + + + + Type + + + + array of + + object + + + + ) +
+ +
+
+ +
An object which allows access to a preference.
+
+ This parameter was added in version + . + You must omit this parameter in earlier versions, + and you may omit it in any version. If you require this + parameter, the manifest key + minimum_chrome_version + can ensure that your extension won't be run in an earlier browser version. +
+ + +
+
+
+
+
+
+
+
+ + +
+
+ +

Methods of Preference

+ + +
+ +

clear

+ +
void + + preference.clear(, object + details, function + callback)
+ +
+ +

Clears the setting in the user preferences. This way default settings can become effective again.

+ + +

Parameters

+
+
+
+
+ details + + + +
+ ( + + + + + Type + + + + array of + + object + + + + ) +
+ +
+
+ +
What setting to clear.
+
+ This parameter was added in version + . + You must omit this parameter in earlier versions, + and you may omit it in any version. If you require this + parameter, the manifest key + minimum_chrome_version + can ensure that your extension won't be run in an earlier browser version. +
+ + +
+
+
+
+
+ incognito + + + +
+ ( + optional + + + + Type + + + + array of + + boolean + + + + ) +
+ +
+
+ +
Whether to clear the setting for the incognito session only (default false).
+
+ This parameter was added in version + . + You must omit this parameter in earlier versions, + and you may omit it in any version. If you require this + parameter, the manifest key + minimum_chrome_version + can ensure that your extension won't be run in an earlier browser version. +
+ + +
+
+
+
+
+
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ +
+
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ +
+
+
+
+ callback + + + +
+ ( + optional + + + + Type + + + + array of + + function + + + + ) +
+ +
+
+ +
Called after the preference has been cleared.
+
+ This parameter was added in version + . + You must omit this parameter in earlier versions, + and you may omit it in any version. If you require this + parameter, the manifest key + minimum_chrome_version + can ensure that your extension won't be run in an earlier browser version. +
+ + +
+
+
+
+
+
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ +
+
+
+ + +

Returns

+
+
+
+
+
+
+ + +
+
+

Callback function

+

+ The callback parameter should specify a function + that looks like this: +

+

+ If you specify the callback parameter, it should + specify a function that looks like this: +

+ + +
function() {...};
+
+
+
+
+
+
+
+
+ + +

+ This function was added in version . + If you require this function, the manifest key + minimum_chrome_version + can ensure that your extension won't be run in an earlier browser version. +

+
+ +
+ +

get

+ +
void + + preference.get(, object + details, function + callback)
+ +
+ +

Get the setting from the user preferences.

+ + +

Parameters

+
+
+
+
+ details + + + +
+ ( + + + + + Type + + + + array of + + object + + + + ) +
+ +
+
+ +
What setting to return.
+
+ This parameter was added in version + . + You must omit this parameter in earlier versions, + and you may omit it in any version. If you require this + parameter, the manifest key + minimum_chrome_version + can ensure that your extension won't be run in an earlier browser version. +
+ + +
+
+
+
+
+ incognito + + + +
+ ( + optional + + + + Type + + + + array of + + boolean + + + + ) +
+ +
+
+ +
Whether to return the setting that applies to the incognito session only (default false).
+
+ This parameter was added in version + . + You must omit this parameter in earlier versions, + and you may omit it in any version. If you require this + parameter, the manifest key + minimum_chrome_version + can ensure that your extension won't be run in an earlier browser version. +
+ + +
+
+
+
+
+
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ +
+
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ +
+
+
+
+ callback + + + +
+ ( + + + + + Type + + + + array of + + function + + + + ) +
+ +
+
+
+ Undocumented. +
+
+ Description of this parameter from the json schema. +
+
+ This parameter was added in version + . + You must omit this parameter in earlier versions, + and you may omit it in any version. If you require this + parameter, the manifest key + minimum_chrome_version + can ensure that your extension won't be run in an earlier browser version. +
+ + +
+
+
+
+
+
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ +
+
+
+ + +

Returns

+
+
+
+
+
+
+ + +
+
+

Callback function

+

+ The callback parameter should specify a function + that looks like this: +

+

+ If you specify the callback parameter, it should + specify a function that looks like this: +

+ + +
function(object details) {...};
+
+
+
+
+ details + + + +
+ ( + + + + + Type + + + + array of + + object + + + + ) +
+ +
+
+ +
Details of the currently effective preference value.
+
+ This parameter was added in version + . + You must omit this parameter in earlier versions, + and you may omit it in any version. If you require this + parameter, the manifest key + minimum_chrome_version + can ensure that your extension won't be run in an earlier browser version. +
+ + +
+
+
+
+
+ value + + + +
+ ( + + + + + Type + + + + array of + + any + + + + ) +
+ +
+
+ +
The value of the preference.
+
+ This parameter was added in version + . + You must omit this parameter in earlier versions, + and you may omit it in any version. If you require this + parameter, the manifest key + minimum_chrome_version + can ensure that your extension won't be run in an earlier browser version. +
+ + +
+
+
+
+
+
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ +
+
+
+
+ levelOfControl + + + +
+ ( + + enumerated + + + Type + + + + array of + + string + ["NotControllable", "ControlledByOtherExtensions", "ControllableByThisExtension", "ControlledByThisExtension"] + + + ) +
+ +
+
+ +
One of
NotControllable = cannot be controlled by any extension
ControlledByOtherExtensions = controlled by extensions with higher precedence
ControllableByThisExtension = can be controlled by this extension
ControlledByThisExtension = controlled by this extension
+
+ This parameter was added in version + . + You must omit this parameter in earlier versions, + and you may omit it in any version. If you require this + parameter, the manifest key + minimum_chrome_version + can ensure that your extension won't be run in an earlier browser version. +
+ + +
+
+
+
+
+
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ +
+
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ +
+
+
+
+
+ + +

+ This function was added in version . + If you require this function, the manifest key + minimum_chrome_version + can ensure that your extension won't be run in an earlier browser version. +

+
+ +
+ +

set

+ +
void + + preference.set(, object + details, function + callback)
+ +
+ +

Set the setting in the user preferences

+ + +

Parameters

+
+
+
+
+ details + + + +
+ ( + + + + + Type + + + + array of + + object + + + + ) +
+ +
+
+ +
What setting to change.
+
+ This parameter was added in version + . + You must omit this parameter in earlier versions, + and you may omit it in any version. If you require this + parameter, the manifest key + minimum_chrome_version + can ensure that your extension won't be run in an earlier browser version. +
+ + +
+
+
+
+
+ value + + + +
+ ( + + + + + Type + + + + array of + + any + + + + ) +
+ +
+
+ +
The value of the preference.
+
+ This parameter was added in version + . + You must omit this parameter in earlier versions, + and you may omit it in any version. If you require this + parameter, the manifest key + minimum_chrome_version + can ensure that your extension won't be run in an earlier browser version. +
+ + +
+
+
+
+
+
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ +
+
+
+
+ incognito + + + +
+ ( + optional + + + + Type + + + + array of + + boolean + + + + ) +
+ +
+
+ +
Whether to modify the setting for the incognito session only (default false).
+
+ This parameter was added in version + . + You must omit this parameter in earlier versions, + and you may omit it in any version. If you require this + parameter, the manifest key + minimum_chrome_version + can ensure that your extension won't be run in an earlier browser version. +
+ + +
+
+
+
+
+
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ +
+
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ +
+
+
+
+ callback + + + +
+ ( + optional + + + + Type + + + + array of + + function + + + + ) +
+ +
+
+ +
Called after the preference has been set.
+
+ This parameter was added in version + . + You must omit this parameter in earlier versions, + and you may omit it in any version. If you require this + parameter, the manifest key + minimum_chrome_version + can ensure that your extension won't be run in an earlier browser version. +
+ + +
+
+
+
+
+
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ +
+
+
+ + +

Returns

+
+
+
+
+
+
+ + +
+
+

Callback function

+

+ The callback parameter should specify a function + that looks like this: +

+

+ If you specify the callback parameter, it should + specify a function that looks like this: +

+ + +
function() {...};
+
+
+
+
+
+
+
+
+ + +

+ This function was added in version . + If you require this function, the manifest key + minimum_chrome_version + can ensure that your extension won't be run in an earlier browser version. +

+
+ +
+ +
+
+ + +
+
+
+ + +
+
+
+ +
+ +
+ +
+ +
+
+
+
+ +
+ diff --git a/chrome/common/extensions/docs/experimental.html b/chrome/common/extensions/docs/experimental.html index 80a6919..b7af23f 100644 --- a/chrome/common/extensions/docs/experimental.html +++ b/chrome/common/extensions/docs/experimental.html @@ -322,6 +322,8 @@ on the following experimental APIs:
  • experimental.clipboard
  • + experimental.contentSettings.misc
  • + experimental.extension
  • experimental.infobars
  • experimental.processes
  • experimental.proxy
  • @@ -367,13 +369,26 @@ upload extensions that use experimental APIs.
  • - Specify the --enable-experimental-extension-apis flag - when you launch the browser. - On Windows, you can do this by modifying - the properties of the shortcut that you use to launch Google Chrome. - For example: + Enable the experimental API in your browser. + You can do this in either of two ways: +
      +
    • Go to chrome://flags, + find "Experimental Extension APIs", + click its "Enable" link, + and restart Chrome. + From now on, + unless you return to that page and disable experimental APIs, + you'll be able to run extensions that use experimental APIs. +
    • +
    • Specify the --enable-experimental-extension-apis flag + each time you launch the browser. + On Windows, you can do this by modifying + the properties of the shortcut that you use to launch Google Chrome. + For example:
      path_to_chrome.exe --enable-experimental-extension-apis
      +
    • +
  • diff --git a/chrome/common/extensions/docs/experimental.proxy.html b/chrome/common/extensions/docs/experimental.proxy.html index 1b1a16c..485e607 100644 --- a/chrome/common/extensions/docs/experimental.proxy.html +++ b/chrome/common/extensions/docs/experimental.proxy.html @@ -16,7 +16,7 @@ - chrome.experimental.proxy - Google Chrome Extensions - Google Code + Proxy Settings - Google Chrome Extensions - Google Code
    You are viewing extension docs in chrome via the 'file:' scheme: are you expecting to see local changes when you refresh? You'll need run chrome with --allow-file-access-from-files. @@ -251,16 +251,43 @@
    -

    chrome.experimental.proxy

    +

    Proxy Settings

    Contents

      -
    1. - h2Name +
    2. + Manifest +
        +
      1. + h3Name +
      2. +
      +
    3. + Objects and properties
      1. + Proxy modes +
      2. + Proxy rules +
      3. + Proxy server objects +
      4. + Bypass list +
      5. +
      +
    4. + Precedence +
        +
      1. + h3Name +
      2. +
      +
    5. + Examples +
        +
      1. h3Name
      @@ -268,31 +295,27 @@
    6. API reference: chrome.experimental.proxy
        -
      1. +
      2. Properties
        1. - propertyName + settings
      3. -
      4. - Methods +
      5. + Methods
        1. - getCurrentProxySettings -
        2. - removeCustomProxySettings -
        3. - useCustomProxySettings + methodName
      6. -
      7. - Events +
      8. + Events
        1. - eventName + onProxyError
      9. @@ -317,12 +340,270 @@ -

        +

        -
        +
        Proxy Settings
        + + +

        +Use the chrome.experimental.proxysettings module to manage Chrome's +proxy settings. This module is still experimental. For information on how to use +experimental APIs, see the chrome.experimental.* + APIs page. +

        + +

        Manifest

        +

        You must declare the "proxy" permission +in the extension manifest +to use the proxy settings API. +For example:

        +
        {
        +  "name": "My extension",
        +  ...
        +  "permissions": [
        +    "experimental", "proxy"
        +  ],
        +  ...
        +}
        + +

        Objects and properties

        + +

        +Proxy settings are defined in a +ProxyConfig object. Depending on +Chrome's proxy settings, the settings may contain +ProxyRules or a PacScript. +

        + +

        Proxy modes

        + +

        +A ProxyConfig object's mode attribute determines the overall +behavior of Chrome with regards to proxy usage. It can take the following +values: +

        +
        direct
        +
        In direct mode all connections are created directly, without + any proxy involved. This mode allows no further parameters in the + ProxyConfig object.
        + +
        auto_detect
        +
        In auto_detect mode the proxy configuration is determined by + a PAC script that can be downloaded at + http://wpad/wpad.dat. + This mode allows no further parameters in the ProxyConfig + object.
        + +
        pac_script
        +
        In pac_script mode the proxy configuration is determined by + a PAC script that is either retrieved from the URL specified in the + PacScript object or + taken literally from the data element specified in the + PacScript object. + Besides this, this mode allows no further parameters in the + ProxyConfig object.
        + +
        fixed_servers
        +
        In fixed_servers mode the proxy configuration is codified in + a ProxyRules + object. Its structure is described in Proxy rules. + Besides this, the fixed_servers mode allows no further parameters + in the ProxyConfig object.
        + +
        system
        +
        In system mode the proxy configuration is taken from the + operating system. This mode allows no further parameters in the + ProxyConfig object. Note that the system mode is + different from setting no proxy configuration. In the latter case, Chrome + falls back to the system settings only if no command-line options influence + the proxy configuration.
        +
        +

        + +

        Proxy rules

        + +

        +The ProxyRules object can contain +either a singleProxy attribute or a subset of +proxyForHttp, proxyForHttps, proxyForFtp, +and fallbackProxy. +

        + +

        +In the first case, HTTP, HTTPS and FTP traffic is proxied through the specified +proxy server. Other traffic is sent directly. In the latter case the behavior is +slightly more subtle: If a proxy server is configured for the HTTP, HTTPS or FTP +protocol, the respective traffic is proxied through the specified server. If no +such proxy server is specified or traffic uses a different protocol than HTTP, +HTTPS or FTP, the fallbackProxy is used. If no +fallbackProxy is specified, traffic is sent directly without a +proxy server. +

        + +

        Proxy server objects

        + +

        +A proxy server is configured in a +ProxyServer object. The connection +to the proxy server (defined by the host attribute) uses the +protocol defined in the scheme attribute. If no scheme +is specified, the proxy connection defaults to http. +

        + +

        +If no port is defined in a +ProxyServer object, the port is +derived from the scheme. The default ports are: +

        + + + + + +
        SchemePort
        http80
        https443
        socks41080
        socks51080
        +

        + +

        Bypass list

        + +

        +Individual servers may be excluded from being proxied with the +bypassList. This list may contain the following entries: +

        +
        [<scheme>://]<host-pattern>[:<port>]
        +
        Match all hostnames that match the pattern <host-pattern>.
        + Examples: "foobar.com", "*foobar.com", "*.foobar.com", "*foobar.com:99", + "https://x.*.y.com:99"
        + +
        [<scheme>://]<ip-literal>[:<port>]
        +
        Match URLs that are IP address literals.
        + Conceptually this is the similar to the first case, but with special cases + to handle IP literal canonicalization. For example, matching + on "[0:0:0::1]" is the same as matching on "[::1]" because + the IPv6 canonicalization is done internally.
        + Examples: "127.0.1", "[0:0::1]", "[::1]", "http://[::1]:99"
        + +
        <ip-literal>/<prefix-length-in-bits>
        +
        Match any URL containing an IP literal within the given range. The IP + range is specified using CIDR notation.
        + Examples: "192.168.1.1/16", "fefe:13::abc/33"
        + +
        <local>
        +
        Match local addresses. An address is local if the host is "127.0.0.1", + "::1", or "localhost".
        + Example: "<local>"
        +
        + + +

        Precedence

        + +

        +Chrome manages settings on different layers. The following list describes the +layers that may influence the effective proxy settings, in increasing order of +precedence. +

          +
        1. System settings provided by the operating system
        2. +
        3. Command line parameters
        4. +
        5. Preferences set by extensions
        6. +
        7. Policies
        8. +
        +

        + +

        +As the list implies, policies might overrule any changes that you specify with +the proxy settings API. +

        + +

        +Chrome allows using different proxy settings for regular windows and incognito +windows. The following example illustrates the behavior. Assume that no policy +overrides the proxy settings and that an extension can set proxy settings for +regular windows (R) and proxy settings for incognito windows (I). +

        + +

        +

          +
        • If only (R) is set, these settings are effective for both regular + and incognito windows.
        • +
        • If only (I) is set, these settings are effective for only incognito + windows. Regular windows use the proxy settings determined by the lower layers + (command-line options and system settings).
        • +
        • If both (R) and (I) are set, the respective settings are + used for regular and incognito windows.
        • +
        +

        + +

        +If two extensions want to set proxy settings, the extension installed last takes +precedence over the other extensions. If the extension installed last sets only +(I), the settings of regular windows can be defined by more recently +installed extensions. +

        + + + +

        Examples

        + +

        +The following code sets a SOCKS 5 proxy for HTTP connections to all servers but +foobar.com and uses direct connections for all other protocols. The settings +apply to regular and incognito windows. +

        + +
        var config = {
        +  mode: "fixed_servers",
        +  rules: {
        +    httpProxy: {
        +      scheme: "socks5",
        +      host: "1.2.3.4"
        +    },
        +    bypassList: ["foobar.com"]
        +  }
        +};
        +chrome.experimental.proxy.settings.set(
        +    {'value': config, 'incognito': false},
        +    function() {});
        +
        + +

        +The following code sets a custom pac script. +

        + +
        var config = {
        +  mode: "pac_script",
        +  pacScript: {
        +    data: "function FindProxyForURL(url, host) {\n" +
        +          "  if (host == 'foobar.com')\n" +
        +          "    return 'PROXY blackhole:80';\n" +
        +          "  return 'DIRECT';\n" +
        +          "}"
        +  }
        +};
        +chrome.experimental.proxy.settings.set(
        +    {'value': config, 'incognito': false},
        +    function() {});
        +
        + +

        +The next snippet queries the current proxy settings. +

        + +
        chrome.experimental.proxy.settings.get(
        +    {'incognito': false},
        +    function(config) {console.log(JSON.stringify(config));});
        +
        + +

        +Note that the value object passed to set() is not +identical to the value object passed to callback function of +get(). The latter will contain a rules.httpProxy.port +element. +

        + + +
        @@ -330,50 +611,20 @@

        API reference: chrome.experimental.proxy

        - + + - -