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

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

Issue 10414085: Modified the pepper file chooser API to support filtering files by extensions. (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
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 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 #include <vector> 10 #include <vector>
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 const net::DirectoryLister::DirectoryListerData& data); 116 const net::DirectoryLister::DirectoryListerData& data);
117 virtual void OnListDone(int id, int error); 117 virtual void OnListDone(int id, int error);
118 118
119 // Cleans up and releases this instance. This must be called after the last 119 // Cleans up and releases this instance. This must be called after the last
120 // callback is received from the enumeration code. 120 // callback is received from the enumeration code.
121 void EnumerateDirectoryEnd(); 121 void EnumerateDirectoryEnd();
122 122
123 // Helper method to get allowed extensions for select file dialog from 123 // Helper method to get allowed extensions for select file dialog from
124 // the specified accept types as defined in the spec: 124 // the specified accept types as defined in the spec:
125 // http://whatwg.org/html/number-state.html#attr-input-accept 125 // http://whatwg.org/html/number-state.html#attr-input-accept
126 // |accept_types| contains only valid lowercased MIME types. 126 // |accept_types| contains only valid lowercased MIME types or file extensions
127 // beginning with a period (.).
127 SelectFileDialog::FileTypeInfo* GetFileTypesFromAcceptType( 128 SelectFileDialog::FileTypeInfo* GetFileTypesFromAcceptType(
128 const std::vector<string16>& accept_types); 129 const std::vector<string16>& accept_types);
129 130
130 // Profile used to set/retrieve the last used directory. 131 // Profile used to set/retrieve the last used directory.
131 Profile* profile_; 132 Profile* profile_;
132 133
133 // The RenderViewHost and WebContents for the page showing a file dialog 134 // The RenderViewHost and WebContents for the page showing a file dialog
134 // (may only be one such dialog). 135 // (may only be one such dialog).
135 content::RenderViewHost* render_view_host_; 136 content::RenderViewHost* render_view_host_;
136 content::WebContents* web_contents_; 137 content::WebContents* web_contents_;
(...skipping 11 matching lines...) Expand all
148 struct ActiveDirectoryEnumeration; 149 struct ActiveDirectoryEnumeration;
149 std::map<int, ActiveDirectoryEnumeration*> directory_enumerations_; 150 std::map<int, ActiveDirectoryEnumeration*> directory_enumerations_;
150 151
151 // Registrar for notifications regarding our RenderViewHost. 152 // Registrar for notifications regarding our RenderViewHost.
152 content::NotificationRegistrar notification_registrar_; 153 content::NotificationRegistrar notification_registrar_;
153 154
154 DISALLOW_COPY_AND_ASSIGN(FileSelectHelper); 155 DISALLOW_COPY_AND_ASSIGN(FileSelectHelper);
155 }; 156 };
156 157
157 #endif // CHROME_BROWSER_FILE_SELECT_HELPER_H_ 158 #endif // CHROME_BROWSER_FILE_SELECT_HELPER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/file_select_helper.cc » ('j') | chrome/browser/file_select_helper.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698