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

Unified Diff: ui/views/events/event.h

Issue 10832282: Replace views::MouseEvent with ui::MouseEvent (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/controls/tree/tree_view_views.cc ('k') | ui/views/events/event.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/events/event.h
===================================================================
--- ui/views/events/event.h (revision 151406)
+++ ui/views/events/event.h (working copy)
@@ -33,56 +33,6 @@
////////////////////////////////////////////////////////////////////////////////
//
-// MouseEvent class
-//
-// A mouse event is used for any input event related to the mouse.
-//
-////////////////////////////////////////////////////////////////////////////////
-class VIEWS_EXPORT MouseEvent : public ui::LocatedEvent {
- public:
- explicit MouseEvent(const ui::NativeEvent& native_event);
- // Create a new MouseEvent which is identical to the provided model.
- // If source / target views are provided, the model location will be converted
- // from |source| coordinate system to |target| coordinate system.
- MouseEvent(const MouseEvent& model, View* source, View* target);
-
- // TODO(msw): Kill this legacy constructor when we update uses.
- // Create a new mouse event
- MouseEvent(ui::EventType type, int x, int y, int flags)
- : LocatedEvent(type, gfx::Point(x, y), gfx::Point(x, y), flags) {
- }
-
- // Conveniences to quickly test what button is down
- bool IsOnlyLeftMouseButton() const {
- return (flags() & ui::EF_LEFT_MOUSE_BUTTON) &&
- !(flags() & (ui::EF_MIDDLE_MOUSE_BUTTON | ui::EF_RIGHT_MOUSE_BUTTON));
- }
-
- bool IsLeftMouseButton() const {
- return (flags() & ui::EF_LEFT_MOUSE_BUTTON) != 0;
- }
-
- bool IsOnlyMiddleMouseButton() const {
- return (flags() & ui::EF_MIDDLE_MOUSE_BUTTON) &&
- !(flags() & (ui::EF_LEFT_MOUSE_BUTTON | ui::EF_RIGHT_MOUSE_BUTTON));
- }
-
- bool IsMiddleMouseButton() const {
- return (flags() & ui::EF_MIDDLE_MOUSE_BUTTON) != 0;
- }
-
- bool IsOnlyRightMouseButton() const {
- return (flags() & ui::EF_RIGHT_MOUSE_BUTTON) &&
- !(flags() & (ui::EF_LEFT_MOUSE_BUTTON | ui::EF_MIDDLE_MOUSE_BUTTON));
- }
-
- bool IsRightMouseButton() const {
- return (flags() & ui::EF_RIGHT_MOUSE_BUTTON) != 0;
- }
-};
-
-////////////////////////////////////////////////////////////////////////////////
-//
// TouchEvent class
//
// A touch event is generated by touch screen and advanced track
@@ -149,7 +99,7 @@
// Note: e.GetOffset() > 0 means scroll up / left.
//
////////////////////////////////////////////////////////////////////////////////
-class VIEWS_EXPORT MouseWheelEvent : public MouseEvent {
+class VIEWS_EXPORT MouseWheelEvent : public ui::MouseEvent {
public:
// See |offset| for details.
static const int kWheelDelta;
@@ -200,7 +150,7 @@
DISALLOW_COPY_AND_ASSIGN(DropTargetEvent);
};
-class VIEWS_EXPORT ScrollEvent : public MouseEvent {
+class VIEWS_EXPORT ScrollEvent : public ui::MouseEvent {
public:
explicit ScrollEvent(const ui::NativeEvent& native_event);
« no previous file with comments | « ui/views/controls/tree/tree_view_views.cc ('k') | ui/views/events/event.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698