| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // IE ChromeFrameHost implementation. | 5 // IE ChromeFrameHost implementation. |
| 6 #ifndef CEEE_IE_COMMON_CHROME_FRAME_HOST_H_ | 6 #ifndef CEEE_IE_COMMON_CHROME_FRAME_HOST_H_ |
| 7 #define CEEE_IE_COMMON_CHROME_FRAME_HOST_H_ | 7 #define CEEE_IE_COMMON_CHROME_FRAME_HOST_H_ |
| 8 | 8 |
| 9 #include <atlbase.h> | 9 #include <atlbase.h> |
| 10 #include <atlwin.h> | 10 #include <atlwin.h> |
| 11 #include <atlcrack.h> | 11 #include <atlcrack.h> |
| 12 #include <list> | 12 #include <list> |
| 13 | 13 |
| 14 #include "base/basictypes.h" | 14 #include "base/basictypes.h" |
| 15 #include "base/scoped_handle.h" | 15 #include "base/win/scoped_handle.h" |
| 16 #include "ceee/common/initializing_coclass.h" | 16 #include "ceee/common/initializing_coclass.h" |
| 17 #include "chrome_tab.h" // NOLINT | 17 #include "chrome_tab.h" // NOLINT |
| 18 | 18 |
| 19 // fwd. | 19 // fwd. |
| 20 struct IAxWinHostWindow; | 20 struct IAxWinHostWindow; |
| 21 | 21 |
| 22 class IChromeFrameHostEvents: public IUnknown { | 22 class IChromeFrameHostEvents: public IUnknown { |
| 23 public: | 23 public: |
| 24 virtual HRESULT OnCfReadyStateChanged(LONG state) = 0; | 24 virtual HRESULT OnCfReadyStateChanged(LONG state) = 0; |
| 25 virtual HRESULT OnCfPrivateMessage(BSTR msg, BSTR origin, BSTR target) = 0; | 25 virtual HRESULT OnCfPrivateMessage(BSTR msg, BSTR origin, BSTR target) = 0; |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 205 PostedMessageList posted_messages_; | 205 PostedMessageList posted_messages_; |
| 206 | 206 |
| 207 // True iff Chrome Frame has reported a document loaded event. | 207 // True iff Chrome Frame has reported a document loaded event. |
| 208 // TODO(mad@chromium.org): Use a three states variable to take the | 208 // TODO(mad@chromium.org): Use a three states variable to take the |
| 209 // error case into account. | 209 // error case into account. |
| 210 bool document_loaded_; | 210 bool document_loaded_; |
| 211 | 211 |
| 212 #ifndef NDEBUG | 212 #ifndef NDEBUG |
| 213 // We use a cross process event to make sure there is only one chrome frame | 213 // We use a cross process event to make sure there is only one chrome frame |
| 214 // host that returns ExtensionApisToAutomate... But only needed for a DCHECK. | 214 // host that returns ExtensionApisToAutomate... But only needed for a DCHECK. |
| 215 ScopedHandle automating_extension_api_; | 215 base::win::ScopedHandle automating_extension_api_; |
| 216 #endif | 216 #endif |
| 217 | 217 |
| 218 // A cached BSTR for the posted messages origin (which is kAutomationOrigin). | 218 // A cached BSTR for the posted messages origin (which is kAutomationOrigin). |
| 219 CComBSTR origin_; | 219 CComBSTR origin_; |
| 220 | 220 |
| 221 // Our event sink. | 221 // Our event sink. |
| 222 CComPtr<IChromeFrameHostEvents> event_sink_; | 222 CComPtr<IChromeFrameHostEvents> event_sink_; |
| 223 | 223 |
| 224 // Function info objects describing our message handlers. | 224 // Function info objects describing our message handlers. |
| 225 // Effectively const but can't make const because of silly ATL macro problem. | 225 // Effectively const but can't make const because of silly ATL macro problem. |
| 226 static _ATL_FUNC_INFO handler_type_idispatch_; | 226 static _ATL_FUNC_INFO handler_type_idispatch_; |
| 227 static _ATL_FUNC_INFO handler_type_long_; | 227 static _ATL_FUNC_INFO handler_type_long_; |
| 228 static _ATL_FUNC_INFO handler_type_idispatch_bstr_; | 228 static _ATL_FUNC_INFO handler_type_idispatch_bstr_; |
| 229 static _ATL_FUNC_INFO handler_type_idispatch_variantptr_; | 229 static _ATL_FUNC_INFO handler_type_idispatch_variantptr_; |
| 230 static _ATL_FUNC_INFO handler_type_bstr_i4_; | 230 static _ATL_FUNC_INFO handler_type_bstr_i4_; |
| 231 static _ATL_FUNC_INFO handler_type_bstrarray_; | 231 static _ATL_FUNC_INFO handler_type_bstrarray_; |
| 232 static _ATL_FUNC_INFO handler_type_void_; | 232 static _ATL_FUNC_INFO handler_type_void_; |
| 233 | 233 |
| 234 DISALLOW_COPY_AND_ASSIGN(ChromeFrameHost); | 234 DISALLOW_COPY_AND_ASSIGN(ChromeFrameHost); |
| 235 }; | 235 }; |
| 236 | 236 |
| 237 #endif // CEEE_IE_COMMON_CHROME_FRAME_HOST_H_ | 237 #endif // CEEE_IE_COMMON_CHROME_FRAME_HOST_H_ |
| OLD | NEW |