process_mitigations_win32k_dispatcher.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  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
  3. // found in the LICENSE file.
  4. #ifndef SANDBOX_WIN_SRC_PROCESS_MITIGATIONS_WIN32K_DISPATCHER_H_
  5. #define SANDBOX_WIN_SRC_PROCESS_MITIGATIONS_WIN32K_DISPATCHER_H_
  6. #include "base/memory/raw_ptr.h"
  7. #include "base/memory/ref_counted.h"
  8. #include "base/synchronization/lock.h"
  9. #include "sandbox/win/src/crosscall_server.h"
  10. #include "sandbox/win/src/ipc_tags.h"
  11. #include "sandbox/win/src/sandbox_policy_base.h"
  12. namespace sandbox {
  13. // This class sets up intercepts for the Win32K lockdown policy which is set
  14. // on Windows 8 and beyond.
  15. class ProcessMitigationsWin32KDispatcher : public Dispatcher {
  16. public:
  17. explicit ProcessMitigationsWin32KDispatcher(PolicyBase* policy_base);
  18. ProcessMitigationsWin32KDispatcher(
  19. const ProcessMitigationsWin32KDispatcher&) = delete;
  20. ProcessMitigationsWin32KDispatcher& operator=(
  21. const ProcessMitigationsWin32KDispatcher&) = delete;
  22. ~ProcessMitigationsWin32KDispatcher() override;
  23. // Dispatcher interface.
  24. bool SetupService(InterceptionManager* manager, IpcTag service) override;
  25. private:
  26. raw_ptr<PolicyBase> policy_base_;
  27. };
  28. } // namespace sandbox
  29. #endif // SANDBOX_WIN_SRC_PROCESS_MITIGATIONS_WIN32K_DISPATCHER_H_