1// Copyright (c) 2012 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
5#ifndef CONTENT_COMMON_SANDBOX_WIN_H_
6#define CONTENT_COMMON_SANDBOX_WIN_H_
7
8#include "content/common/content_export.h"
9#include "sandbox/win/src/security_level.h"
10
11namespace base {
12class CommandLine;
13}
14
15namespace sandbox {
16class BrokerServices;
17class TargetPolicy;
18class TargetServices;
19}
20
21namespace content {
22
23// Wrapper around sandbox::TargetPolicy::SetJobLevel that checks if the sandbox
24// should be let to run without a job object assigned.
25void SetJobLevel(const base::CommandLine& cmd_line,
26                 sandbox::JobLevel job_level,
27                 uint32 ui_exceptions,
28                 sandbox::TargetPolicy* policy);
29
30// Closes handles that are opened at process creation and initialization.
31void AddBaseHandleClosePolicy(sandbox::TargetPolicy* policy);
32
33bool InitBrokerServices(sandbox::BrokerServices* broker_services);
34
35bool InitTargetServices(sandbox::TargetServices* target_services);
36
37// Returns whether DirectWrite font rendering should be used.
38CONTENT_EXPORT bool ShouldUseDirectWrite();
39
40}  // namespace content
41
42#endif  // CONTENT_COMMON_SANDBOX_WIN_H_
43