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

Side by Side Diff: sandbox/win/src/top_level_dispatcher.cc

Issue 1856993003: Implement sandbox hooks to forward OPM related GDI system calls. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add Windows 10 specific hooks Created 4 years, 8 months 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
OLDNEW
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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 registry_dispatcher_.reset(dispatcher); 60 registry_dispatcher_.reset(dispatcher);
61 61
62 dispatcher = new HandleDispatcher(policy_); 62 dispatcher = new HandleDispatcher(policy_);
63 ipc_targets_[IPC_DUPLICATEHANDLEPROXY_TAG] = dispatcher; 63 ipc_targets_[IPC_DUPLICATEHANDLEPROXY_TAG] = dispatcher;
64 handle_dispatcher_.reset(dispatcher); 64 handle_dispatcher_.reset(dispatcher);
65 65
66 dispatcher = new ProcessMitigationsWin32KDispatcher(policy_); 66 dispatcher = new ProcessMitigationsWin32KDispatcher(policy_);
67 ipc_targets_[IPC_GDI_GDIDLLINITIALIZE_TAG] = dispatcher; 67 ipc_targets_[IPC_GDI_GDIDLLINITIALIZE_TAG] = dispatcher;
68 ipc_targets_[IPC_GDI_GETSTOCKOBJECT_TAG] = dispatcher; 68 ipc_targets_[IPC_GDI_GETSTOCKOBJECT_TAG] = dispatcher;
69 ipc_targets_[IPC_USER_REGISTERCLASSW_TAG] = dispatcher; 69 ipc_targets_[IPC_USER_REGISTERCLASSW_TAG] = dispatcher;
70 ipc_targets_[IPC_USER_ENUMDISPLAYMONITORS_TAG] = dispatcher;
71 ipc_targets_[IPC_USER_ENUMDISPLAYDEVICES_TAG] = dispatcher;
72 ipc_targets_[IPC_USER_GETMONITORINFO_TAG] = dispatcher;
73 ipc_targets_[IPC_GDI_CREATEOPMPROTECTEDOUTPUTS_TAG] = dispatcher;
74 ipc_targets_[IPC_GDI_GETCERTIFICATE_TAG] = dispatcher;
75 ipc_targets_[IPC_GDI_GETCERTIFICATESIZE_TAG] = dispatcher;
76 ipc_targets_[IPC_GDI_DESTROYOPMPROTECTEDOUTPUT_TAG] = dispatcher;
77 ipc_targets_[IPC_GDI_CONFIGUREOPMPROTECTEDOUTPUT_TAG] = dispatcher;
78 ipc_targets_[IPC_GDI_GETOPMINFORMATION_TAG] = dispatcher;
79 ipc_targets_[IPC_GDI_GETOPMRANDOMNUMBER_TAG] = dispatcher;
80 ipc_targets_[IPC_GDI_GETSUGGESTEDOPMPROTECTEDOUTPUTARRAYSIZE_TAG] =
81 dispatcher;
82 ipc_targets_[IPC_GDI_SETOPMSIGNINGKEYANDSEQUENCENUMBERS_TAG] = dispatcher;
70 process_mitigations_win32k_dispatcher_.reset(dispatcher); 83 process_mitigations_win32k_dispatcher_.reset(dispatcher);
71 } 84 }
72 85
73 TopLevelDispatcher::~TopLevelDispatcher() {} 86 TopLevelDispatcher::~TopLevelDispatcher() {}
74 87
75 // When an IPC is ready in any of the targets we get called. We manage an array 88 // When an IPC is ready in any of the targets we get called. We manage an array
76 // of IPC dispatchers which are keyed on the IPC tag so we normally delegate 89 // of IPC dispatchers which are keyed on the IPC tag so we normally delegate
77 // to the appropriate dispatcher unless we can handle the IPC call ourselves. 90 // to the appropriate dispatcher unless we can handle the IPC call ourselves.
78 Dispatcher* TopLevelDispatcher::OnMessageReady(IPCParams* ipc, 91 Dispatcher* TopLevelDispatcher::OnMessageReady(IPCParams* ipc,
79 CallbackGeneric* callback) { 92 CallbackGeneric* callback) {
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 } 150 }
138 151
139 Dispatcher* TopLevelDispatcher::GetDispatcher(int ipc_tag) { 152 Dispatcher* TopLevelDispatcher::GetDispatcher(int ipc_tag) {
140 if (ipc_tag >= IPC_LAST_TAG || ipc_tag <= IPC_UNUSED_TAG) 153 if (ipc_tag >= IPC_LAST_TAG || ipc_tag <= IPC_UNUSED_TAG)
141 return NULL; 154 return NULL;
142 155
143 return ipc_targets_[ipc_tag]; 156 return ipc_targets_[ipc_tag];
144 } 157 }
145 158
146 } // namespace sandbox 159 } // namespace sandbox
OLDNEW
« content/browser/ppapi_plugin_process_host.cc ('K') | « sandbox/win/src/sandbox_policy_base.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698