| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #include "views/events/event.h" | 5 #include "views/events/event.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "views/view.h" | 8 #include "views/view.h" |
| 9 #include "views/widget/root_view.h" | 9 #include "views/widget/root_view.h" |
| 10 | 10 |
| (...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 button = ui::EF_RIGHT_BUTTON_DOWN; | 236 button = ui::EF_RIGHT_BUTTON_DOWN; |
| 237 else if (touch.identity() == 2) | 237 else if (touch.identity() == 2) |
| 238 button = ui::EF_MIDDLE_BUTTON_DOWN; | 238 button = ui::EF_MIDDLE_BUTTON_DOWN; |
| 239 set_flags(new_flags | button); | 239 set_flags(new_flags | button); |
| 240 } | 240 } |
| 241 | 241 |
| 242 //////////////////////////////////////////////////////////////////////////////// | 242 //////////////////////////////////////////////////////////////////////////////// |
| 243 // MouseWheelEvent, public: | 243 // MouseWheelEvent, public: |
| 244 | 244 |
| 245 #if !defined(USE_AURA) | 245 #if !defined(USE_AURA) |
| 246 MouseWheelEvent::MouseWheelEvent(const ui::NativeEvent& native_event) | 246 MouseWheelEvent::MouseWheelEvent(const NativeEvent& native_event) |
| 247 : MouseEvent(native_event), | 247 : MouseEvent(native_event), |
| 248 offset_(ui::GetMouseWheelOffset(native_event)) { | 248 offset_(ui::GetMouseWheelOffset(native_event)) { |
| 249 } | 249 } |
| 250 #endif | 250 #endif |
| 251 | 251 |
| 252 //////////////////////////////////////////////////////////////////////////////// | 252 //////////////////////////////////////////////////////////////////////////////// |
| 253 // TouchEvent, public: | 253 // TouchEvent, public: |
| 254 | 254 |
| 255 TouchEvent::TouchEvent(ui::EventType type, | 255 TouchEvent::TouchEvent(ui::EventType type, |
| 256 int x, | 256 int x, |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 291 } | 291 } |
| 292 | 292 |
| 293 //////////////////////////////////////////////////////////////////////////////// | 293 //////////////////////////////////////////////////////////////////////////////// |
| 294 // MouseWheelEvent, public: | 294 // MouseWheelEvent, public: |
| 295 | 295 |
| 296 // This value matches windows WHEEL_DELTA. | 296 // This value matches windows WHEEL_DELTA. |
| 297 // static | 297 // static |
| 298 const int MouseWheelEvent::kWheelDelta = 120; | 298 const int MouseWheelEvent::kWheelDelta = 120; |
| 299 | 299 |
| 300 } // namespace views | 300 } // namespace views |
| OLD | NEW |