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

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

Issue 18129002: Update the child process security policy to use explicit permission grants. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Change RVH to use FileChooserParam mode Created 7 years, 5 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
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_FILE_SELECT_HELPER_H_ 5 #ifndef CHROME_BROWSER_FILE_SELECT_HELPER_H_
6 #define CHROME_BROWSER_FILE_SELECT_HELPER_H_ 6 #define CHROME_BROWSER_FILE_SELECT_HELPER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
12 #include "base/gtest_prod_util.h" 12 #include "base/gtest_prod_util.h"
13 #include "content/public/browser/notification_observer.h" 13 #include "content/public/browser/notification_observer.h"
14 #include "content/public/browser/notification_registrar.h" 14 #include "content/public/browser/notification_registrar.h"
15 #include "content/public/common/file_chooser_params.h"
15 #include "net/base/directory_lister.h" 16 #include "net/base/directory_lister.h"
16 #include "ui/shell_dialogs/select_file_dialog.h" 17 #include "ui/shell_dialogs/select_file_dialog.h"
17 18
18 class Profile; 19 class Profile;
19 20
20 namespace content { 21 namespace content {
21 class RenderViewHost; 22 class RenderViewHost;
22 class WebContents; 23 class WebContents;
23 struct FileChooserParams;
24 } 24 }
25 25
26 namespace ui { 26 namespace ui {
27 struct SelectedFileInfo; 27 struct SelectedFileInfo;
28 } 28 }
29 29
30 // This class handles file-selection requests coming from WebUI elements 30 // This class handles file-selection requests coming from WebUI elements
31 // (via the extensions::ExtensionHost class). It implements both the 31 // (via the extensions::ExtensionHost class). It implements both the
32 // initialisation and listener functions for file-selection dialogs. 32 // initialisation and listener functions for file-selection dialogs.
33 class FileSelectHelper 33 class FileSelectHelper
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 content::RenderViewHost* render_view_host_; 141 content::RenderViewHost* render_view_host_;
142 content::WebContents* web_contents_; 142 content::WebContents* web_contents_;
143 143
144 // Dialog box used for choosing files to upload from file form fields. 144 // Dialog box used for choosing files to upload from file form fields.
145 scoped_refptr<ui::SelectFileDialog> select_file_dialog_; 145 scoped_refptr<ui::SelectFileDialog> select_file_dialog_;
146 scoped_ptr<ui::SelectFileDialog::FileTypeInfo> select_file_types_; 146 scoped_ptr<ui::SelectFileDialog::FileTypeInfo> select_file_types_;
147 147
148 // The type of file dialog last shown. 148 // The type of file dialog last shown.
149 ui::SelectFileDialog::Type dialog_type_; 149 ui::SelectFileDialog::Type dialog_type_;
150 150
151 // The mode of file dialog last shown.
152 content::FileChooserParams::Mode dialog_mode_;
153
151 // Maintain a list of active directory enumerations. These could come from 154 // Maintain a list of active directory enumerations. These could come from
152 // the file select dialog or from drag-and-drop of directories, so there could 155 // the file select dialog or from drag-and-drop of directories, so there could
153 // be more than one going on at a time. 156 // be more than one going on at a time.
154 struct ActiveDirectoryEnumeration; 157 struct ActiveDirectoryEnumeration;
155 std::map<int, ActiveDirectoryEnumeration*> directory_enumerations_; 158 std::map<int, ActiveDirectoryEnumeration*> directory_enumerations_;
156 159
157 // Registrar for notifications regarding our RenderViewHost. 160 // Registrar for notifications regarding our RenderViewHost.
158 content::NotificationRegistrar notification_registrar_; 161 content::NotificationRegistrar notification_registrar_;
159 162
160 DISALLOW_COPY_AND_ASSIGN(FileSelectHelper); 163 DISALLOW_COPY_AND_ASSIGN(FileSelectHelper);
161 }; 164 };
162 165
163 #endif // CHROME_BROWSER_FILE_SELECT_HELPER_H_ 166 #endif // CHROME_BROWSER_FILE_SELECT_HELPER_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/extensions/file_manager/file_handler_util.cc ('k') | chrome/browser/file_select_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698