summaryrefslogtreecommitdiffstats
path: root/chrome/browser/file_select_helper.cc
Commit message (Collapse)AuthorAgeFilesLines
* Upstreaming SelectFileDialog for Androidaurimas@chromium.org2012-09-181-1/+7
| | | | | | | | | | | | Upstreaming the Select File Dialog and its dependencies needed for Chrome on Android BUG=116131 Review URL: https://chromiumcodereview.appspot.com/10916160 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@157424 0039d316-1c4b-4281-b951-d872f2087c98
* [cros] disable GDrive option on certain file pickersestade@chromium.org2012-09-151-8/+11
| | | | | | | | | | | | This disables the GDrive folder for features that don't support reading/writing gdata. See bug for complete list. BUG=149184 TEST=manual (all pickers listed on bug under "doesn't work", no longer shows gdrive, others still do) Review URL: https://chromiumcodereview.appspot.com/10908262 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@157012 0039d316-1c4b-4281-b951-d872f2087c98
* Allows GetExtensionsForMimeType to support mime types like "foo/*"thorogood@chromium.org2012-09-101-9/+7
| | | | | | | | | | | Additionally, removes the prescriptive methods Get{Image,Audio,Video}Extension methods: it's less specific to just support "image/*", "audio/*", and "video/*", respectively. BUG=145112 Review URL: https://chromiumcodereview.appspot.com/10908006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@155673 0039d316-1c4b-4281-b951-d872f2087c98
* Make saving files from flash less annoying.tsepez@chromium.org2012-08-151-3/+4
| | | | | | | | | | Resolves missing or relative suggested paths relative to the last opened directory, and when the path is a directory itself, browse files under it rather than itself under its parent. Determining the latter takes a file system interrogation because the syntax isn't sufficient. BUG=140799 Review URL: https://chromiumcodereview.appspot.com/10697010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@151738 0039d316-1c4b-4281-b951-d872f2087c98
* Clean-up inline members of nested classes (chrome/)hans@chromium.org2012-08-101-0/+9
| | | | | | | | | | | | | | | | Due to a bug, the Clang-plugin style checker failed to warn about inline constructors, destructors, non-empty virtual methods, etc. for nested classes. The plugin has been fixed, and this patch is part of a clean-up of all the code that now causes the plugin to issue errors. BUG=139346 Review URL: https://chromiumcodereview.appspot.com/10855075 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@151135 0039d316-1c4b-4281-b951-d872f2087c98
* Remove redirection header and add "ui::" before all SelectFileDialog usage.erg@chromium.org2012-07-311-13/+15
| | | | | | | | | | BUG=134529 TEST=compiles Review URL: https://chromiumcodereview.appspot.com/10820034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@149111 0039d316-1c4b-4281-b951-d872f2087c98
* Fix open dialog not remembering last opened folder on drive tbarzic@chromium.org2012-07-261-12/+10
| | | | | | | | | | | | | | | | | The problem is dialog passes file's local cache path in FileSelected. Last selected directory paths get set to cache dir, which file manager does not understand, so it opens default dir. In order to properly remember last selected dir, we should also pass file's drive path to dialog listeners and use it to remember last selected dir. BUG=126923 TEST=manual Review URL: https://chromiumcodereview.appspot.com/10804026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@148492 0039d316-1c4b-4281-b951-d872f2087c98
* Reapply: Start consolidating cross-port file selection code into ↵erg@google.com2012-07-021-3/+3
| | | | | | | | | | | | | | | | ui/base/dialogs. Part 2: Split the chrome specific policy code into a chrome class that implements a general interface. In the next patch, we'll actually move SelectFileDialog to ui/base/dialogs/. BUG=134529 TEST=none TBR=sky,jam First Review URL: https://chromiumcodereview.appspot.com/10667026 Review URL: https://chromiumcodereview.appspot.com/10704046 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@145156 0039d316-1c4b-4281-b951-d872f2087c98
* Breaks compile on Linux Auraabodenha@chromium.org2012-06-291-3/+3
| | | | | | | | | | | | | | | | | | Revert 144938 - Start consolidating cross-port file selection code into ui/base/dialogs. Part 2: Split the chrome specific policy code into a chrome class that implements a general interface. In the next patch, we'll actually move SelectFileDialog to ui/base/dialogs/. BUG=134529 TEST=none Review URL: https://chromiumcodereview.appspot.com/10667026 TBR=erg@chromium.org Review URL: https://chromiumcodereview.appspot.com/10698053 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@144945 0039d316-1c4b-4281-b951-d872f2087c98
* Start consolidating cross-port file selection code into ui/base/dialogs.erg@chromium.org2012-06-291-3/+3
| | | | | | | | | | | | | Part 2: Split the chrome specific policy code into a chrome class that implements a general interface. In the next patch, we'll actually move SelectFileDialog to ui/base/dialogs/. BUG=134529 TEST=none Review URL: https://chromiumcodereview.appspot.com/10667026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@144938 0039d316-1c4b-4281-b951-d872f2087c98
* Reland: Start consolidating non-port specific code to ui/base/dialogs.erg@google.com2012-06-261-12/+12
| | | | | | | | | | | | | | | | | | | (All that's changed is moving the implementations out of headers and into dedicated source files. The win_aura trybots now pass.) This moves content::SelectedFileInfo (what the select dialog outputs) and BaseShellDialog to ui/base/dialogs/. (This was split off from https://chromiumcodereview.appspot.com/10667026/ because that patch is getting huge.) BUG=134529 TEST=none TBR=sky,jam First Review URL: https://chromiumcodereview.appspot.com/10669023 Review URL: https://chromiumcodereview.appspot.com/10665050 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@144261 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 144199 - win_aura failure -Start consolidating non-port specific code ↵erg@google.com2012-06-261-12/+12
| | | | | | | | | | | | | | | | | | | | to ui/base/dialogs. This moves content::SelectedFileInfo (what the select dialog outputs) and BaseShellDialog to ui/base/dialogs/. (This was split off from https://chromiumcodereview.appspot.com/10667026/ because that patch is getting huge.) BUG=134529 TEST=none Review URL: https://chromiumcodereview.appspot.com/10669023 TBR=erg@google.com Review URL: https://chromiumcodereview.appspot.com/10666056 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@144202 0039d316-1c4b-4281-b951-d872f2087c98
* Start consolidating non-port specific code to ui/base/dialogs.erg@google.com2012-06-261-12/+12
| | | | | | | | | | | | | | | This moves content::SelectedFileInfo (what the select dialog outputs) and BaseShellDialog to ui/base/dialogs/. (This was split off from https://chromiumcodereview.appspot.com/10667026/ because that patch is getting huge.) BUG=134529 TEST=none Review URL: https://chromiumcodereview.appspot.com/10669023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@144199 0039d316-1c4b-4281-b951-d872f2087c98
* Make the unit-tests compile again on Android.jcivelli@chromium.org2012-06-201-1/+1
| | | | | | | | | | BUG=None TEST=unit-tests should compile on Android (but still not link). Review URL: https://chromiumcodereview.appspot.com/10583026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@143237 0039d316-1c4b-4281-b951-d872f2087c98
* android content shell bringup.jrg@chromium.org2012-06-151-0/+4
| | | | | | | | | | | | | Starting classes for content view, content view client. Includes some relevant deps needed to build or pass a sanity check. BUG= TEST= Review URL: https://chromiumcodereview.appspot.com/10536066 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@142309 0039d316-1c4b-4281-b951-d872f2087c98
* Modified the pepper file chooser API to support filtering files by extensions.raymes@chromium.org2012-05-301-12/+27
| | | | | | | | | | | | | | Previously you could filter only by MIME type. This adds support for filtering by specific extensions as well, e.g. .txt,.html. This change is aligned with the web platform which now allows filtering by file extension for <input> elements (http://www.whatwg.org/specs/web-apps/current-work/multipage/states-of-the-type-attribute.html#attr-input-accept). This also changes the linux implementation of the file dialog (SelectFileDialogImplGTK). In the past, it would turn file extensions to filter into MIME types. However this is a bit silly because in FileSelectHelper we do the reverse (turn MIME types into a list of file extensions to filter by). It also prevents us from filtering by a specific extensions when this is really what is desired. BUG=129251 TEST= Review URL: https://chromiumcodereview.appspot.com/10414085 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@139434 0039d316-1c4b-4281-b951-d872f2087c98
* Move RunFileChooserHelper and EnumerateDirectoryHelper out of Browser.mihaip@chromium.org2012-05-221-11/+33
| | | | | | | | R=sky@chromium.org Review URL: https://chromiumcodereview.appspot.com/10411064 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@138296 0039d316-1c4b-4281-b951-d872f2087c98
* [Coverity] Change pass-by-val to pass-by-refgroby@chromium.org2012-03-201-1/+1
| | | | | | | | | | | | CID=103554 BUG= TEST= Review URL: http://codereview.chromium.org/9727007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@127622 0039d316-1c4b-4281-b951-d872f2087c98
* filechooser: Add SelectedFileInfo class to pass display names to WebKitsatorux@chromium.org2012-03-141-7/+43
| | | | | | | | | | | | | | | | | | | Files on gdata are cached locally with human unreadable names like /blah/gdata/cache/d41d8cd98f00b204e9800998ecf8427e. When these files are selected from the file chooser for uploading from <form>, we should pass display names, in addition to real paths, to WebKit, so the proper names are shown in web pages, and used for uploading. This patch simply adds SelectedFileInfo with minimal code changes. There should be no behavior changes. The file selection code for Chrome OS will be changed in a separate patch. BUG=chromium-os:27222 TEST=try bots. Review URL: https://chromiumcodereview.appspot.com/9651028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@126606 0039d316-1c4b-4281-b951-d872f2087c98
* Move Render(View|Widget)Host and associated classes to content namespace.joi@chromium.org2012-03-071-0/+2
| | | | | | | | | TBR=jam@chromium.org BUG=98716 Review URL: https://chromiumcodereview.appspot.com/9600036 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@125388 0039d316-1c4b-4281-b951-d872f2087c98
* Move RenderWidgetHost and RenderViewHost interfaces to their own files.joi@chromium.org2012-03-061-1/+1
| | | | | | | | | | | This also finishes breaking the Chrome dependency on RenderWidgetHostImpl and RenderViewHostImpl. TBR=jam@chromium.org BUG=98716 Review URL: https://chromiumcodereview.appspot.com/9599011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@125166 0039d316-1c4b-4281-b951-d872f2087c98
* Extract minimal RenderViewHost interface for embedders, leavingjoi@chromium.org2012-03-051-1/+1
| | | | | | | | | | | | RenderViewHostImpl for content. TBR=darin@chromium.org BUG=98716 Review URL: http://codereview.chromium.org/9473001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@124941 0039d316-1c4b-4281-b951-d872f2087c98
* Move RenderWidgetHostView into content namespace. Fix include paths.joi@chromium.org2012-02-201-3/+3
| | | | | | | | | | | | TBR=pkasting@chromium.org BUG=98716 Initial commit: 122753 Reverted (linux_chromeos_gtk build problem): r122755 Review URL: https://chromiumcodereview.appspot.com/9420007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@122758 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 122753 - Move RenderWidgetHostView into content namespace. Fix ↵joi@chromium.org2012-02-201-3/+3
| | | | | | | | | | | | | | | include paths. TBR=pkasting@chromium.org BUG=98716 Review URL: http://codereview.chromium.org/9420007 TBR=joi@chromium.org Review URL: https://chromiumcodereview.appspot.com/9355042 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@122755 0039d316-1c4b-4281-b951-d872f2087c98
* Move RenderWidgetHostView into content namespace. Fix include paths.joi@chromium.org2012-02-201-3/+3
| | | | | | | | | | TBR=pkasting@chromium.org BUG=98716 Review URL: http://codereview.chromium.org/9420007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@122753 0039d316-1c4b-4281-b951-d872f2087c98
* Convert a bunch of WebContentsObservers to use web_contents() instead of ↵jam@chromium.org2011-12-251-13/+13
| | | | | | | | | | tab_contents(), as well as all the dependent code. BUG=98716 TBR=joi Review URL: http://codereview.chromium.org/8982008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@115777 0039d316-1c4b-4281-b951-d872f2087c98
* Implement RunFileChooser for ExtensionHost, so that file input elements work inmpcomplete@chromium.org2011-12-151-1/+5
| | | | | | | | | | | | | | extension popups. Also fix a leak that happens if the renderer that initiated a file chooser is closed before the file chooser appears. BUG=104222 TEST=see bug for repro Review URL: http://codereview.chromium.org/8909015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@114692 0039d316-1c4b-4281-b951-d872f2087c98
* Get rid of view_messages.h include from chrome since TabContentsDelegate ↵jam@chromium.org2011-11-221-8/+8
| | | | | | | | | | used a struct from it (ViewHostMsg_RunFileChooser_Params). Moved that to a struct in content/public/common. BUG=98716 Review URL: http://codereview.chromium.org/8622005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111086 0039d316-1c4b-4281-b951-d872f2087c98
* Remove needless include of the content/browser/render_process_host.h header ↵ananta@chromium.org2011-11-041-1/+0
| | | | | | | | | | | file. Part 1 of upcoming changes to move RPH/BRPH to a public interface. BUG=98716 Review URL: http://codereview.chromium.org/8451012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@108608 0039d316-1c4b-4281-b951-d872f2087c98
* Move BrowserThread to content namespace.joi@chromium.org2011-11-021-0/+2
| | | | | | | | | TBR=owners BUG=98716 Review URL: http://codereview.chromium.org/8437002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@108270 0039d316-1c4b-4281-b951-d872f2087c98
* Use WebFileChooserParams::accpetMIMETypes instead of acceptTypes.tkent@chromium.org2011-11-021-14/+9
| | | | | | | | | | | | acceptMIMETypes is a list of valid lowercased MIME types. We can remove spliting, lowercasing, and stripping code in GetFileTypesFromAcceptType(). BUG=none TEST=none because this doesn't make any behavior change. Review URL: http://codereview.chromium.org/8401030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@108252 0039d316-1c4b-4281-b951-d872f2087c98
* Move NotificationObserver, NotificationSource, and NotificationDetails to ↵jam@chromium.org2011-10-191-8/+9
| | | | | | | | | | | content/public/browser. This patch got way bigger than I wanted, but once I moved NotificationDetails, I figured I might as well mvoe the others since they're in the same files. In hindsight, I should have converted a subset of files at a time by leaving a using statement in the header. BUG=98716 TBR=joi git-svn-id: svn://svn.chromium.org/chrome/trunk/src@106196 0039d316-1c4b-4281-b951-d872f2087c98
* Move content_notification_types.h from content\common to ↵jam@chromium.org2011-10-181-0/+1
| | | | | | | | | content\public\browser. I dropped the "content" from the name to match other files whose chrome version adds a "chrome_" prefix. I also moved it to the browser directory since notifications are only used in the browser process. I will move the other notification files in future changes. BUG=98716 Review URL: http://codereview.chromium.org/8331001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@106028 0039d316-1c4b-4281-b951-d872f2087c98
* Fix the file perms given for write access.viettrungluu@chromium.org2011-10-141-0/+4
| | | | | | | | | | | | This allows save dialogs to work properly in (trusted) Pepper. BUG=none TEST=Trung's Flapper build works. Review URL: http://codereview.chromium.org/8283023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105445 0039d316-1c4b-4281-b951-d872f2087c98
* Implement 'SAVEAS' mode for PPB_FileChooser_Impl. Also, fix the Save File ↵bbudge@chromium.org2011-10-131-5/+28
| | | | | | | | | | | dialog when thesuggested file name is a root directory, such as "C:\". BUG=73070 TEST=manual Review URL: http://codereview.chromium.org/8142018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105247 0039d316-1c4b-4281-b951-d872f2087c98
* Fix crash when running the file chooser dialog from PPAPI.BUG=97637TEST=manualbbudge@chromium.org2011-09-291-26/+94
| | | | | | Review URL: http://codereview.chromium.org/7994015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103325 0039d316-1c4b-4281-b951-d872f2087c98
* Fix NOTIFICATION_RENDER_WIDGET_HOST_DESTROYED.avi@chromium.org2011-08-301-2/+2
| | | | | | | | | | | For NOTIFICATION_RENDER_WIDGET_HOST_DESTROYED the source is a RenderWidgetHost, and there are no details. Fix all the places that do the wrong thing. BUG=94653 TEST=no DCHECK when closing a tab while a file picker is up Review URL: http://codereview.chromium.org/7799009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98830 0039d316-1c4b-4281-b951-d872f2087c98
* Handle the ViewHostMsg_RunFileChooser and ViewHostMsg_EnumerateDirectory IPC ↵ananta@chromium.org2011-08-241-50/+8
| | | | | | | | | | | | messages which are sent by content(renderer) via the TabContentsDelegate. We eventually want to get rid of the pattern of sending IPC messages from content and handling them in chrome and vice versa. BUG=87335 Review URL: http://codereview.chromium.org/7721003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98081 0039d316-1c4b-4281-b951-d872f2087c98
* Removal of Profile from content part 3.avi@chromium.org2011-07-281-4/+10
| | | | | | | | | BUG=76788 TEST=no change visible Review URL: http://codereview.chromium.org/7522018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@94511 0039d316-1c4b-4281-b951-d872f2087c98
* Moving notification types which are chrome specific to a new header file ↵ananta@chromium.org2011-07-101-5/+5
| | | | | | | | | | | | | chrome_notification_types.h. This file lives in chrome\common. The chrome specific notifications start from NOTIFICATION_CONTENT_END which defines the end of the enum used by content to define notification types. The notificaton_type.h file in content\common has been renamed to content_notification_types.h BUG=76698 Review URL: http://codereview.chromium.org/7327007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@91972 0039d316-1c4b-4281-b951-d872f2087c98
* Coverity: Initialize member variables.jhawkins@chromium.org2011-06-211-1/+1
| | | | | | | | | | | | | CID=6462,16139,16144,16145,16233,16322,16402,16421,16422,16423,16660,16663, 16942,17035,17118,17120,17144,17243,17266,17267,17268 BUG=none TEST=none R=kmadhusu@chromium.org Review URL: http://codereview.chromium.org/7206047 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89894 0039d316-1c4b-4281-b951-d872f2087c98
* Fix DirectoryLister not to require refcounting.willchan@chromium.org2011-04-271-9/+6
| | | | | | | | | | | | Also prevent DirectoryLister from blocking the IO thread when cancelled (blocked on joining file IO thread). Allows us to remove refcounting from URLRequestFileDirJob. BUG=65331 TEST=Browse to file:/// and make sure it still works. Test cancellation by closing the tab. Review URL: http://codereview.chromium.org/6898047 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@83193 0039d316-1c4b-4281-b951-d872f2087c98
* Policy to manage file selection dialogs.pastarmovj@chromium.org2011-04-151-0/+6
| | | | | | | | | | | | | | | | Adds a policy to allow/disallow file selection dialogs from wherever they can be launched (Save Link As, Import Bookmarks, etc.). In case file selection dialogs are disallowed by policy a InfoBar informs the user whenever he triggers a file selection dialog. BUG=73174 TEST=Manually set the policy and check if the corresponding file selection are not shown and the InfoBar appears. Review URL: http://codereview.chromium.org/6814011 Patch from Sandro Feuz <sfeuz@google.com>. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81804 0039d316-1c4b-4281-b951-d872f2087c98
* Fix clang build.johnnyg@chromium.org2011-04-121-0/+9
| | | | | | Review URL: http://codereview.chromium.org/6821061 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81196 0039d316-1c4b-4281-b951-d872f2087c98
* Add a path for a web page to request the enumeration of a directory. This, ↵johnnyg@chromium.org2011-04-121-23/+80
| | | | | | | | | | together with a WebKit change, will allow a drag-and-drop on a Directory Upload control (<input type=file webkitdirectory>) which provides only the path to the renderer, to correctly populate the control as if the user had selected that directory in a file picker. BUG=58977 TEST=drag-and-drop on directory upload control (with upstream change) Review URL: http://codereview.chromium.org/6623015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81183 0039d316-1c4b-4281-b951-d872f2087c98
* Move a bunch of renderer->browser messages to content.jam@chromium.org2011-03-231-6/+5
| | | | | | | TBR=tsepez Review URL: http://codereview.chromium.org/6721021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79152 0039d316-1c4b-4281-b951-d872f2087c98
* Pull the file picker code out of TabContents.avi@chromium.org2011-03-111-1/+28
| | | | | | | | | BUG=71097 TEST=hammer on the HTML file selection dialogs. No visible change; no crashes, nothing. Review URL: http://codereview.chromium.org/6680002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77835 0039d316-1c4b-4281-b951-d872f2087c98
* Update a bunch of files to the new location of notification files.tfarina@chromium.org2011-03-091-4/+4
| | | | | | | | | | | Second part of the remaining files. BUG=None TEST=None Review URL: http://codereview.chromium.org/6639008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77396 0039d316-1c4b-4281-b951-d872f2087c98
* Get rid of a bunch of includes to old locations of headers.jam@chromium.org2011-03-021-2/+2
| | | | | | | TBR=avi Review URL: http://codereview.chromium.org/6602061 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76470 0039d316-1c4b-4281-b951-d872f2087c98
* Carnitas: move browser/shell_dialogs.{h,cc} to browser/uiestade@chromium.org2011-02-111-1/+0
| | | | | | | | | BUG=none TEST=compile Review URL: http://codereview.chromium.org/6485017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74658 0039d316-1c4b-4281-b951-d872f2087c98