OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "extensions/browser/extension_message_filter.h" | 5 #include "extensions/browser/extension_message_filter.h" |
6 | 6 |
7 #include "content/public/browser/browser_thread.h" | 7 #include "content/public/browser/browser_thread.h" |
8 #include "content/public/browser/render_process_host.h" | 8 #include "content/public/browser/render_process_host.h" |
9 #include "content/public/browser/resource_dispatcher_host.h" | 9 #include "content/public/browser/resource_dispatcher_host.h" |
10 #include "extensions/browser/event_router.h" | 10 #include "extensions/browser/event_router.h" |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 case ExtensionHostMsg_RemoveFilteredListener::ID: | 44 case ExtensionHostMsg_RemoveFilteredListener::ID: |
45 case ExtensionHostMsg_ShouldSuspendAck::ID: | 45 case ExtensionHostMsg_ShouldSuspendAck::ID: |
46 case ExtensionHostMsg_SuspendAck::ID: | 46 case ExtensionHostMsg_SuspendAck::ID: |
47 *thread = BrowserThread::UI; | 47 *thread = BrowserThread::UI; |
48 break; | 48 break; |
49 default: | 49 default: |
50 break; | 50 break; |
51 } | 51 } |
52 } | 52 } |
53 | 53 |
54 bool ExtensionMessageFilter::OnMessageReceived(const IPC::Message& message, | 54 bool ExtensionMessageFilter::OnMessageReceived(const IPC::Message& message) { |
55 bool* message_was_ok) { | |
56 bool handled = true; | 55 bool handled = true; |
57 IPC_BEGIN_MESSAGE_MAP_EX(ExtensionMessageFilter, message, *message_was_ok) | 56 IPC_BEGIN_MESSAGE_MAP(ExtensionMessageFilter, message) |
58 IPC_MESSAGE_HANDLER(ExtensionHostMsg_AddListener, | 57 IPC_MESSAGE_HANDLER(ExtensionHostMsg_AddListener, |
59 OnExtensionAddListener) | 58 OnExtensionAddListener) |
60 IPC_MESSAGE_HANDLER(ExtensionHostMsg_RemoveListener, | 59 IPC_MESSAGE_HANDLER(ExtensionHostMsg_RemoveListener, |
61 OnExtensionRemoveListener) | 60 OnExtensionRemoveListener) |
62 IPC_MESSAGE_HANDLER(ExtensionHostMsg_AddLazyListener, | 61 IPC_MESSAGE_HANDLER(ExtensionHostMsg_AddLazyListener, |
63 OnExtensionAddLazyListener) | 62 OnExtensionAddLazyListener) |
64 IPC_MESSAGE_HANDLER(ExtensionHostMsg_RemoveLazyListener, | 63 IPC_MESSAGE_HANDLER(ExtensionHostMsg_RemoveLazyListener, |
65 OnExtensionRemoveLazyListener) | 64 OnExtensionRemoveLazyListener) |
66 IPC_MESSAGE_HANDLER(ExtensionHostMsg_AddFilteredListener, | 65 IPC_MESSAGE_HANDLER(ExtensionHostMsg_AddFilteredListener, |
67 OnExtensionAddFilteredListener) | 66 OnExtensionAddFilteredListener) |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 ExtensionFunctionDispatcher::DispatchOnIOThread( | 184 ExtensionFunctionDispatcher::DispatchOnIOThread( |
186 extension_info_map_.get(), | 185 extension_info_map_.get(), |
187 browser_context_, | 186 browser_context_, |
188 render_process_id_, | 187 render_process_id_, |
189 weak_ptr_factory_.GetWeakPtr(), | 188 weak_ptr_factory_.GetWeakPtr(), |
190 routing_id, | 189 routing_id, |
191 params); | 190 params); |
192 } | 191 } |
193 | 192 |
194 } // namespace extensions | 193 } // namespace extensions |
OLD | NEW |