Chromium Code Reviews| 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_BROWSER_CHROME_SELECT_FILE_DIALOG_FACTORY_WIN_H_ | |
| 6 #define CHROME_BROWSER_CHROME_SELECT_FILE_DIALOG_FACTORY_WIN_H_ | |
| 7 | |
| 8 #include "base/compiler_specific.h" | |
| 9 #include "base/macros.h" | |
| 10 #include "base/memory/ref_counted.h" | |
| 11 #include "ui/shell_dialogs/select_file_dialog_factory.h" | |
| 12 | |
| 13 namespace base { | |
| 14 class SequencedTaskRunner; | |
| 15 } // namespace base | |
| 16 | |
| 17 // Implements a Select File dialog that delegates to a Metro file picker on | |
| 18 // Metro and to a utility process otherwise. The utility process is used in | |
| 19 // order to isolate the Chrome browser process from potential instability | |
| 20 // caused by Shell extension modules loaded by GetOpenFileName. | |
| 21 class ChromeSelectFileDialogFactory : public ui::SelectFileDialogFactory { | |
| 22 public: | |
|
sky
2014/07/31 20:47:46
nit: spacing is off.
erikwright (departed)
2014/08/01 13:53:15
Done.
| |
| 23 // Uses |blocking_task_runner| to perform IPC with the utility process. | |
| 24 explicit ChromeSelectFileDialogFactory( | |
| 25 const scoped_refptr<base::SequencedTaskRunner>& blocking_task_runner); | |
| 26 virtual ~ChromeSelectFileDialogFactory(); | |
| 27 | |
| 28 // ui::SelectFileDialogFactory implementation | |
| 29 virtual ui::SelectFileDialog* Create( | |
| 30 ui::SelectFileDialog::Listener* listener, | |
| 31 ui::SelectFilePolicy* policy) OVERRIDE; | |
| 32 | |
| 33 private: | |
| 34 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_; | |
| 35 | |
| 36 DISALLOW_COPY_AND_ASSIGN(ChromeSelectFileDialogFactory); | |
| 37 }; | |
| 38 | |
| 39 #endif // CHROME_BROWSER_CHROME_SELECT_FILE_DIALOG_FACTORY_WIN_H_ | |
| OLD | NEW |