summaryrefslogtreecommitdiffstats
path: root/views/events
diff options
context:
space:
mode:
authorben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-20 15:40:45 +0000
committerben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-20 15:40:45 +0000
commit10946079e34f1a627e9afa232049469a6655cc17 (patch)
tree6de5c4fa11f7fb6ede9601de1acc86e4a53aa1b2 /views/events
parent334bef925113a03dac5dc92184ab7ce51e06a386 (diff)
downloadchromium_src-10946079e34f1a627e9afa232049469a6655cc17.zip
chromium_src-10946079e34f1a627e9afa232049469a6655cc17.tar.gz
chromium_src-10946079e34f1a627e9afa232049469a6655cc17.tar.bz2
Move RootView to the internal namespace.
Most people should not be using the RootView type. The few cases that do should static_cast for now, until I can find a way to expose the functionality they need on Widget. BUG=72040 TEST=none TBR=sky Review URL: http://codereview.chromium.org/7040018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86084 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/events')
-rw-r--r--views/events/event.cc4
-rw-r--r--views/events/event.h19
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_) {
}