| 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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 const std::vector<metro_viewer::UnderlineInfo>& underlines) OVERRIDE; | 124 const std::vector<metro_viewer::UnderlineInfo>& underlines) OVERRIDE; |
| 125 virtual void OnTextCommitted(const base::string16& text) OVERRIDE; | 125 virtual void OnTextCommitted(const base::string16& text) OVERRIDE; |
| 126 | 126 |
| 127 // Convenience for sending a MetroViewerHostMsg_MouseButton with the specified | 127 // Convenience for sending a MetroViewerHostMsg_MouseButton with the specified |
| 128 // parameters. | 128 // parameters. |
| 129 void SendMouseButton(int x, | 129 void SendMouseButton(int x, |
| 130 int y, | 130 int y, |
| 131 int extra, | 131 int extra, |
| 132 ui::EventType event_type, | 132 ui::EventType event_type, |
| 133 uint32 flags, | 133 uint32 flags, |
| 134 ui::EventFlags changed_button); | 134 ui::EventFlags changed_button, |
| 135 bool is_horizontal_wheel); |
| 135 | 136 |
| 136 // Win8 only generates a mouse press for the initial button that goes down and | 137 // Win8 only generates a mouse press for the initial button that goes down and |
| 137 // a release when the last button is released. Any intermediary presses (or | 138 // a release when the last button is released. Any intermediary presses (or |
| 138 // releases) do not result in a new press/release event. Instead a move is | 139 // releases) do not result in a new press/release event. Instead a move is |
| 139 // generated with the winui::Input::PointerUpdateKind identifying what | 140 // generated with the winui::Input::PointerUpdateKind identifying what |
| 140 // changed. This function generates the necessary intermediary events (as | 141 // changed. This function generates the necessary intermediary events (as |
| 141 // necessary). | 142 // necessary). |
| 142 void GenerateMouseEventFromMoveIfNecessary(const PointerInfoHandler& pointer); | 143 void GenerateMouseEventFromMoveIfNecessary(const PointerInfoHandler& pointer); |
| 143 | 144 |
| 144 HRESULT OnActivate(winapp::Core::ICoreApplicationView* view, | 145 HRESULT OnActivate(winapp::Core::ICoreApplicationView* view, |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 220 | 221 |
| 221 // UI message loop to allow message passing into this thread. | 222 // UI message loop to allow message passing into this thread. |
| 222 base::MessageLoopForUI ui_loop_; | 223 base::MessageLoopForUI ui_loop_; |
| 223 | 224 |
| 224 // For IME support. | 225 // For IME support. |
| 225 scoped_ptr<metro_driver::InputSource> input_source_; | 226 scoped_ptr<metro_driver::InputSource> input_source_; |
| 226 scoped_ptr<metro_driver::TextService> text_service_; | 227 scoped_ptr<metro_driver::TextService> text_service_; |
| 227 }; | 228 }; |
| 228 | 229 |
| 229 #endif // WIN8_METRO_DRIVER_CHROME_APP_VIEW_ASH_H_ | 230 #endif // WIN8_METRO_DRIVER_CHROME_APP_VIEW_ASH_H_ |
| OLD | NEW |