| 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> |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 IFACEMETHOD(SetWindow)(winui::Core::ICoreWindow* window); | 59 IFACEMETHOD(SetWindow)(winui::Core::ICoreWindow* window); |
| 60 IFACEMETHOD(Load)(HSTRING entryPoint); | 60 IFACEMETHOD(Load)(HSTRING entryPoint); |
| 61 IFACEMETHOD(Run)(); | 61 IFACEMETHOD(Run)(); |
| 62 IFACEMETHOD(Uninitialize)(); | 62 IFACEMETHOD(Uninitialize)(); |
| 63 | 63 |
| 64 // Helper function to unsnap the chrome metro app if it is snapped. | 64 // Helper function to unsnap the chrome metro app if it is snapped. |
| 65 // Returns S_OK on success. | 65 // Returns S_OK on success. |
| 66 static HRESULT Unsnap(); | 66 static HRESULT Unsnap(); |
| 67 | 67 |
| 68 void OnActivateDesktop(const base::FilePath& file_path, bool ash_exit); | 68 void OnActivateDesktop(const base::FilePath& file_path, bool ash_exit); |
| 69 void OnOpenURLOnDesktop(const base::FilePath& shortcut, const string16& url); | 69 void OnOpenURLOnDesktop(const base::FilePath& shortcut, |
| 70 const base::string16& url); |
| 70 void OnSetCursor(HCURSOR cursor); | 71 void OnSetCursor(HCURSOR cursor); |
| 71 void OnDisplayFileOpenDialog(const string16& title, | 72 void OnDisplayFileOpenDialog(const base::string16& title, |
| 72 const string16& filter, | 73 const base::string16& filter, |
| 73 const base::FilePath& default_path, | 74 const base::FilePath& default_path, |
| 74 bool allow_multiple_files); | 75 bool allow_multiple_files); |
| 75 void OnDisplayFileSaveAsDialog( | 76 void OnDisplayFileSaveAsDialog( |
| 76 const MetroViewerHostMsg_SaveAsDialogParams& params); | 77 const MetroViewerHostMsg_SaveAsDialogParams& params); |
| 77 void OnDisplayFolderPicker(const string16& title); | 78 void OnDisplayFolderPicker(const base::string16& title); |
| 78 void OnSetCursorPos(int x, int y); | 79 void OnSetCursorPos(int x, int y); |
| 79 | 80 |
| 80 // This function is invoked when the open file operation completes. The | 81 // This function is invoked when the open file operation completes. The |
| 81 // result of the operation is passed in along with the OpenFilePickerSession | 82 // result of the operation is passed in along with the OpenFilePickerSession |
| 82 // instance which is deleted after we read the required information from | 83 // instance which is deleted after we read the required information from |
| 83 // the OpenFilePickerSession class. | 84 // the OpenFilePickerSession class. |
| 84 void OnOpenFileCompleted(OpenFilePickerSession* open_file_picker, | 85 void OnOpenFileCompleted(OpenFilePickerSession* open_file_picker, |
| 85 bool success); | 86 bool success); |
| 86 | 87 |
| 87 // This function is invoked when the save file operation completes. The | 88 // This function is invoked when the save file operation completes. The |
| (...skipping 22 matching lines...) Expand all Loading... |
| 110 class PointerInfoHandler; | 111 class PointerInfoHandler; |
| 111 | 112 |
| 112 // ImePopupObserver overrides. | 113 // ImePopupObserver overrides. |
| 113 virtual void OnImePopupChanged(ImePopupObserver::EventType event) OVERRIDE; | 114 virtual void OnImePopupChanged(ImePopupObserver::EventType event) OVERRIDE; |
| 114 | 115 |
| 115 // InputSourceObserver overrides. | 116 // InputSourceObserver overrides. |
| 116 virtual void OnInputSourceChanged() OVERRIDE; | 117 virtual void OnInputSourceChanged() OVERRIDE; |
| 117 | 118 |
| 118 // TextServiceDelegate overrides. | 119 // TextServiceDelegate overrides. |
| 119 virtual void OnCompositionChanged( | 120 virtual void OnCompositionChanged( |
| 120 const string16& text, | 121 const base::string16& text, |
| 121 int32 selection_start, | 122 int32 selection_start, |
| 122 int32 selection_end, | 123 int32 selection_end, |
| 123 const std::vector<metro_viewer::UnderlineInfo>& underlines) OVERRIDE; | 124 const std::vector<metro_viewer::UnderlineInfo>& underlines) OVERRIDE; |
| 124 virtual void OnTextCommitted(const string16& text) OVERRIDE; | 125 virtual void OnTextCommitted(const base::string16& text) OVERRIDE; |
| 125 | 126 |
| 126 // Convenience for sending a MetroViewerHostMsg_MouseButton with the specified | 127 // Convenience for sending a MetroViewerHostMsg_MouseButton with the specified |
| 127 // parameters. | 128 // parameters. |
| 128 void SendMouseButton(int x, | 129 void SendMouseButton(int x, |
| 129 int y, | 130 int y, |
| 130 int extra, | 131 int extra, |
| 131 ui::EventType event_type, | 132 ui::EventType event_type, |
| 132 uint32 flags, | 133 uint32 flags, |
| 133 ui::EventFlags changed_button); | 134 ui::EventFlags changed_button); |
| 134 | 135 |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 // Helper to handle search requests received via the search charm in ASH. | 175 // Helper to handle search requests received via the search charm in ASH. |
| 175 HRESULT HandleSearchRequest(winapp::Activation::IActivatedEventArgs* args); | 176 HRESULT HandleSearchRequest(winapp::Activation::IActivatedEventArgs* args); |
| 176 // Helper to handle http/https url requests in ASH. | 177 // Helper to handle http/https url requests in ASH. |
| 177 HRESULT HandleProtocolRequest(winapp::Activation::IActivatedEventArgs* args); | 178 HRESULT HandleProtocolRequest(winapp::Activation::IActivatedEventArgs* args); |
| 178 | 179 |
| 179 HRESULT OnEdgeGestureCompleted(winui::Input::IEdgeGesture* gesture, | 180 HRESULT OnEdgeGestureCompleted(winui::Input::IEdgeGesture* gesture, |
| 180 winui::Input::IEdgeGestureEventArgs* args); | 181 winui::Input::IEdgeGestureEventArgs* args); |
| 181 | 182 |
| 182 // Tasks posted to the UI thread to initiate the search/url navigation | 183 // Tasks posted to the UI thread to initiate the search/url navigation |
| 183 // requests. | 184 // requests. |
| 184 void OnSearchRequest(const string16& search_string); | 185 void OnSearchRequest(const base::string16& search_string); |
| 185 void OnNavigateToUrl(const string16& url); | 186 void OnNavigateToUrl(const base::string16& url); |
| 186 | 187 |
| 187 HRESULT OnSizeChanged(winui::Core::ICoreWindow* sender, | 188 HRESULT OnSizeChanged(winui::Core::ICoreWindow* sender, |
| 188 winui::Core::IWindowSizeChangedEventArgs* args); | 189 winui::Core::IWindowSizeChangedEventArgs* args); |
| 189 | 190 |
| 190 mswr::ComPtr<winui::Core::ICoreWindow> window_; | 191 mswr::ComPtr<winui::Core::ICoreWindow> window_; |
| 191 mswr::ComPtr<winapp::Core::ICoreApplicationView> view_; | 192 mswr::ComPtr<winapp::Core::ICoreApplicationView> view_; |
| 192 EventRegistrationToken activated_token_; | 193 EventRegistrationToken activated_token_; |
| 193 EventRegistrationToken pointermoved_token_; | 194 EventRegistrationToken pointermoved_token_; |
| 194 EventRegistrationToken pointerpressed_token_; | 195 EventRegistrationToken pointerpressed_token_; |
| 195 EventRegistrationToken pointerreleased_token_; | 196 EventRegistrationToken pointerreleased_token_; |
| (...skipping 23 matching lines...) Expand all Loading... |
| 219 | 220 |
| 220 // UI message loop to allow message passing into this thread. | 221 // UI message loop to allow message passing into this thread. |
| 221 base::MessageLoopForUI ui_loop_; | 222 base::MessageLoopForUI ui_loop_; |
| 222 | 223 |
| 223 // For IME support. | 224 // For IME support. |
| 224 scoped_ptr<metro_driver::InputSource> input_source_; | 225 scoped_ptr<metro_driver::InputSource> input_source_; |
| 225 scoped_ptr<metro_driver::TextService> text_service_; | 226 scoped_ptr<metro_driver::TextService> text_service_; |
| 226 }; | 227 }; |
| 227 | 228 |
| 228 #endif // WIN8_METRO_DRIVER_CHROME_APP_VIEW_ASH_H_ | 229 #endif // WIN8_METRO_DRIVER_CHROME_APP_VIEW_ASH_H_ |
| OLD | NEW |