OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "sandbox/win/src/top_level_dispatcher.h" | 5 #include "sandbox/win/src/top_level_dispatcher.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 #include <string.h> | 8 #include <string.h> |
9 | 9 |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 registry_dispatcher_.reset(dispatcher); | 61 registry_dispatcher_.reset(dispatcher); |
62 | 62 |
63 dispatcher = new HandleDispatcher(policy_); | 63 dispatcher = new HandleDispatcher(policy_); |
64 ipc_targets_[IPC_DUPLICATEHANDLEPROXY_TAG] = dispatcher; | 64 ipc_targets_[IPC_DUPLICATEHANDLEPROXY_TAG] = dispatcher; |
65 handle_dispatcher_.reset(dispatcher); | 65 handle_dispatcher_.reset(dispatcher); |
66 | 66 |
67 dispatcher = new ProcessMitigationsWin32KDispatcher(policy_); | 67 dispatcher = new ProcessMitigationsWin32KDispatcher(policy_); |
68 ipc_targets_[IPC_GDI_GDIDLLINITIALIZE_TAG] = dispatcher; | 68 ipc_targets_[IPC_GDI_GDIDLLINITIALIZE_TAG] = dispatcher; |
69 ipc_targets_[IPC_GDI_GETSTOCKOBJECT_TAG] = dispatcher; | 69 ipc_targets_[IPC_GDI_GETSTOCKOBJECT_TAG] = dispatcher; |
70 ipc_targets_[IPC_USER_REGISTERCLASSW_TAG] = dispatcher; | 70 ipc_targets_[IPC_USER_REGISTERCLASSW_TAG] = dispatcher; |
| 71 ipc_targets_[IPC_USER_ENUMDISPLAYMONITORS_TAG] = dispatcher; |
| 72 ipc_targets_[IPC_USER_ENUMDISPLAYDEVICES_TAG] = dispatcher; |
| 73 ipc_targets_[IPC_USER_GETMONITORINFO_TAG] = dispatcher; |
| 74 ipc_targets_[IPC_GDI_CREATEOPMPROTECTEDOUTPUTS_TAG] = dispatcher; |
| 75 ipc_targets_[IPC_GDI_GETCERTIFICATE_TAG] = dispatcher; |
| 76 ipc_targets_[IPC_GDI_GETCERTIFICATESIZE_TAG] = dispatcher; |
| 77 ipc_targets_[IPC_GDI_DESTROYOPMPROTECTEDOUTPUT_TAG] = dispatcher; |
| 78 ipc_targets_[IPC_GDI_CONFIGUREOPMPROTECTEDOUTPUT_TAG] = dispatcher; |
| 79 ipc_targets_[IPC_GDI_GETOPMINFORMATION_TAG] = dispatcher; |
| 80 ipc_targets_[IPC_GDI_GETOPMRANDOMNUMBER_TAG] = dispatcher; |
| 81 ipc_targets_[IPC_GDI_GETSUGGESTEDOPMPROTECTEDOUTPUTARRAYSIZE_TAG] = |
| 82 dispatcher; |
| 83 ipc_targets_[IPC_GDI_SETOPMSIGNINGKEYANDSEQUENCENUMBERS_TAG] = dispatcher; |
71 process_mitigations_win32k_dispatcher_.reset(dispatcher); | 84 process_mitigations_win32k_dispatcher_.reset(dispatcher); |
72 } | 85 } |
73 | 86 |
74 TopLevelDispatcher::~TopLevelDispatcher() {} | 87 TopLevelDispatcher::~TopLevelDispatcher() {} |
75 | 88 |
76 // When an IPC is ready in any of the targets we get called. We manage an array | 89 // When an IPC is ready in any of the targets we get called. We manage an array |
77 // of IPC dispatchers which are keyed on the IPC tag so we normally delegate | 90 // of IPC dispatchers which are keyed on the IPC tag so we normally delegate |
78 // to the appropriate dispatcher unless we can handle the IPC call ourselves. | 91 // to the appropriate dispatcher unless we can handle the IPC call ourselves. |
79 Dispatcher* TopLevelDispatcher::OnMessageReady(IPCParams* ipc, | 92 Dispatcher* TopLevelDispatcher::OnMessageReady(IPCParams* ipc, |
80 CallbackGeneric* callback) { | 93 CallbackGeneric* callback) { |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 } | 151 } |
139 | 152 |
140 Dispatcher* TopLevelDispatcher::GetDispatcher(int ipc_tag) { | 153 Dispatcher* TopLevelDispatcher::GetDispatcher(int ipc_tag) { |
141 if (ipc_tag >= IPC_LAST_TAG || ipc_tag <= IPC_UNUSED_TAG) | 154 if (ipc_tag >= IPC_LAST_TAG || ipc_tag <= IPC_UNUSED_TAG) |
142 return NULL; | 155 return NULL; |
143 | 156 |
144 return ipc_targets_[ipc_tag]; | 157 return ipc_targets_[ipc_tag]; |
145 } | 158 } |
146 | 159 |
147 } // namespace sandbox | 160 } // namespace sandbox |
OLD | NEW |