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

Side by Side Diff: chrome_frame/chrome_frame_delegate.cc

Issue 5978003: Make IPC::Channel::Listener:OnMessageReceived have a return value indicating ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years 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 | « chrome_frame/chrome_frame_delegate.h ('k') | chrome_frame/external_tab.h » ('j') | 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 bool ChromeFrameDelegateImpl::IsTabMessage(const IPC::Message& message) { 7 bool ChromeFrameDelegateImpl::IsTabMessage(const IPC::Message& message) {
8 bool is_tab_message = true; 8 bool is_tab_message = true;
9 IPC_BEGIN_MESSAGE_MAP(ChromeFrameDelegateImpl, message) 9 IPC_BEGIN_MESSAGE_MAP(ChromeFrameDelegateImpl, message)
10 IPC_MESSAGE_HANDLER_GENERIC(AutomationMsg_NavigationStateChanged, ) 10 IPC_MESSAGE_HANDLER_GENERIC(AutomationMsg_NavigationStateChanged, )
(...skipping 15 matching lines...) Expand all
26 IPC_MESSAGE_HANDLER_GENERIC(AutomationMsg_AttachExternalTab, ) 26 IPC_MESSAGE_HANDLER_GENERIC(AutomationMsg_AttachExternalTab, )
27 IPC_MESSAGE_HANDLER_GENERIC(AutomationMsg_RequestGoToHistoryEntryOffset, ) 27 IPC_MESSAGE_HANDLER_GENERIC(AutomationMsg_RequestGoToHistoryEntryOffset, )
28 IPC_MESSAGE_HANDLER_GENERIC(AutomationMsg_GetCookiesFromHost, ) 28 IPC_MESSAGE_HANDLER_GENERIC(AutomationMsg_GetCookiesFromHost, )
29 IPC_MESSAGE_HANDLER_GENERIC(AutomationMsg_CloseExternalTab, ) 29 IPC_MESSAGE_HANDLER_GENERIC(AutomationMsg_CloseExternalTab, )
30 IPC_MESSAGE_UNHANDLED(is_tab_message = false); 30 IPC_MESSAGE_UNHANDLED(is_tab_message = false);
31 IPC_END_MESSAGE_MAP() 31 IPC_END_MESSAGE_MAP()
32 32
33 return is_tab_message; 33 return is_tab_message;
34 } 34 }
35 35
36 void ChromeFrameDelegateImpl::OnMessageReceived(const IPC::Message& msg) { 36 bool ChromeFrameDelegateImpl::OnMessageReceived(const IPC::Message& msg) {
37 if (!IsValid()) { 37 if (!IsValid()) {
38 DLOG(WARNING) << __FUNCTION__ 38 DLOG(WARNING) << __FUNCTION__
39 << " Msgs received for a NULL automation client instance"; 39 << " Msgs received for a NULL automation client instance";
40 return; 40 return false;
41 } 41 }
42 42
43 bool handled = true;
43 IPC_BEGIN_MESSAGE_MAP(ChromeFrameDelegateImpl, msg) 44 IPC_BEGIN_MESSAGE_MAP(ChromeFrameDelegateImpl, msg)
44 IPC_MESSAGE_HANDLER(AutomationMsg_NavigationStateChanged, 45 IPC_MESSAGE_HANDLER(AutomationMsg_NavigationStateChanged,
45 OnNavigationStateChanged) 46 OnNavigationStateChanged)
46 IPC_MESSAGE_HANDLER(AutomationMsg_UpdateTargetUrl, OnUpdateTargetUrl) 47 IPC_MESSAGE_HANDLER(AutomationMsg_UpdateTargetUrl, OnUpdateTargetUrl)
47 IPC_MESSAGE_HANDLER(AutomationMsg_HandleAccelerator, 48 IPC_MESSAGE_HANDLER(AutomationMsg_HandleAccelerator,
48 OnAcceleratorPressed) 49 OnAcceleratorPressed)
49 IPC_MESSAGE_HANDLER(AutomationMsg_TabbedOut, OnTabbedOut) 50 IPC_MESSAGE_HANDLER(AutomationMsg_TabbedOut, OnTabbedOut)
50 IPC_MESSAGE_HANDLER(AutomationMsg_OpenURL, OnOpenURL) 51 IPC_MESSAGE_HANDLER(AutomationMsg_OpenURL, OnOpenURL)
51 IPC_MESSAGE_HANDLER(AutomationMsg_NavigationFailed, OnNavigationFailed) 52 IPC_MESSAGE_HANDLER(AutomationMsg_NavigationFailed, OnNavigationFailed)
52 IPC_MESSAGE_HANDLER(AutomationMsg_DidNavigate, OnDidNavigate) 53 IPC_MESSAGE_HANDLER(AutomationMsg_DidNavigate, OnDidNavigate)
53 IPC_MESSAGE_HANDLER(AutomationMsg_TabLoaded, OnLoad) 54 IPC_MESSAGE_HANDLER(AutomationMsg_TabLoaded, OnLoad)
54 IPC_MESSAGE_HANDLER(AutomationMsg_ForwardMessageToExternalHost, 55 IPC_MESSAGE_HANDLER(AutomationMsg_ForwardMessageToExternalHost,
55 OnMessageFromChromeFrame) 56 OnMessageFromChromeFrame)
56 IPC_MESSAGE_HANDLER(AutomationMsg_ForwardContextMenuToExternalHost, 57 IPC_MESSAGE_HANDLER(AutomationMsg_ForwardContextMenuToExternalHost,
57 OnHandleContextMenu) 58 OnHandleContextMenu)
58 IPC_MESSAGE_HANDLER(AutomationMsg_RequestStart, OnRequestStart) 59 IPC_MESSAGE_HANDLER(AutomationMsg_RequestStart, OnRequestStart)
59 IPC_MESSAGE_HANDLER(AutomationMsg_RequestRead, OnRequestRead) 60 IPC_MESSAGE_HANDLER(AutomationMsg_RequestRead, OnRequestRead)
60 IPC_MESSAGE_HANDLER(AutomationMsg_RequestEnd, OnRequestEnd) 61 IPC_MESSAGE_HANDLER(AutomationMsg_RequestEnd, OnRequestEnd)
61 IPC_MESSAGE_HANDLER(AutomationMsg_DownloadRequestInHost, 62 IPC_MESSAGE_HANDLER(AutomationMsg_DownloadRequestInHost,
62 OnDownloadRequestInHost) 63 OnDownloadRequestInHost)
63 IPC_MESSAGE_HANDLER(AutomationMsg_SetCookieAsync, OnSetCookieAsync) 64 IPC_MESSAGE_HANDLER(AutomationMsg_SetCookieAsync, OnSetCookieAsync)
64 IPC_MESSAGE_HANDLER(AutomationMsg_AttachExternalTab, OnAttachExternalTab) 65 IPC_MESSAGE_HANDLER(AutomationMsg_AttachExternalTab, OnAttachExternalTab)
65 IPC_MESSAGE_HANDLER(AutomationMsg_RequestGoToHistoryEntryOffset, 66 IPC_MESSAGE_HANDLER(AutomationMsg_RequestGoToHistoryEntryOffset,
66 OnGoToHistoryEntryOffset) 67 OnGoToHistoryEntryOffset)
67 IPC_MESSAGE_HANDLER(AutomationMsg_GetCookiesFromHost, OnGetCookiesFromHost) 68 IPC_MESSAGE_HANDLER(AutomationMsg_GetCookiesFromHost, OnGetCookiesFromHost)
68 IPC_MESSAGE_HANDLER(AutomationMsg_CloseExternalTab, OnCloseTab) 69 IPC_MESSAGE_HANDLER(AutomationMsg_CloseExternalTab, OnCloseTab)
70 IPC_MESSAGE_UNHANDLED(handled = false)
69 IPC_END_MESSAGE_MAP() 71 IPC_END_MESSAGE_MAP()
72
73 return handled;
70 } 74 }
OLDNEW
« no previous file with comments | « chrome_frame/chrome_frame_delegate.h ('k') | chrome_frame/external_tab.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698