Download build archive (if exists) from cloud for given revision and perform bisect.
[chromium-blink-merge.git] / chrome / browser / ui / chrome_select_file_policy.h
blobcbe51a3e0f07ba09cef71f084c36c7d579ed3e9c
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.
5 #ifndef CHROME_BROWSER_UI_CHROME_SELECT_FILE_POLICY_H_
6 #define CHROME_BROWSER_UI_CHROME_SELECT_FILE_POLICY_H_
8 #include "base/basictypes.h"
9 #include "base/callback_forward.h"
10 #include "base/compiler_specific.h"
11 #include "ui/shell_dialogs/select_file_policy.h"
13 namespace content {
14 class WebContents;
17 // A chrome specific SelectFilePolicy that checks local_state(), and will
18 // display an infobar on the weakly owned |source_contents|.
19 class ChromeSelectFilePolicy : public ui::SelectFilePolicy {
20 public:
21 explicit ChromeSelectFilePolicy(content::WebContents* source_contents);
22 virtual ~ChromeSelectFilePolicy();
24 // Overridden from ui::SelectFilePolicy:
25 virtual bool CanOpenSelectFileDialog() OVERRIDE;
26 virtual void SelectFileDenied() OVERRIDE;
28 // Returns true if local state allows showing file pickers.
29 static bool FileSelectDialogsAllowed();
31 private:
32 content::WebContents* source_contents_;
34 DISALLOW_COPY_AND_ASSIGN(ChromeSelectFilePolicy);
37 #endif // CHROME_BROWSER_UI_CHROME_SELECT_FILE_POLICY_H_