Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(174)

Side by Side Diff: ui/events/event.h

Issue 1027193003: Make MouseWheelEvent::UpdateForRootTransform() not scale the mouse wheel offset (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | ui/events/event.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 UI_EVENTS_EVENT_H_ 5 #ifndef UI_EVENTS_EVENT_H_
6 #define UI_EVENTS_EVENT_H_ 6 #define UI_EVENTS_EVENT_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/event_types.h" 10 #include "base/event_types.h"
(...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after
466 base::TimeDelta time_stamp, 466 base::TimeDelta time_stamp,
467 int flags, 467 int flags,
468 int changed_button_flags); 468 int changed_button_flags);
469 469
470 // The amount to scroll. This is in multiples of kWheelDelta. 470 // The amount to scroll. This is in multiples of kWheelDelta.
471 // Note: x_offset() > 0/y_offset() > 0 means scroll left/up. 471 // Note: x_offset() > 0/y_offset() > 0 means scroll left/up.
472 int x_offset() const { return offset_.x(); } 472 int x_offset() const { return offset_.x(); }
473 int y_offset() const { return offset_.y(); } 473 int y_offset() const { return offset_.y(); }
474 const gfx::Vector2d& offset() const { return offset_; } 474 const gfx::Vector2d& offset() const { return offset_; }
475 475
476 // Overridden from LocatedEvent.
477 void UpdateForRootTransform(
478 const gfx::Transform& inverted_root_transform) override;
479
480 private: 476 private:
481 gfx::Vector2d offset_; 477 gfx::Vector2d offset_;
482 }; 478 };
483 479
484 class EVENTS_EXPORT TouchEvent : public LocatedEvent { 480 class EVENTS_EXPORT TouchEvent : public LocatedEvent {
485 public: 481 public:
486 explicit TouchEvent(const base::NativeEvent& native_event); 482 explicit TouchEvent(const base::NativeEvent& native_event);
487 483
488 // Create a new TouchEvent which is identical to the provided model. 484 // Create a new TouchEvent which is identical to the provided model.
489 // If source / target windows are provided, the model location will be 485 // If source / target windows are provided, the model location will be
(...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after
883 879
884 const GestureEventDetails& details() const { return details_; } 880 const GestureEventDetails& details() const { return details_; }
885 881
886 private: 882 private:
887 GestureEventDetails details_; 883 GestureEventDetails details_;
888 }; 884 };
889 885
890 } // namespace ui 886 } // namespace ui
891 887
892 #endif // UI_EVENTS_EVENT_H_ 888 #endif // UI_EVENTS_EVENT_H_
OLDNEW
« no previous file with comments | « no previous file | ui/events/event.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698