1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "chrome_frame/chrome_frame_delegate.h"
7 bool ChromeFrameDelegateImpl::IsTabMessage(const IPC::Message
& message
,
9 bool is_tab_message
= true;
10 IPC_BEGIN_MESSAGE_MAP(ChromeFrameDelegateImpl
, message
)
11 IPC_MESSAGE_HANDLER_GENERIC(AutomationMsg_NavigationStateChanged
, )
12 IPC_MESSAGE_HANDLER_GENERIC(AutomationMsg_UpdateTargetUrl
, )
13 IPC_MESSAGE_HANDLER_GENERIC(AutomationMsg_HandleAccelerator
, )
14 IPC_MESSAGE_HANDLER_GENERIC(AutomationMsg_TabbedOut
, )
15 IPC_MESSAGE_HANDLER_GENERIC(AutomationMsg_OpenURL
, )
16 IPC_MESSAGE_HANDLER_GENERIC(AutomationMsg_NavigationFailed
, )
17 IPC_MESSAGE_HANDLER_GENERIC(AutomationMsg_DidNavigate
, )
18 IPC_MESSAGE_HANDLER_GENERIC(AutomationMsg_TabLoaded
, )
19 IPC_MESSAGE_HANDLER_GENERIC(AutomationMsg_ForwardMessageToExternalHost
, )
20 IPC_MESSAGE_HANDLER_GENERIC(
21 AutomationMsg_ForwardContextMenuToExternalHost
, )
22 IPC_MESSAGE_HANDLER_GENERIC(AutomationMsg_RequestStart
, )
23 IPC_MESSAGE_HANDLER_GENERIC(AutomationMsg_RequestRead
, )
24 IPC_MESSAGE_HANDLER_GENERIC(AutomationMsg_RequestEnd
, )
25 IPC_MESSAGE_HANDLER_GENERIC(AutomationMsg_DownloadRequestInHost
, )
26 IPC_MESSAGE_HANDLER_GENERIC(AutomationMsg_SetCookieAsync
, )
27 IPC_MESSAGE_HANDLER_GENERIC(AutomationMsg_AttachExternalTab
, )
28 IPC_MESSAGE_HANDLER_GENERIC(AutomationMsg_RequestGoToHistoryEntryOffset
, )
29 IPC_MESSAGE_UNHANDLED(is_tab_message
= false);
33 // Read tab handle from the message.
35 is_tab_message
= message
.ReadInt(&iter
, tab_handle
);
38 return is_tab_message
;
41 void ChromeFrameDelegateImpl::OnMessageReceived(const IPC::Message
& msg
) {
43 DLOG(WARNING
) << __FUNCTION__
44 << " Msgs received for a NULL automation client instance";
48 IPC_BEGIN_MESSAGE_MAP(ChromeFrameDelegateImpl
, msg
)
49 IPC_MESSAGE_HANDLER(AutomationMsg_NavigationStateChanged
,
50 OnNavigationStateChanged
)
51 IPC_MESSAGE_HANDLER(AutomationMsg_UpdateTargetUrl
, OnUpdateTargetUrl
)
52 IPC_MESSAGE_HANDLER(AutomationMsg_HandleAccelerator
,
54 IPC_MESSAGE_HANDLER(AutomationMsg_TabbedOut
, OnTabbedOut
)
55 IPC_MESSAGE_HANDLER(AutomationMsg_OpenURL
, OnOpenURL
)
56 IPC_MESSAGE_HANDLER(AutomationMsg_NavigationFailed
, OnNavigationFailed
)
57 IPC_MESSAGE_HANDLER(AutomationMsg_DidNavigate
, OnDidNavigate
)
58 IPC_MESSAGE_HANDLER(AutomationMsg_TabLoaded
, OnLoad
)
59 IPC_MESSAGE_HANDLER(AutomationMsg_ForwardMessageToExternalHost
,
60 OnMessageFromChromeFrame
)
61 IPC_MESSAGE_HANDLER(AutomationMsg_ForwardContextMenuToExternalHost
,
63 IPC_MESSAGE_HANDLER(AutomationMsg_RequestStart
, OnRequestStart
)
64 IPC_MESSAGE_HANDLER(AutomationMsg_RequestRead
, OnRequestRead
)
65 IPC_MESSAGE_HANDLER(AutomationMsg_RequestEnd
, OnRequestEnd
)
66 IPC_MESSAGE_HANDLER(AutomationMsg_DownloadRequestInHost
,
67 OnDownloadRequestInHost
)
68 IPC_MESSAGE_HANDLER(AutomationMsg_SetCookieAsync
, OnSetCookieAsync
)
69 IPC_MESSAGE_HANDLER(AutomationMsg_AttachExternalTab
, OnAttachExternalTab
)
70 IPC_MESSAGE_HANDLER(AutomationMsg_RequestGoToHistoryEntryOffset
,
71 OnGoToHistoryEntryOffset
)