OLD | NEW |
1 // Copyright (c) 2011 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 #ifndef CHROME_FRAME_READY_MODE_INTERNAL_READY_MODE_WEB_BROWSER_ADAPTER_H_ | 5 #ifndef CHROME_FRAME_READY_MODE_INTERNAL_READY_MODE_WEB_BROWSER_ADAPTER_H_ |
6 #define CHROME_FRAME_READY_MODE_INTERNAL_READY_MODE_WEB_BROWSER_ADAPTER_H_ | 6 #define CHROME_FRAME_READY_MODE_INTERNAL_READY_MODE_WEB_BROWSER_ADAPTER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <atlbase.h> | 9 #include <atlbase.h> |
10 #include <atlcom.h> | 10 #include <atlcom.h> |
11 #include <exdisp.h> | 11 #include <exdisp.h> |
12 #include <exdispid.h> | 12 #include <exdispid.h> |
13 | 13 |
14 #include <string> | 14 #include <string> |
15 | 15 |
16 #include "base/basictypes.h" | 16 #include "base/basictypes.h" |
17 #include "base/scoped_ptr.h" | 17 #include "base/scoped_ptr.h" |
| 18 #include "base/win/atlcheck.h" |
18 #include "base/win/scoped_comptr.h" | 19 #include "base/win/scoped_comptr.h" |
19 | 20 |
20 // Observes navigation and rendering in an IWebBrowser2 instance and reports | 21 // Observes navigation and rendering in an IWebBrowser2 instance and reports |
21 // activity to an observer. | 22 // activity to an observer. |
22 class ATL_NO_VTABLE ReadyModeWebBrowserAdapter | 23 class ATL_NO_VTABLE ReadyModeWebBrowserAdapter |
23 : public CComObjectRootEx<CComSingleThreadModel>, | 24 : public CComObjectRootEx<CComSingleThreadModel>, |
24 public IDispEventSimpleImpl<0, ReadyModeWebBrowserAdapter, | 25 public IDispEventSimpleImpl<0, ReadyModeWebBrowserAdapter, |
25 &DIID_DWebBrowserEvents2> { | 26 &DIID_DWebBrowserEvents2> { |
26 public: | 27 public: |
27 // Receives notification of navigation and rendering activity in the | 28 // Receives notification of navigation and rendering activity in the |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 base::win::ScopedComPtr<IWebBrowser2> web_browser_; | 80 base::win::ScopedComPtr<IWebBrowser2> web_browser_; |
80 | 81 |
81 static _ATL_FUNC_INFO kBeforeNavigate2Info; | 82 static _ATL_FUNC_INFO kBeforeNavigate2Info; |
82 static _ATL_FUNC_INFO kDocumentCompleteInfo; | 83 static _ATL_FUNC_INFO kDocumentCompleteInfo; |
83 static _ATL_FUNC_INFO kOnQuitInfo; | 84 static _ATL_FUNC_INFO kOnQuitInfo; |
84 | 85 |
85 DISALLOW_COPY_AND_ASSIGN(ReadyModeWebBrowserAdapter); | 86 DISALLOW_COPY_AND_ASSIGN(ReadyModeWebBrowserAdapter); |
86 }; // class ReadyModeWebBrowserAdapter | 87 }; // class ReadyModeWebBrowserAdapter |
87 | 88 |
88 #endif // CHROME_FRAME_READY_MODE_INTERNAL_READY_MODE_WEB_BROWSER_ADAPTER_H_ | 89 #endif // CHROME_FRAME_READY_MODE_INTERNAL_READY_MODE_WEB_BROWSER_ADAPTER_H_ |
OLD | NEW |