| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_FRAME_CHROME_FRAME_ACTIVEX_BASE_H_ | 5 #ifndef CHROME_FRAME_CHROME_FRAME_ACTIVEX_BASE_H_ |
| 6 #define CHROME_FRAME_CHROME_FRAME_ACTIVEX_BASE_H_ | 6 #define CHROME_FRAME_CHROME_FRAME_ACTIVEX_BASE_H_ |
| 7 | 7 |
| 8 #include <atlbase.h> | 8 #include <atlbase.h> |
| 9 #include <atlcom.h> | 9 #include <atlcom.h> |
| 10 #include <atlctl.h> | 10 #include <atlctl.h> |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 public CComControl<T>, | 169 public CComControl<T>, |
| 170 public ChromeFramePlugin<T> { | 170 public ChromeFramePlugin<T> { |
| 171 protected: | 171 protected: |
| 172 typedef std::set<ScopedComPtr<IDispatch> > EventHandlers; | 172 typedef std::set<ScopedComPtr<IDispatch> > EventHandlers; |
| 173 typedef ChromeFrameActivexBase<T, class_id> BasePlugin; | 173 typedef ChromeFrameActivexBase<T, class_id> BasePlugin; |
| 174 | 174 |
| 175 public: | 175 public: |
| 176 ChromeFrameActivexBase() | 176 ChromeFrameActivexBase() |
| 177 : ready_state_(READYSTATE_UNINITIALIZED) { | 177 : ready_state_(READYSTATE_UNINITIALIZED) { |
| 178 m_bWindowOnly = TRUE; | 178 m_bWindowOnly = TRUE; |
| 179 url_fetcher_.set_container(static_cast<IDispatch*>(this)); |
| 179 } | 180 } |
| 180 | 181 |
| 181 ~ChromeFrameActivexBase() { | 182 ~ChromeFrameActivexBase() { |
| 183 url_fetcher_.set_container(NULL); |
| 182 } | 184 } |
| 183 | 185 |
| 184 DECLARE_OLEMISC_STATUS(OLEMISC_RECOMPOSEONRESIZE | OLEMISC_CANTLINKINSIDE | | 186 DECLARE_OLEMISC_STATUS(OLEMISC_RECOMPOSEONRESIZE | OLEMISC_CANTLINKINSIDE | |
| 185 OLEMISC_INSIDEOUT | OLEMISC_ACTIVATEWHENVISIBLE | | 187 OLEMISC_INSIDEOUT | OLEMISC_ACTIVATEWHENVISIBLE | |
| 186 OLEMISC_SETCLIENTSITEFIRST) | 188 OLEMISC_SETCLIENTSITEFIRST) |
| 187 | 189 |
| 188 DECLARE_NOT_AGGREGATABLE(T) | 190 DECLARE_NOT_AGGREGATABLE(T) |
| 189 | 191 |
| 190 BEGIN_COM_MAP(ChromeFrameActivexBase) | 192 BEGIN_COM_MAP(ChromeFrameActivexBase) |
| 191 COM_INTERFACE_ENTRY(IChromeFrame) | 193 COM_INTERFACE_ENTRY(IChromeFrame) |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 253 // Set to true if this is the first launch by this process. | 255 // Set to true if this is the first launch by this process. |
| 254 // Used to perform one time tasks. | 256 // Used to perform one time tasks. |
| 255 if (g_first_launch_by_process_) { | 257 if (g_first_launch_by_process_) { |
| 256 g_first_launch_by_process_ = false; | 258 g_first_launch_by_process_ = false; |
| 257 THREAD_SAFE_UMA_HISTOGRAM_CUSTOM_COUNTS("ChromeFrame.IEVersion", | 259 THREAD_SAFE_UMA_HISTOGRAM_CUSTOM_COUNTS("ChromeFrame.IEVersion", |
| 258 GetIEVersion(), | 260 GetIEVersion(), |
| 259 IE_INVALID, | 261 IE_INVALID, |
| 260 IE_8, | 262 IE_8, |
| 261 IE_8 + 1); | 263 IE_8 + 1); |
| 262 } | 264 } |
| 263 url_fetcher_.set_container(static_cast<IDispatch*>(this)); | |
| 264 return S_OK; | 265 return S_OK; |
| 265 } | 266 } |
| 266 | 267 |
| 267 void FinalRelease() { | 268 void FinalRelease() { |
| 268 Uninitialize(); | 269 Uninitialize(); |
| 269 } | 270 } |
| 270 | 271 |
| 271 static HRESULT WINAPI InterfaceNotSupported(void* pv, REFIID riid, void** ppv, | 272 static HRESULT WINAPI InterfaceNotSupported(void* pv, REFIID riid, void** ppv, |
| 272 DWORD dw) { | 273 DWORD dw) { |
| 273 #ifndef NDEBUG | 274 #ifndef NDEBUG |
| (...skipping 857 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1131 EventHandlers onreadystatechanged_; | 1132 EventHandlers onreadystatechanged_; |
| 1132 EventHandlers onprivatemessage_; | 1133 EventHandlers onprivatemessage_; |
| 1133 EventHandlers onextensionready_; | 1134 EventHandlers onextensionready_; |
| 1134 | 1135 |
| 1135 // Handle network requests when host network stack is used. Passed to the | 1136 // Handle network requests when host network stack is used. Passed to the |
| 1136 // automation client on initialization. | 1137 // automation client on initialization. |
| 1137 UrlmonUrlRequestManager url_fetcher_; | 1138 UrlmonUrlRequestManager url_fetcher_; |
| 1138 }; | 1139 }; |
| 1139 | 1140 |
| 1140 #endif // CHROME_FRAME_CHROME_FRAME_ACTIVEX_BASE_H_ | 1141 #endif // CHROME_FRAME_CHROME_FRAME_ACTIVEX_BASE_H_ |
| OLD | NEW |