summaryrefslogtreecommitdiffstats
path: root/chrome_frame/chrome_frame_automation.h
diff options
context:
space:
mode:
authormad@chromium.org <mad@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-26 20:14:40 +0000
committermad@chromium.org <mad@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-26 20:14:40 +0000
commitefd4dfc2ed1aeab923b14db6ad2a9d11781ddab9 (patch)
tree5255c711b087d6a261d247d16e07ca23c6c62651 /chrome_frame/chrome_frame_automation.h
parent71cbdf4801cec5193cec3fe813ad5d20009bd042 (diff)
downloadchromium_src-efd4dfc2ed1aeab923b14db6ad2a9d11781ddab9.zip
chromium_src-efd4dfc2ed1aeab923b14db6ad2a9d11781ddab9.tar.gz
chromium_src-efd4dfc2ed1aeab923b14db6ad2a9d11781ddab9.tar.bz2
Added the propagation of the OnChannelError notification.
So that automation tests can tell when the communication between Chrome and Chrome Frame was cut. BUG=none TEST=none Review URL: http://codereview.chromium.org/1237003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42810 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/chrome_frame_automation.h')
-rw-r--r--chrome_frame/chrome_frame_automation.h18
1 files changed, 12 insertions, 6 deletions
diff --git a/chrome_frame/chrome_frame_automation.h b/chrome_frame/chrome_frame_automation.h
index 6c0d895..1a1948e 100644
--- a/chrome_frame/chrome_frame_automation.h
+++ b/chrome_frame/chrome_frame_automation.h
@@ -9,6 +9,7 @@
#include <atlwin.h>
#include <string>
#include <map>
+#include <vector>
#include "base/lock.h"
#include "base/ref_counted.h"
@@ -31,18 +32,19 @@ const unsigned long kCommandExecutionTimeout = 60000; // NOLINT, 60 seconds
class ProxyFactory;
enum AutomationPageFontSize;
-struct DECLSPEC_NOVTABLE ChromeFrameAutomationProxy {
+struct DECLSPEC_NOVTABLE ChromeFrameAutomationProxy { // NOLINT
virtual bool Send(IPC::Message* msg) = 0;
virtual void SendAsAsync(IPC::SyncMessage* msg, void* callback,
void* key) = 0;
virtual void CancelAsync(void* key) = 0;
virtual scoped_refptr<TabProxy> CreateTabProxy(int handle) = 0;
+ virtual void ReleaseTabProxy(AutomationHandle handle) = 0;
virtual std::string server_version() = 0;
virtual void SendProxyConfig(const std::string&) = 0;
protected:
- ~ChromeFrameAutomationProxy() {}
+ virtual ~ChromeFrameAutomationProxy() {}
};
// We extend the AutomationProxy class to handle our custom
@@ -58,11 +60,11 @@ class ChromeFrameAutomationProxyImpl : public ChromeFrameAutomationProxy,
virtual void CancelAsync(void* key);
virtual scoped_refptr<TabProxy> CreateTabProxy(int handle);
+ virtual void ReleaseTabProxy(AutomationHandle handle);
virtual std::string server_version() {
return AutomationProxy::server_version();
}
-
virtual bool Send(IPC::Message* msg) {
return AutomationProxy::Send(msg);
}
@@ -76,6 +78,8 @@ class ChromeFrameAutomationProxyImpl : public ChromeFrameAutomationProxy,
~ChromeFrameAutomationProxyImpl();
class CFMsgDispatcher;
scoped_refptr<CFMsgDispatcher> sync_;
+ class TabProxyNotificationMessageFilter;
+ scoped_refptr<TabProxyNotificationMessageFilter> message_filter_;
friend class ProxyFactory;
};
@@ -98,13 +102,13 @@ class ProxyFactory {
public:
// Callback when chrome process launch is complete and automation handshake
// (Hello message) is established.
- struct DECLSPEC_NOVTABLE LaunchDelegate {
+ struct DECLSPEC_NOVTABLE LaunchDelegate { // NOLINT
virtual void LaunchComplete(ChromeFrameAutomationProxy* proxy,
AutomationLaunchResult result) = 0;
- };
+ }; // NOLINT
ProxyFactory();
- ~ProxyFactory();
+ virtual ~ProxyFactory();
virtual void GetAutomationServer(LaunchDelegate* delegate,
const ChromeFrameLaunchParams& params,
@@ -273,6 +277,7 @@ class ChromeFrameAutomationClient
AutomationLaunchResult result);
// TabProxyDelegate implementation
virtual void OnMessageReceived(TabProxy* tab, const IPC::Message& msg);
+ virtual void OnChannelError(TabProxy* tab);
void CreateExternalTab();
void CreateExternalTabComplete(HWND chrome_window, HWND tab_window,
@@ -287,6 +292,7 @@ class ChromeFrameAutomationClient
private:
void OnMessageReceivedUIThread(const IPC::Message& msg);
+ void OnChannelErrorUIThread();
HWND chrome_window() const { return chrome_window_; }
void BeginNavigate(const GURL& url, const GURL& referrer);