summaryrefslogtreecommitdiffstats
path: root/views/focus
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/focus
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/focus')
-rw-r--r--views/focus/accelerator_handler_touch.cc3
-rw-r--r--views/focus/focus_manager_unittest.cc12
2 files changed, 7 insertions, 8 deletions
diff --git a/views/focus/accelerator_handler_touch.cc b/views/focus/accelerator_handler_touch.cc
index 3ac8e4a..91e981a 100644
--- a/views/focus/accelerator_handler_touch.cc
+++ b/views/focus/accelerator_handler_touch.cc
@@ -18,7 +18,6 @@
#include "views/ime/input_method.h"
#include "views/touchui/touch_factory.h"
#include "views/widget/native_widget.h"
-#include "views/widget/root_view.h"
namespace views {
@@ -80,7 +79,7 @@ bool DispatchX2Event(Widget* widget, XEvent* xev) {
// If the TouchEvent is processed by |root|, then return. Otherwise let
// it fall through so it can be used as a MouseEvent, if desired.
TouchEvent touch(xev, from_native);
- RootView* root = widget->GetRootView();
+ View* root = widget->GetRootView();
if (root->OnTouchEvent(touch) != views::View::TOUCH_STATUS_UNKNOWN)
return true;
diff --git a/views/focus/focus_manager_unittest.cc b/views/focus/focus_manager_unittest.cc
index d8122c2..b891cae 100644
--- a/views/focus/focus_manager_unittest.cc
+++ b/views/focus/focus_manager_unittest.cc
@@ -267,12 +267,12 @@ class BorderView : public NativeViewHost {
virtual ~BorderView() {}
- virtual RootView* GetContentsRootView() {
- return widget_->GetRootView();
+ virtual internal::RootView* GetContentsRootView() {
+ return static_cast<internal::RootView*>(widget_->GetRootView());
}
virtual FocusTraversable* GetFocusTraversable() {
- return widget_->GetRootView();
+ return static_cast<internal::RootView*>(widget_->GetRootView());
}
virtual void ViewHierarchyChanged(bool is_add, View *parent, View *child) {
@@ -283,7 +283,7 @@ class BorderView : public NativeViewHost {
widget_ = new Widget;
Widget::InitParams params(Widget::InitParams::TYPE_CONTROL);
#if defined(OS_WIN)
- params.parent = parent->GetRootView()->GetWidget()->GetNativeView();
+ params.parent = parent->GetWidget()->GetNativeView();
#elif defined(TOOLKIT_USES_GTK)
params.parent = native_view();
#endif
@@ -295,8 +295,8 @@ class BorderView : public NativeViewHost {
// We have been added to a view hierarchy, attach the native view.
Attach(widget_->GetNativeView());
// Also update the FocusTraversable parent so the focus traversal works.
- widget_->GetRootView()->SetFocusTraversableParent(
- GetWidget()->GetFocusTraversable());
+ static_cast<internal::RootView*>(widget_->GetRootView())->
+ SetFocusTraversableParent(GetWidget()->GetFocusTraversable());
}
}