Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 WIN8_METRO_DRIVER_CHROME_APP_VIEW_ASH_H_ | 5 #ifndef WIN8_METRO_DRIVER_CHROME_APP_VIEW_ASH_H_ |
| 6 #define WIN8_METRO_DRIVER_CHROME_APP_VIEW_ASH_H_ | 6 #define WIN8_METRO_DRIVER_CHROME_APP_VIEW_ASH_H_ |
| 7 | 7 |
| 8 #include <windows.applicationmodel.core.h> | 8 #include <windows.applicationmodel.core.h> |
| 9 #include <windows.ui.core.h> | 9 #include <windows.ui.core.h> |
| 10 #include <windows.ui.input.h> | 10 #include <windows.ui.input.h> |
| 11 #include <windows.ui.viewmanagement.h> | 11 #include <windows.ui.viewmanagement.h> |
| 12 | 12 |
| 13 #include "base/files/file_path.h" | |
| 14 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
| 15 #include "base/message_loop/message_loop.h" | 14 #include "base/message_loop/message_loop.h" |
| 16 #include "base/strings/string16.h" | 15 #include "base/strings/string16.h" |
| 17 #include "ui/base/events/event_constants.h" | 16 #include "ui/base/events/event_constants.h" |
| 18 #include "win8/metro_driver/direct3d_helper.h" | 17 #include "win8/metro_driver/direct3d_helper.h" |
| 19 | 18 |
| 19 namespace base { | |
| 20 class FilePath; | |
|
Bernhard Bauer
2013/08/31 10:15:05
Nit: No indent (also below).
| |
| 21 } | |
| 22 | |
| 20 namespace IPC { | 23 namespace IPC { |
| 21 class Listener; | 24 class Listener; |
| 22 class ChannelProxy; | 25 class ChannelProxy; |
| 23 } | 26 } |
| 24 | 27 |
| 25 class OpenFilePickerSession; | 28 class OpenFilePickerSession; |
| 26 class SaveFilePickerSession; | 29 class SaveFilePickerSession; |
| 27 class FolderPickerSession; | 30 class FolderPickerSession; |
| 28 class FilePickerSessionBase; | 31 class FilePickerSessionBase; |
| 29 | 32 |
| 30 struct MetroViewerHostMsg_SaveAsDialogParams; | 33 struct MetroViewerHostMsg_SaveAsDialogParams; |
| 31 | 34 |
| 32 class ChromeAppViewAsh | 35 class ChromeAppViewAsh |
| 33 : public mswr::RuntimeClass<winapp::Core::IFrameworkView> { | 36 : public mswr::RuntimeClass<winapp::Core::IFrameworkView> { |
| 34 public: | 37 public: |
| 35 ChromeAppViewAsh(); | 38 ChromeAppViewAsh(); |
| 36 ~ChromeAppViewAsh(); | 39 ~ChromeAppViewAsh(); |
| 37 | 40 |
| 38 // IViewProvider overrides. | 41 // IViewProvider overrides. |
| 39 IFACEMETHOD(Initialize)(winapp::Core::ICoreApplicationView* view); | 42 IFACEMETHOD(Initialize)(winapp::Core::ICoreApplicationView* view); |
| 40 IFACEMETHOD(SetWindow)(winui::Core::ICoreWindow* window); | 43 IFACEMETHOD(SetWindow)(winui::Core::ICoreWindow* window); |
| 41 IFACEMETHOD(Load)(HSTRING entryPoint); | 44 IFACEMETHOD(Load)(HSTRING entryPoint); |
| 42 IFACEMETHOD(Run)(); | 45 IFACEMETHOD(Run)(); |
| 43 IFACEMETHOD(Uninitialize)(); | 46 IFACEMETHOD(Uninitialize)(); |
| 44 | 47 |
| 45 // Helper function to unsnap the chrome metro app if it is snapped. | 48 // Helper function to unsnap the chrome metro app if it is snapped. |
| 46 // Returns S_OK on success. | 49 // Returns S_OK on success. |
| 47 static HRESULT Unsnap(); | 50 static HRESULT Unsnap(); |
| 48 | 51 |
| 52 void OnOpenURLOnDesktop(const base::FilePath& shortcut, const string16& url); | |
| 49 void OnSetCursor(HCURSOR cursor); | 53 void OnSetCursor(HCURSOR cursor); |
| 50 void OnDisplayFileOpenDialog(const string16& title, | 54 void OnDisplayFileOpenDialog(const string16& title, |
| 51 const string16& filter, | 55 const string16& filter, |
| 52 const base::FilePath& default_path, | 56 const base::FilePath& default_path, |
| 53 bool allow_multiple_files); | 57 bool allow_multiple_files); |
| 54 void OnDisplayFileSaveAsDialog( | 58 void OnDisplayFileSaveAsDialog( |
| 55 const MetroViewerHostMsg_SaveAsDialogParams& params); | 59 const MetroViewerHostMsg_SaveAsDialogParams& params); |
| 56 void OnDisplayFolderPicker(const string16& title); | 60 void OnDisplayFolderPicker(const string16& title); |
| 57 void OnSetCursorPos(int x, int y); | 61 void OnSetCursorPos(int x, int y); |
| 58 | 62 |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 152 IPC::ChannelProxy* ui_channel_; | 156 IPC::ChannelProxy* ui_channel_; |
| 153 | 157 |
| 154 // The actual window behind the view surface. | 158 // The actual window behind the view surface. |
| 155 HWND core_window_hwnd_; | 159 HWND core_window_hwnd_; |
| 156 | 160 |
| 157 // UI message loop to allow message passing into this thread. | 161 // UI message loop to allow message passing into this thread. |
| 158 base::MessageLoop ui_loop_; | 162 base::MessageLoop ui_loop_; |
| 159 }; | 163 }; |
| 160 | 164 |
| 161 #endif // WIN8_METRO_DRIVER_CHROME_APP_VIEW_ASH_H_ | 165 #endif // WIN8_METRO_DRIVER_CHROME_APP_VIEW_ASH_H_ |
| OLD | NEW |