Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5885)

Unified Diff: chrome_frame/test/ie_event_sink.h

Issue 3061036: Handle automation server crashes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome_frame/test/chrome_frame_automation_mock.h ('k') | chrome_frame/test/mock_ie_event_sink_actions.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome_frame/test/ie_event_sink.h
===================================================================
--- chrome_frame/test/ie_event_sink.h (revision 55540)
+++ chrome_frame/test/ie_event_sink.h (working copy)
@@ -57,6 +57,14 @@
virtual void OnNewBrowserWindow(IDispatch* new_window, const wchar_t* url) {}
};
+// Listener for IPropertyNotifySink.
+class PropertyNotifySinkListener {
+ public:
+ virtual ~PropertyNotifySinkListener() {}
+ virtual void OnChanged(DISPID dispid) {}
+ virtual void OnRequestEdit(DISPID dispid) {}
+};
+
// This class sets up event sinks to the IWebBrowser interface. It forwards
// all events to its listener.
// TODO(kkania): Delete WebBrowserEventSink and use this class instead for
@@ -229,6 +237,38 @@
static _ATL_FUNC_INFO kFileDownloadInfo;
};
+class PropertyNotifySinkImpl
+ : public CComObjectRootEx<CComSingleThreadModel>,
+ public IPropertyNotifySink {
+ public:
+ PropertyNotifySinkImpl() : listener_(NULL) {
+ }
+
+BEGIN_COM_MAP(PropertyNotifySinkImpl)
+ COM_INTERFACE_ENTRY(IPropertyNotifySink)
+END_COM_MAP()
+
+ STDMETHOD(OnChanged)(DISPID dispid) {
+ if (listener_)
+ listener_->OnChanged(dispid);
+ return S_OK;
+ }
+
+ STDMETHOD(OnRequestEdit)(DISPID dispid) {
+ if (listener_)
+ listener_->OnRequestEdit(dispid);
+ return S_OK;
+ }
+
+ void set_listener(PropertyNotifySinkListener* listener) {
+ DCHECK(listener_ == NULL || listener == NULL);
+ listener_ = listener;
+ }
+
+ protected:
+ PropertyNotifySinkListener* listener_;
+};
+
} // namespace chrome_frame_test
#endif // CHROME_FRAME_TEST_IE_EVENT_SINK_H_
« no previous file with comments | « chrome_frame/test/chrome_frame_automation_mock.h ('k') | chrome_frame/test/mock_ie_event_sink_actions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698