summaryrefslogtreecommitdiffstats
path: root/views/focus
diff options
context:
space:
mode:
authorben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-16 17:21:23 +0000
committerben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-16 17:21:23 +0000
commit2f2b57b7e32777e656d4dbbbc04cd914d5b94472 (patch)
tree9e925e8063d39c06c4edb068d2f3a371ff395589 /views/focus
parent4e8655deaccc49465a6c18055887d1e0e2501a55 (diff)
downloadchromium_src-2f2b57b7e32777e656d4dbbbc04cd914d5b94472.zip
chromium_src-2f2b57b7e32777e656d4dbbbc04cd914d5b94472.tar.gz
chromium_src-2f2b57b7e32777e656d4dbbbc04cd914d5b94472.tar.bz2
Re-land:
Move private NativeWidget methods to new internal interface NativeWidgetPrivate. This should make it harder to abuse accidentally. BUG=72040 TEST=none Review URL: http://codereview.chromium.org/7170019 Review URL: http://codereview.chromium.org/7189012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89357 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/focus')
-rw-r--r--views/focus/accelerator_handler_touch.cc4
-rw-r--r--views/focus/focus_manager_gtk.cc4
-rw-r--r--views/focus/focus_manager_win.cc5
3 files changed, 6 insertions, 7 deletions
diff --git a/views/focus/accelerator_handler_touch.cc b/views/focus/accelerator_handler_touch.cc
index 9edf516..3ffbd6a 100644
--- a/views/focus/accelerator_handler_touch.cc
+++ b/views/focus/accelerator_handler_touch.cc
@@ -32,13 +32,13 @@ Widget* FindWidgetForGdkWindow(GdkWindow* gdk_window) {
DLOG(WARNING) << "no GtkWidget found for that GdkWindow";
return NULL;
}
- NativeWidget* widget = NativeWidget::GetNativeWidgetForNativeView(gtk_widget);
+ Widget* widget = Widget::GetWidgetForNativeView(gtk_widget);
if (!widget) {
DLOG(WARNING) << "no NativeWidgetGtk found for that GtkWidget";
return NULL;
}
- return widget->GetWidget();
+ return widget;
}
} // namespace
diff --git a/views/focus/focus_manager_gtk.cc b/views/focus/focus_manager_gtk.cc
index 399ddc4..f6128681 100644
--- a/views/focus/focus_manager_gtk.cc
+++ b/views/focus/focus_manager_gtk.cc
@@ -27,7 +27,7 @@ FocusManager* FocusManager::GetFocusManagerForNativeView(
if (!root || !GTK_WIDGET_TOPLEVEL(root))
return NULL;
- NativeWidget* widget = NativeWidget::GetNativeWidgetForNativeView(root);
+ Widget* widget = Widget::GetWidgetForNativeView(root);
if (!widget) {
// TODO(jcampan): http://crbug.com/21378 Reenable this NOTREACHED() when the
// options page is only based on views.
@@ -35,7 +35,7 @@ FocusManager* FocusManager::GetFocusManagerForNativeView(
NOTIMPLEMENTED();
return NULL;
}
- FocusManager* focus_manager = widget->GetWidget()->GetFocusManager();
+ FocusManager* focus_manager = widget->GetFocusManager();
DCHECK(focus_manager) << "no FocusManager for top level Widget";
return focus_manager;
}
diff --git a/views/focus/focus_manager_win.cc b/views/focus/focus_manager_win.cc
index 79d0b59..a358fc8 100644
--- a/views/focus/focus_manager_win.cc
+++ b/views/focus/focus_manager_win.cc
@@ -25,9 +25,8 @@ void FocusManager::FocusNativeView(gfx::NativeView native_view) {
FocusManager* FocusManager::GetFocusManagerForNativeView(
gfx::NativeView native_view) {
// TODO(beng): This method probably isn't necessary.
- views::NativeWidget* native_widget =
- views::NativeWidget::GetTopLevelNativeWidget(native_view);
- return native_widget ? native_widget->GetWidget()->GetFocusManager() : NULL;
+ Widget* widget = Widget::GetTopLevelWidgetForNativeView(native_view);
+ return widget ? widget->GetFocusManager() : NULL;
}
// static