diff options
Diffstat (limited to 'views/events')
-rw-r--r-- | views/events/event.cc | 4 | ||||
-rw-r--r-- | views/events/event.h | 19 |
2 files changed, 13 insertions, 10 deletions
diff --git a/views/events/event.cc b/views/events/event.cc index b729967..86166b7 100644 --- a/views/events/event.cc +++ b/views/events/event.cc @@ -53,7 +53,7 @@ LocatedEvent::LocatedEvent(const LocatedEvent& model, View* source, View::ConvertPointToView(source, target, &location_); } -LocatedEvent::LocatedEvent(const LocatedEvent& model, RootView* root) +LocatedEvent::LocatedEvent(const LocatedEvent& model, View* root) : Event(model), location_(model.location_) { View::ConvertPointFromWidget(root, &location_); @@ -206,7 +206,7 @@ TouchEvent::TouchEvent(const TouchEvent& model, View* source, View* target) //////////////////////////////////////////////////////////////////////////////// // TouchEvent, private: -TouchEvent::TouchEvent(const TouchEvent& model, RootView* root) +TouchEvent::TouchEvent(const TouchEvent& model, View* root) : LocatedEvent(model, root), touch_id_(model.touch_id_), radius_(model.radius_), diff --git a/views/events/event.h b/views/events/event.h index 924a350..2c23104 100644 --- a/views/events/event.h +++ b/views/events/event.h @@ -24,9 +24,12 @@ using ui::OSExchangeData; namespace views { -class RootView; class View; +namespace internal { +class RootView; +} + #if defined(OS_WIN) bool IsClientMouseEvent(const views::NativeEvent& native_event); bool IsNonClientMouseEvent(const views::NativeEvent& native_event); @@ -156,7 +159,7 @@ class LocatedEvent : public Event { // This constructor is to allow converting the location of an event from the // widget's coordinate system to the RootView's coordinate system. - LocatedEvent(const LocatedEvent& model, RootView* root); + LocatedEvent(const LocatedEvent& model, View* root); gfx::Point location_; }; @@ -226,12 +229,12 @@ class MouseEvent : public LocatedEvent { } protected: - MouseEvent(const MouseEvent& model, RootView* root) + MouseEvent(const MouseEvent& model, View* root) : LocatedEvent(model, root) { } private: - friend class RootView; + friend class internal::RootView; DISALLOW_COPY_AND_ASSIGN(MouseEvent); }; @@ -272,9 +275,9 @@ class TouchEvent : public LocatedEvent { float ratio() const { return ratio_; } private: - friend class RootView; + friend class internal::RootView; - TouchEvent(const TouchEvent& model, RootView* root); + TouchEvent(const TouchEvent& model, View* root); // The identity (typically finger) of the touch starting at 0 and incrementing // for each separable additional touch that the hardware can detect. @@ -373,9 +376,9 @@ class MouseWheelEvent : public MouseEvent { int offset() const { return offset_; } private: - friend class RootView; + friend class internal::RootView; - MouseWheelEvent(const MouseWheelEvent& model, RootView* root) + MouseWheelEvent(const MouseWheelEvent& model, View* root) : MouseEvent(model, root), offset_(model.offset_) { } |