summaryrefslogtreecommitdiffstats
path: root/chrome_frame/chrome_frame_activex.cc
diff options
context:
space:
mode:
authorjoi@chromium.org <joi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-16 02:18:43 +0000
committerjoi@chromium.org <joi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-16 02:18:43 +0000
commita1e62d1553f81d66fa5fdc6a4e54a5531d378bbc (patch)
treeb14f0d7693c0843222d765da77d9c1ccc3e2de46 /chrome_frame/chrome_frame_activex.cc
parentd5b42ac0413ca4dbac88bce952044808ba40b1a9 (diff)
downloadchromium_src-a1e62d1553f81d66fa5fdc6a4e54a5531d378bbc.zip
chromium_src-a1e62d1553f81d66fa5fdc6a4e54a5531d378bbc.tar.gz
chromium_src-a1e62d1553f81d66fa5fdc6a4e54a5531d378bbc.tar.bz2
Adds an automation message to retrieve the list of enabled extensions, and CF bindings for it.
TEST=unit test to follow BUG=none Review URL: http://codereview.chromium.org/901002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41667 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/chrome_frame_activex.cc')
-rw-r--r--chrome_frame/chrome_frame_activex.cc19
1 files changed, 19 insertions, 0 deletions
diff --git a/chrome_frame/chrome_frame_activex.cc b/chrome_frame/chrome_frame_activex.cc
index 15ae065..3104f0e 100644
--- a/chrome_frame/chrome_frame_activex.cc
+++ b/chrome_frame/chrome_frame_activex.cc
@@ -255,6 +255,25 @@ void ChromeFrameActivex::OnExtensionInstalled(
Fire_onextensionready(path_str, response);
}
+void ChromeFrameActivex::OnGetEnabledExtensionsComplete(
+ void* user_data,
+ const std::vector<FilePath>& extension_directories) {
+ SAFEARRAY* sa = ::SafeArrayCreateVector(VT_BSTR, 0,
+ extension_directories.size());
+ sa->fFeatures = sa->fFeatures | FADF_BSTR;
+ ::SafeArrayLock(sa);
+
+ for (size_t i = 0; i < extension_directories.size(); ++i) {
+ LONG index = static_cast<LONG>(i);
+ ::SafeArrayPutElement(sa, &index, reinterpret_cast<void*>(
+ CComBSTR(extension_directories[i].ToWStringHack().c_str()).Detach()));
+ }
+
+ Fire_ongetenabledextensionscomplete(sa);
+ ::SafeArrayUnlock(sa);
+ ::SafeArrayDestroy(sa);
+}
+
HRESULT ChromeFrameActivex::OnDraw(ATL_DRAWINFO& draw_info) { // NO_LINT
HRESULT hr = S_OK;
int dc_type = ::GetObjectType(draw_info.hicTargetDev);