diff options
author | chaitanyag@chromium.org <chaitanyag@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-22 00:00:13 +0000 |
---|---|---|
committer | chaitanyag@chromium.org <chaitanyag@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-22 00:00:13 +0000 |
commit | 5157dd5fee258e451cb47c2052f8b1ab2b106801 (patch) | |
tree | 048c4ad4e8c5643a9b8b0b219cad2de2244ed2c8 | |
parent | 50bc61d493a09234c736415d6f94752eec09e7c7 (diff) | |
download | chromium_src-5157dd5fee258e451cb47c2052f8b1ab2b106801.zip chromium_src-5157dd5fee258e451cb47c2052f8b1ab2b106801.tar.gz chromium_src-5157dd5fee258e451cb47c2052f8b1ab2b106801.tar.bz2 |
Adding ChromeVox as a component extensions (enabled only for ChromeOS, for now)
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/6254007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72238 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/browser_resources.grd | 2 | ||||
-rw-r--r-- | chrome/browser/profiles/profile_impl.cc | 14 | ||||
-rwxr-xr-x | chrome/browser/resources/access_chromevox/manifest.json | 26 | ||||
-rw-r--r-- | chrome/common/extensions/extension_constants.cc | 4 | ||||
-rw-r--r-- | chrome/common/extensions/extension_constants.h | 6 |
5 files changed, 52 insertions, 0 deletions
diff --git a/chrome/browser/browser_resources.grd b/chrome/browser/browser_resources.grd index 5c926ca..27beb5f 100644 --- a/chrome/browser/browser_resources.grd +++ b/chrome/browser/browser_resources.grd @@ -100,6 +100,8 @@ without changes to the corresponding grd file. etaa --> <include name="IDR_NETWORK_MENU_JS" file="resources\network_menu.js" flattenhtml="true" type="BINDATA" /> <include name="IDR_WRENCH_MENU_JS" file="resources\wrench_menu.js" flattenhtml="true" type="BINDATA" /> <include name="IDR_WRENCH_MENU_CSS" file="resources\wrench_menu.css" flattenhtml="true" type="BINDATA" /> + <!-- manifest file of ChromeVox accessibility extension --> + <include name="IDR_CHROMEVOX_MANIFEST" file="resources\access_chromevox\manifest.json" type="BINDATA" /> </if> </includes> </release> diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/profile_impl.cc index 1204af0..01cd530 100644 --- a/chrome/browser/profiles/profile_impl.cc +++ b/chrome/browser/profiles/profile_impl.cc @@ -402,6 +402,20 @@ void ProfileImpl::RegisterComponentExtensions() { extensions_service_->register_component_extension( ExtensionService::ComponentExtensionInfo(manifest, path)); } + +#if defined(OS_CHROMEOS) + // Register access extensions only if accessibility is enabled. + if (g_browser_process->local_state()-> + GetBoolean(prefs::kAccessibilityEnabled)) { + FilePath path = FilePath(extension_misc::kAccessExtensionPath) + .AppendASCII("access_chromevox"); + std::string manifest = + ResourceBundle::GetSharedInstance().GetRawDataResource( + IDR_CHROMEVOX_MANIFEST).as_string(); + extensions_service_->register_component_extension( + ExtensionService::ComponentExtensionInfo(manifest, path)); + } +#endif } void ProfileImpl::InstallDefaultApps() { diff --git a/chrome/browser/resources/access_chromevox/manifest.json b/chrome/browser/resources/access_chromevox/manifest.json new file mode 100755 index 0000000..224d76b --- /dev/null +++ b/chrome/browser/resources/access_chromevox/manifest.json @@ -0,0 +1,26 @@ +{ + "key": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDltVl1k15pjRzuZfMc3B69inxwm2bZeZ2O8/zFO+NluHnBm3GJ3fzdOoFGJd+M16I8p7zxxQyHeDMfWYASyCeB8XnUEDKjqNLQfCnncsANzHsYoEbYj2nEUML2P13b9q+AAvpCBpAJ4cZp81e9n1y/vbSXHE4385cgkKueItzikQIDAQAB", + "name": "ChromeVox", + "version": "1.0", + "description": "ChromeVox - Giving Voice to Chrome.", + "background_page": "chromevox/background/background.html", + "permissions": [ + "bookmarks", + "tabs", + "experimental", + "http://*/", + "https://*/" + ], + "content_scripts": [ + { + "matches": [ "<all_urls>" ], + "all_frames": true, + "js": [ + "build/build_defs.js", + "build/build_config_chrome.js", + "chromevox/injected/main.js", + "common/extension_bridge.js" + ] + } + ] +} diff --git a/chrome/common/extensions/extension_constants.cc b/chrome/common/extensions/extension_constants.cc index 5235aed..8c5b495 100644 --- a/chrome/common/extensions/extension_constants.cc +++ b/chrome/common/extensions/extension_constants.cc @@ -332,4 +332,8 @@ namespace extension_misc { const char* kBookmarkManagerId = "eemcgdkfndhakfknompkggombfjjjeno"; const char* kWebStoreAppId = "ahfgeienlihckogmohjhadlkjgocpleb"; const char* kAppsPromoHistogram = "Extensions.AppsPromo"; +#if defined(OS_CHROMEOS) +const char* kAccessExtensionPath = + "/usr/share/chromeos-assets/accessibility/extensions"; +#endif } diff --git a/chrome/common/extensions/extension_constants.h b/chrome/common/extensions/extension_constants.h index d67966f..5e92dec 100644 --- a/chrome/common/extensions/extension_constants.h +++ b/chrome/common/extensions/extension_constants.h @@ -268,6 +268,12 @@ namespace extension_misc { PROMO_SEEN, PROMO_BUCKET_BOUNDARY }; + +#if defined(OS_CHROMEOS) + // The directory path on a ChromeOS device where accessibility extensions are + // stored. + extern const char* kAccessExtensionPath; +#endif } // extension_misc #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_CONSTANTS_H_ |