summaryrefslogtreecommitdiffstats
path: root/win8/metro_driver/chrome_app_view_ash.h
diff options
context:
space:
mode:
authorananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-19 17:44:24 +0000
committerananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-19 17:44:24 +0000
commit25d0eddc26905d8a5e22de980436f73924b32438 (patch)
tree79095ef033b5666d4079fdadb2ceedec1e720cf1 /win8/metro_driver/chrome_app_view_ash.h
parent4a17172f8fa12506af298e5f017f991162da2c29 (diff)
downloadchromium_src-25d0eddc26905d8a5e22de980436f73924b32438.zip
chromium_src-25d0eddc26905d8a5e22de980436f73924b32438.tar.gz
chromium_src-25d0eddc26905d8a5e22de980436f73924b32438.tar.bz2
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
Diffstat (limited to 'win8/metro_driver/chrome_app_view_ash.h')
-rw-r--r--win8/metro_driver/chrome_app_view_ash.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/win8/metro_driver/chrome_app_view_ash.h b/win8/metro_driver/chrome_app_view_ash.h
index 6952d3d..e649f8d 100644
--- a/win8/metro_driver/chrome_app_view_ash.h
+++ b/win8/metro_driver/chrome_app_view_ash.h
@@ -10,6 +10,7 @@
#include <windows.ui.input.h>
#include <windows.ui.viewmanagement.h>
+#include "base/files/file_path.h"
#include "base/memory/scoped_ptr.h"
#include "base/string16.h"
#include "ui/base/events/event_constants.h"
@@ -22,6 +23,8 @@ namespace IPC {
class OpenFilePickerSession;
class SaveFilePickerSession;
+class FolderPickerSession;
+class FilePickerSessionBase;
struct MetroViewerHostMsg_SaveAsDialogParams;
@@ -45,10 +48,11 @@ class ChromeAppViewAsh
void OnSetCursor(HCURSOR cursor);
void OnDisplayFileOpenDialog(const string16& title,
const string16& filter,
- const string16& default_path,
+ const base::FilePath& default_path,
bool allow_multiple_files);
void OnDisplayFileSaveAsDialog(
const MetroViewerHostMsg_SaveAsDialogParams& params);
+ void OnDisplayFolderPicker(const string16& title);
// This function is invoked when the open file operation completes. The
// result of the operation is passed in along with the OpenFilePickerSession
@@ -64,6 +68,13 @@ class ChromeAppViewAsh
void OnSaveFileCompleted(SaveFilePickerSession* save_file_picker,
bool success);
+ // This function is invoked when the folder picker operation completes. The
+ // result of the operation is passed in along with the FolderPickerSession
+ // instance which is deleted after we read the required information from
+ // the FolderPickerSession class.
+ void OnFolderPickerCompleted(FolderPickerSession* folder_picker,
+ bool success);
+
private:
HRESULT OnActivate(winapp::Core::ICoreApplicationView* view,
winapp::Activation::IActivatedEventArgs* args);
@@ -109,6 +120,7 @@ class ChromeAppViewAsh
EventRegistrationToken visibility_changed_token_;
EventRegistrationToken accel_keydown_token_;
EventRegistrationToken accel_keyup_token_;
+ EventRegistrationToken window_activated_token_;
// Keep state about which button is currently down, if any, as PointerMoved
// events do not contain that state, but Ash's MouseEvents need it.