OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 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 |
| 5 #ifndef CHROME_UTILITY_SHELL_HANDLER_WIN_H_ |
| 6 #define CHROME_UTILITY_SHELL_HANDLER_WIN_H_ |
| 7 |
| 8 #include <Windows.h> |
| 9 |
| 10 #include <vector> |
| 11 |
| 12 #include "base/compiler_specific.h" |
| 13 #include "base/macros.h" |
| 14 #include "base/strings/string16.h" |
| 15 #include "base/tuple.h" |
| 16 #include "chrome/utility/utility_message_handler.h" |
| 17 |
| 18 namespace base { |
| 19 class FilePath; |
| 20 } // namespace base |
| 21 |
| 22 typedef std::vector<Tuple2<base::string16, base::string16> > |
| 23 GetOpenFileNameFilter; |
| 24 |
| 25 // Handles requests to execute shell operations. Used to protect the browser |
| 26 // process from instability due to 3rd-party shell extensions. Must be invoked |
| 27 // in a non-sandboxed utility process. |
| 28 class ShellHandler : public UtilityMessageHandler { |
| 29 public: |
| 30 ShellHandler(); |
| 31 virtual ~ShellHandler(); |
| 32 |
| 33 // IPC::Listener implementation |
| 34 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
| 35 |
| 36 private: |
| 37 void OnGetOpenFileName( |
| 38 HWND owner, |
| 39 DWORD flags, |
| 40 const GetOpenFileNameFilter& filter, |
| 41 const base::FilePath& initial_directory, |
| 42 const base::FilePath& filename); |
| 43 |
| 44 DISALLOW_COPY_AND_ASSIGN(ShellHandler); |
| 45 }; |
| 46 |
| 47 #endif // CHROME_UTILITY_SHELL_HANDLER_WIN_H_ |
OLD | NEW |