Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(813)

Side by Side Diff: chrome/browser/chrome_select_file_policy.h

Issue 10667026: Start consolidating cross-port file selection code into ui/base/dialogs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
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 CHROME_BROWSER_CHROME_SELECT_FILE_POLICY_H_
6 #define CHROME_BROWSER_CHROME_SELECT_FILE_POLICY_H_
7
8 #include "base/callback_forward.h"
9 #include "base/compiler_specific.h"
10 #include "ui/base/dialogs/select_file_policy.h"
11
12 namespace content {
13 class WebContents;
14 }
15
16 // A chrome specific SelectFilePolicy that checks local_state().
17 class ChromeSelectFilePolicy : public ui::SelectFilePolicy {
sky 2012/06/26 00:07:18 If this extends a class in ui, shouldn't it live i
18 public:
19 ChromeSelectFilePolicy();
20 virtual ~ChromeSelectFilePolicy();
21
22 // Overridden from ui::SelectFilePolicy:
23 virtual bool CanOpenSelectFileDialog() OVERRIDE;
24
25 // Creates a policy failure callback that displays an infobar on the
26 // WebContents the call is originating from, i.e. where the InfoBar should
27 // be shown in case file-selection dialogs are forbidden by policy, or NULL
28 // if no InfoBar should be shown.
29 static base::Closure DisplayInfobarCallback(
30 content::WebContents* source_contents);
31
32 private:
33 // Implementation detail for DisplayInfobarCallback().
34 static void DisplayInfobarOrWarn(content::WebContents* source_contents);
35 };
sky 2012/06/26 00:07:18 DISALLOW_COPY_AND_ASSIGN
36
37 #endif // CHROME_BROWSER_CHROME_SELECT_FILE_POLICY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698