| 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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 HRESULT OnKeyUp(winui::Core::ICoreWindow* sender, | 103 HRESULT OnKeyUp(winui::Core::ICoreWindow* sender, |
| 104 winui::Core::IKeyEventArgs* args); | 104 winui::Core::IKeyEventArgs* args); |
| 105 | 105 |
| 106 // Invoked for system keys like Alt, etc. | 106 // Invoked for system keys like Alt, etc. |
| 107 HRESULT OnAcceleratorKeyDown(winui::Core::ICoreDispatcher* sender, | 107 HRESULT OnAcceleratorKeyDown(winui::Core::ICoreDispatcher* sender, |
| 108 winui::Core::IAcceleratorKeyEventArgs* args); | 108 winui::Core::IAcceleratorKeyEventArgs* args); |
| 109 | 109 |
| 110 HRESULT OnCharacterReceived(winui::Core::ICoreWindow* sender, | 110 HRESULT OnCharacterReceived(winui::Core::ICoreWindow* sender, |
| 111 winui::Core::ICharacterReceivedEventArgs* args); | 111 winui::Core::ICharacterReceivedEventArgs* args); |
| 112 | 112 |
| 113 HRESULT OnVisibilityChanged(winui::Core::ICoreWindow* sender, | |
| 114 winui::Core::IVisibilityChangedEventArgs* args); | |
| 115 | |
| 116 HRESULT OnWindowActivated(winui::Core::ICoreWindow* sender, | 113 HRESULT OnWindowActivated(winui::Core::ICoreWindow* sender, |
| 117 winui::Core::IWindowActivatedEventArgs* args); | 114 winui::Core::IWindowActivatedEventArgs* args); |
| 118 | 115 |
| 119 // Helper to handle search requests received via the search charm in ASH. | 116 // Helper to handle search requests received via the search charm in ASH. |
| 120 HRESULT HandleSearchRequest(winapp::Activation::IActivatedEventArgs* args); | 117 HRESULT HandleSearchRequest(winapp::Activation::IActivatedEventArgs* args); |
| 121 // Helper to handle http/https url requests in ASH. | 118 // Helper to handle http/https url requests in ASH. |
| 122 HRESULT HandleProtocolRequest(winapp::Activation::IActivatedEventArgs* args); | 119 HRESULT HandleProtocolRequest(winapp::Activation::IActivatedEventArgs* args); |
| 123 | 120 |
| 124 // Tasks posted to the UI thread to initiate the search/url navigation | 121 // Tasks posted to the UI thread to initiate the search/url navigation |
| 125 // requests. | 122 // requests. |
| 126 void OnSearchRequest(const string16& search_string); | 123 void OnSearchRequest(const string16& search_string); |
| 127 void OnNavigateToUrl(const string16& url); | 124 void OnNavigateToUrl(const string16& url); |
| 128 | 125 |
| 129 HRESULT OnSizeChanged(winui::Core::ICoreWindow* sender, | 126 HRESULT OnSizeChanged(winui::Core::ICoreWindow* sender, |
| 130 winui::Core::IWindowSizeChangedEventArgs* args); | 127 winui::Core::IWindowSizeChangedEventArgs* args); |
| 131 | 128 |
| 132 mswr::ComPtr<winui::Core::ICoreWindow> window_; | 129 mswr::ComPtr<winui::Core::ICoreWindow> window_; |
| 133 mswr::ComPtr<winapp::Core::ICoreApplicationView> view_; | 130 mswr::ComPtr<winapp::Core::ICoreApplicationView> view_; |
| 134 EventRegistrationToken activated_token_; | 131 EventRegistrationToken activated_token_; |
| 135 EventRegistrationToken pointermoved_token_; | 132 EventRegistrationToken pointermoved_token_; |
| 136 EventRegistrationToken pointerpressed_token_; | 133 EventRegistrationToken pointerpressed_token_; |
| 137 EventRegistrationToken pointerreleased_token_; | 134 EventRegistrationToken pointerreleased_token_; |
| 138 EventRegistrationToken wheel_token_; | 135 EventRegistrationToken wheel_token_; |
| 139 EventRegistrationToken keydown_token_; | 136 EventRegistrationToken keydown_token_; |
| 140 EventRegistrationToken keyup_token_; | 137 EventRegistrationToken keyup_token_; |
| 141 EventRegistrationToken character_received_token_; | 138 EventRegistrationToken character_received_token_; |
| 142 EventRegistrationToken visibility_changed_token_; | |
| 143 EventRegistrationToken accel_keydown_token_; | 139 EventRegistrationToken accel_keydown_token_; |
| 144 EventRegistrationToken accel_keyup_token_; | 140 EventRegistrationToken accel_keyup_token_; |
| 145 EventRegistrationToken window_activated_token_; | 141 EventRegistrationToken window_activated_token_; |
| 146 EventRegistrationToken sizechange_token_; | 142 EventRegistrationToken sizechange_token_; |
| 147 | 143 |
| 148 // Keep state about which button is currently down, if any, as PointerMoved | 144 // Keep state about which button is currently down, if any, as PointerMoved |
| 149 // events do not contain that state, but Ash's MouseEvents need it. | 145 // events do not contain that state, but Ash's MouseEvents need it. |
| 150 ui::EventFlags mouse_down_flags_; | 146 ui::EventFlags mouse_down_flags_; |
| 151 | 147 |
| 152 // Set the D3D swap chain and nothing else. | 148 // Set the D3D swap chain and nothing else. |
| 153 metro_driver::Direct3DHelper direct3d_helper_; | 149 metro_driver::Direct3DHelper direct3d_helper_; |
| 154 | 150 |
| 155 // The channel to Chrome, in particular to the MetroViewerProcessHost. | 151 // The channel to Chrome, in particular to the MetroViewerProcessHost. |
| 156 IPC::ChannelProxy* ui_channel_; | 152 IPC::ChannelProxy* ui_channel_; |
| 157 | 153 |
| 158 // The actual window behind the view surface. | 154 // The actual window behind the view surface. |
| 159 HWND core_window_hwnd_; | 155 HWND core_window_hwnd_; |
| 160 | 156 |
| 161 // UI message loop to allow message passing into this thread. | 157 // UI message loop to allow message passing into this thread. |
| 162 base::MessageLoop ui_loop_; | 158 base::MessageLoop ui_loop_; |
| 163 }; | 159 }; |
| 164 | 160 |
| 165 #endif // WIN8_METRO_DRIVER_CHROME_APP_VIEW_ASH_H_ | 161 #endif // WIN8_METRO_DRIVER_CHROME_APP_VIEW_ASH_H_ |
| OLD | NEW |