From 25d0eddc26905d8a5e22de980436f73924b32438 Mon Sep 17 00:00:00 2001 From: "ananta@chromium.org" Date: Fri, 19 Apr 2013 17:44:24 +0000 Subject: Added support for displaying the select folder picker in Chrome ASH on Windows 8. The current behavior is that the select folder picker displays in desktop mode even when when performed in ASH. Fixes are as below:- 1. In the Chrome browser added plumbing in the SelectFileDialogImpl class to forward this operation of to the metro viewer process via the newly added function HandedSelectFolder which lives in the aura namespace in the remote_window_host_win.cc file. 2. In the metro viewer code added a new class FolderPickerSession which provides the functionality for displaying the metro select folder picker and returning the results from the same. 3. The following IPC messages provide the necessary functionality to funnel the request and the result between the browser and the metro viewer process. MetroViewerHostMsg_DisplaySelectFolder MetroViewerHostMsg_SelectFolderDone I also added code to save away the metro root window in the RemoteRootWindowHostWin class when we receive the MetroViewerHostMsg_SetTargetSurface IPC from the viewer process. We return this window in the RemoteRootWindowHostWin::GetAcceleratedWidget function. This change although not needed for this CL seems correct. BUG=230087 R=cpu,sky Review URL: https://codereview.chromium.org/14282002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@195224 0039d316-1c4b-4281-b951-d872f2087c98 --- ui/shell_dialogs/select_file_dialog_win.cc | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'ui/shell_dialogs/select_file_dialog_win.cc') diff --git a/ui/shell_dialogs/select_file_dialog_win.cc b/ui/shell_dialogs/select_file_dialog_win.cc index b3f31ed..b176182 100644 --- a/ui/shell_dialogs/select_file_dialog_win.cc +++ b/ui/shell_dialogs/select_file_dialog_win.cc @@ -575,6 +575,12 @@ void SelectFileDialogImpl::SelectFileImpl( base::Bind(&ui::SelectFileDialog::Listener::MultiFilesSelected, base::Unretained(listener_))); return; + } else if (type == SELECT_FOLDER) { + aura::HandleSelectFolder( + UTF16ToWide(title), + base::Bind(&ui::SelectFileDialog::Listener::FileSelected, + base::Unretained(listener_))); + return; } } HWND owner = owning_window -- cgit v1.1