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

Side by Side Diff: chrome_frame/chrome_frame_delegate.cc

Issue 8511083: Add arguments in macros where required (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 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 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 #include "chrome_frame/chrome_frame_delegate.h" 5 #include "chrome_frame/chrome_frame_delegate.h"
6 6
7 #include "chrome/common/automation_messages.h" 7 #include "chrome/common/automation_messages.h"
8 8
9 #define NO_CODE ((void)0)
10
9 bool ChromeFrameDelegateImpl::IsTabMessage(const IPC::Message& message) { 11 bool ChromeFrameDelegateImpl::IsTabMessage(const IPC::Message& message) {
10 bool is_tab_message = true; 12 bool is_tab_message = true;
11 IPC_BEGIN_MESSAGE_MAP(ChromeFrameDelegateImpl, message) 13 IPC_BEGIN_MESSAGE_MAP(ChromeFrameDelegateImpl, message)
12 IPC_MESSAGE_HANDLER_GENERIC(AutomationMsg_NavigationStateChanged, ) 14 IPC_MESSAGE_HANDLER_GENERIC(AutomationMsg_NavigationStateChanged, NO_CODE)
13 IPC_MESSAGE_HANDLER_GENERIC(AutomationMsg_UpdateTargetUrl, ) 15 IPC_MESSAGE_HANDLER_GENERIC(AutomationMsg_UpdateTargetUrl, NO_CODE)
14 IPC_MESSAGE_HANDLER_GENERIC(AutomationMsg_HandleAccelerator, ) 16 IPC_MESSAGE_HANDLER_GENERIC(AutomationMsg_HandleAccelerator, NO_CODE)
15 IPC_MESSAGE_HANDLER_GENERIC(AutomationMsg_TabbedOut, ) 17 IPC_MESSAGE_HANDLER_GENERIC(AutomationMsg_TabbedOut, NO_CODE)
16 IPC_MESSAGE_HANDLER_GENERIC(AutomationMsg_OpenURL, ) 18 IPC_MESSAGE_HANDLER_GENERIC(AutomationMsg_OpenURL, NO_CODE)
17 IPC_MESSAGE_HANDLER_GENERIC(AutomationMsg_NavigationFailed, ) 19 IPC_MESSAGE_HANDLER_GENERIC(AutomationMsg_NavigationFailed, NO_CODE)
18 IPC_MESSAGE_HANDLER_GENERIC(AutomationMsg_DidNavigate, ) 20 IPC_MESSAGE_HANDLER_GENERIC(AutomationMsg_DidNavigate, NO_CODE)
19 IPC_MESSAGE_HANDLER_GENERIC(AutomationMsg_TabLoaded, ) 21 IPC_MESSAGE_HANDLER_GENERIC(AutomationMsg_TabLoaded, NO_CODE)
20 IPC_MESSAGE_HANDLER_GENERIC(AutomationMsg_MoveWindow, ) 22 IPC_MESSAGE_HANDLER_GENERIC(AutomationMsg_MoveWindow, NO_CODE)
21 IPC_MESSAGE_HANDLER_GENERIC(AutomationMsg_ForwardMessageToExternalHost, )
22 IPC_MESSAGE_HANDLER_GENERIC( 23 IPC_MESSAGE_HANDLER_GENERIC(
23 AutomationMsg_ForwardContextMenuToExternalHost, ) 24 AutomationMsg_ForwardMessageToExternalHost, NO_CODE)
24 IPC_MESSAGE_HANDLER_GENERIC(AutomationMsg_RequestStart, ) 25 IPC_MESSAGE_HANDLER_GENERIC(
25 IPC_MESSAGE_HANDLER_GENERIC(AutomationMsg_RequestRead, ) 26 AutomationMsg_ForwardContextMenuToExternalHost, NO_CODE)
26 IPC_MESSAGE_HANDLER_GENERIC(AutomationMsg_RequestEnd, ) 27 IPC_MESSAGE_HANDLER_GENERIC(AutomationMsg_RequestStart, NO_CODE)
27 IPC_MESSAGE_HANDLER_GENERIC(AutomationMsg_DownloadRequestInHost, ) 28 IPC_MESSAGE_HANDLER_GENERIC(AutomationMsg_RequestRead, NO_CODE)
28 IPC_MESSAGE_HANDLER_GENERIC(AutomationMsg_SetCookieAsync, ) 29 IPC_MESSAGE_HANDLER_GENERIC(AutomationMsg_RequestEnd, NO_CODE)
29 IPC_MESSAGE_HANDLER_GENERIC(AutomationMsg_AttachExternalTab, ) 30 IPC_MESSAGE_HANDLER_GENERIC(AutomationMsg_DownloadRequestInHost, NO_CODE)
30 IPC_MESSAGE_HANDLER_GENERIC(AutomationMsg_RequestGoToHistoryEntryOffset, ) 31 IPC_MESSAGE_HANDLER_GENERIC(AutomationMsg_SetCookieAsync, NO_CODE)
31 IPC_MESSAGE_HANDLER_GENERIC(AutomationMsg_GetCookiesFromHost, ) 32 IPC_MESSAGE_HANDLER_GENERIC(AutomationMsg_AttachExternalTab, NO_CODE)
32 IPC_MESSAGE_HANDLER_GENERIC(AutomationMsg_CloseExternalTab, ) 33 IPC_MESSAGE_HANDLER_GENERIC(
34 AutomationMsg_RequestGoToHistoryEntryOffset, NO_CODE)
35 IPC_MESSAGE_HANDLER_GENERIC(AutomationMsg_GetCookiesFromHost, NO_CODE)
36 IPC_MESSAGE_HANDLER_GENERIC(AutomationMsg_CloseExternalTab, NO_CODE)
33 IPC_MESSAGE_UNHANDLED(is_tab_message = false); 37 IPC_MESSAGE_UNHANDLED(is_tab_message = false);
34 IPC_END_MESSAGE_MAP() 38 IPC_END_MESSAGE_MAP()
35 39
36 return is_tab_message; 40 return is_tab_message;
37 } 41 }
38 42
43 #undef NO_CODE
44
39 bool ChromeFrameDelegateImpl::OnMessageReceived(const IPC::Message& msg) { 45 bool ChromeFrameDelegateImpl::OnMessageReceived(const IPC::Message& msg) {
40 if (!IsValid()) { 46 if (!IsValid()) {
41 DLOG(WARNING) << __FUNCTION__ 47 DLOG(WARNING) << __FUNCTION__
42 << " Msgs received for a NULL automation client instance"; 48 << " Msgs received for a NULL automation client instance";
43 return false; 49 return false;
44 } 50 }
45 51
46 bool handled = true; 52 bool handled = true;
47 IPC_BEGIN_MESSAGE_MAP(ChromeFrameDelegateImpl, msg) 53 IPC_BEGIN_MESSAGE_MAP(ChromeFrameDelegateImpl, msg)
48 IPC_MESSAGE_HANDLER(AutomationMsg_NavigationStateChanged, 54 IPC_MESSAGE_HANDLER(AutomationMsg_NavigationStateChanged,
(...skipping 20 matching lines...) Expand all
69 IPC_MESSAGE_HANDLER(AutomationMsg_AttachExternalTab, OnAttachExternalTab) 75 IPC_MESSAGE_HANDLER(AutomationMsg_AttachExternalTab, OnAttachExternalTab)
70 IPC_MESSAGE_HANDLER(AutomationMsg_RequestGoToHistoryEntryOffset, 76 IPC_MESSAGE_HANDLER(AutomationMsg_RequestGoToHistoryEntryOffset,
71 OnGoToHistoryEntryOffset) 77 OnGoToHistoryEntryOffset)
72 IPC_MESSAGE_HANDLER(AutomationMsg_GetCookiesFromHost, OnGetCookiesFromHost) 78 IPC_MESSAGE_HANDLER(AutomationMsg_GetCookiesFromHost, OnGetCookiesFromHost)
73 IPC_MESSAGE_HANDLER(AutomationMsg_CloseExternalTab, OnCloseTab) 79 IPC_MESSAGE_HANDLER(AutomationMsg_CloseExternalTab, OnCloseTab)
74 IPC_MESSAGE_UNHANDLED(handled = false) 80 IPC_MESSAGE_UNHANDLED(handled = false)
75 IPC_END_MESSAGE_MAP() 81 IPC_END_MESSAGE_MAP()
76 82
77 return handled; 83 return handled;
78 } 84 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698