summaryrefslogtreecommitdiffstats
path: root/chrome_frame/chrome_frame_activex_base.h
diff options
context:
space:
mode:
authorhansl@google.com <hansl@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-05 22:06:31 +0000
committerhansl@google.com <hansl@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-05 22:06:31 +0000
commit751bf4bbbfa669bfa9c21eef69c150b8bdbf2250 (patch)
tree38a1859c3d8e256161f98d3df29ca051a38fbed3 /chrome_frame/chrome_frame_activex_base.h
parenta18194ac534a98e9a6527fb3633fa38db9b6459f (diff)
downloadchromium_src-751bf4bbbfa669bfa9c21eef69c150b8bdbf2250.zip
chromium_src-751bf4bbbfa669bfa9c21eef69c150b8bdbf2250.tar.gz
chromium_src-751bf4bbbfa669bfa9c21eef69c150b8bdbf2250.tar.bz2
Add support for returning the session_id in both CreateExternalTab and ConnectExternalTab.
The ChromeFrame objects now provides an unfrozen interface called IChromeFramePrivate. This interface provides a GetSessionId() which returns the ID used by Chrome in its Tab javascript object. This ID is necessary in CEEE for its tabs management. BUG=None TEST=None Review URL: http://codereview.chromium.org/4467002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65257 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/chrome_frame_activex_base.h')
-rw-r--r--chrome_frame/chrome_frame_activex_base.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/chrome_frame/chrome_frame_activex_base.h b/chrome_frame/chrome_frame_activex_base.h
index def29b8..736c690 100644
--- a/chrome_frame/chrome_frame_activex_base.h
+++ b/chrome_frame/chrome_frame_activex_base.h
@@ -166,6 +166,7 @@ class ATL_NO_VTABLE ChromeFrameActivexBase : // NOLINT
public com_util::IProvideClassInfo2Impl<class_id,
DIID_DIChromeFrameEvents>,
public com_util::IDispatchImpl<IChromeFrame>,
+ public IChromeFrameInternal,
public IConnectionPointContainerImpl<T>,
public ProxyDIChromeFrameEvents<T>,
public IPropertyNotifySinkCP<T>,
@@ -200,6 +201,7 @@ DECLARE_NOT_AGGREGATABLE(T)
BEGIN_COM_MAP(ChromeFrameActivexBase)
COM_INTERFACE_ENTRY(IChromeFrame)
COM_INTERFACE_ENTRY(IDispatch)
+ COM_INTERFACE_ENTRY(IChromeFrameInternal)
COM_INTERFACE_ENTRY(IViewObjectEx)
COM_INTERFACE_ENTRY(IViewObject2)
COM_INTERFACE_ENTRY(IViewObject)
@@ -889,6 +891,19 @@ END_MSG_MAP()
return S_OK;
}
+ STDMETHOD(getSessionId)(int* session_id) {
+ DCHECK(automation_client_.get());
+ DCHECK(session_id);
+
+ if (!is_privileged_) {
+ DLOG(ERROR) << "Attempt to getSessionId in non-privileged mode";
+ return E_ACCESSDENIED;
+ }
+
+ *session_id = automation_client_->GetSessionId();
+ return (*session_id) == -1 ? S_FALSE : S_OK;
+ }
+
STDMETHOD(registerBhoIfNeeded)() {
return E_NOTIMPL;
}