1// Copyright (c) 2013 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 UI_SHELL_DIALOGS_SELECT_FILE_POLICY_H_ 6#define UI_SHELL_DIALOGS_SELECT_FILE_POLICY_H_ 7 8#include "ui/shell_dialogs/shell_dialogs_export.h" 9 10namespace ui { 11 12// An optional policy class that provides decisions on whether to allow showing 13// a native file dialog. Some ports need this. 14class SHELL_DIALOGS_EXPORT SelectFilePolicy { 15 public: 16 virtual ~SelectFilePolicy(); 17 18 // Returns true if the current policy allows for file selection dialogs. 19 virtual bool CanOpenSelectFileDialog() = 0; 20 21 // Called from the SelectFileDialog when we've denied a request. 22 virtual void SelectFileDenied() = 0; 23}; 24 25} // namespace ui 26 27#endif // UI_SHELL_DIALOGS_SELECT_FILE_POLICY_H_ 28 29