Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / xwalk / runtime / browser / runtime_select_file_policy.h
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.
4
5 #ifndef XWALK_RUNTIME_BROWSER_RUNTIME_SELECT_FILE_POLICY_H_
6 #define XWALK_RUNTIME_BROWSER_RUNTIME_SELECT_FILE_POLICY_H_
7
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"
12
13 namespace content {
14 class WebContents;
15 }
16
17 // A chrome specific SelectFilePolicy that checks local_state(), and will
18 // display an infobar on the weakly owned |source_contents|.
19 class RuntimeSelectFilePolicy : public ui::SelectFilePolicy {
20  public:
21   RuntimeSelectFilePolicy();
22   virtual ~RuntimeSelectFilePolicy();
23
24   // Overridden from ui::SelectFilePolicy:
25   bool CanOpenSelectFileDialog() override;
26   void SelectFileDenied() override;
27
28  private:
29   DISALLOW_COPY_AND_ASSIGN(RuntimeSelectFilePolicy);
30 };
31
32 #endif  // XWALK_RUNTIME_BROWSER_RUNTIME_SELECT_FILE_POLICY_H_