forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathipc_shell_handler_win.h
53 lines (40 loc) · 1.66 KB
/
ipc_shell_handler_win.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_UTILITY_IPC_SHELL_HANDLER_WIN_H_
#define CHROME_UTILITY_IPC_SHELL_HANDLER_WIN_H_
#include <Windows.h>
#include <tuple>
#include <vector>
#include "base/compiler_specific.h"
#include "base/macros.h"
#include "base/strings/string16.h"
#include "chrome/utility/utility_message_handler.h"
namespace base {
class FilePath;
} // namespace base
using GetOpenFileNameFilter =
std::vector<std::tuple<base::string16, base::string16>>;
struct ChromeUtilityMsg_GetSaveFileName_Params;
// Handles requests to execute shell operations. Used to protect the browser
// process from instability due to 3rd-party shell extensions. Must be invoked
// in a non-sandboxed utility process.
// Note: This class is deprecated in favor of the Mojo version.
// See chrome/common/shell_handler_win.mojom and
// chrome/utility/shell_handler_impl_win.h
class IPCShellHandler : public UtilityMessageHandler {
public:
IPCShellHandler();
~IPCShellHandler() override;
// IPC::Listener implementation
bool OnMessageReceived(const IPC::Message& message) override;
private:
void OnGetOpenFileName(HWND owner,
DWORD flags,
const GetOpenFileNameFilter& filter,
const base::FilePath& initial_directory,
const base::FilePath& filename);
void OnGetSaveFileName(const ChromeUtilityMsg_GetSaveFileName_Params& params);
DISALLOW_COPY_AND_ASSIGN(IPCShellHandler);
};
#endif // CHROME_UTILITY_IPC_SHELL_HANDLER_WIN_H_