diff options
author | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-02 06:11:22 +0000 |
---|---|---|
committer | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-02 06:11:22 +0000 |
commit | 3ef5d1b8cd0d307dda2b03b7d8bf9c8d7d97e870 (patch) | |
tree | 7725c4b1c02db26a7e09c30d325c2777109228d6 /views/focus | |
parent | 99f5dfdbdf3b9d948750a4bbed07b0a2eef2337e (diff) | |
download | chromium_src-3ef5d1b8cd0d307dda2b03b7d8bf9c8d7d97e870.zip chromium_src-3ef5d1b8cd0d307dda2b03b7d8bf9c8d7d97e870.tar.gz chromium_src-3ef5d1b8cd0d307dda2b03b7d8bf9c8d7d97e870.tar.bz2 |
Reverting to fix builder redness. Please fix and reland.
Revert 76483 - Remove/replace RootView/Widget getters with new NativeWidget getters.
BUG=72040
TEST=existing unittests.
Review URL: http://codereview.chromium.org/6598069
TBR=ben@chromium.org
Review URL: http://codereview.chromium.org/6597099
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76508 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/focus')
-rw-r--r-- | views/focus/accelerator_handler_touch.cc | 6 | ||||
-rw-r--r-- | views/focus/focus_manager_gtk.cc | 4 | ||||
-rw-r--r-- | views/focus/focus_manager_win.cc | 6 |
3 files changed, 7 insertions, 9 deletions
diff --git a/views/focus/accelerator_handler_touch.cc b/views/focus/accelerator_handler_touch.cc index 389fe7d..d4b072a 100644 --- a/views/focus/accelerator_handler_touch.cc +++ b/views/focus/accelerator_handler_touch.cc @@ -31,13 +31,13 @@ RootView* FindRootViewForGdkWindow(GdkWindow* gdk_window) { DLOG(WARNING) << "no GtkWidget found for that GdkWindow"; return NULL; } + WidgetGtk* widget_gtk = WidgetGtk::GetViewForNative(gtk_widget); - NativeWidget* widget = NativeWidget::GetNativeWidgetForNativeView(gtk_widget); - if (!widget) { + if (!widget_gtk) { DLOG(WARNING) << "no WidgetGtk found for that GtkWidget"; return NULL; } - return widget->GetWidget()->GetRootView(); + return widget_gtk->GetRootView(); } #if defined(HAVE_XINPUT2) diff --git a/views/focus/focus_manager_gtk.cc b/views/focus/focus_manager_gtk.cc index 327c785..6e9dbcf 100644 --- a/views/focus/focus_manager_gtk.cc +++ b/views/focus/focus_manager_gtk.cc @@ -28,7 +28,7 @@ FocusManager* FocusManager::GetFocusManagerForNativeView( if (!root || !GTK_WIDGET_TOPLEVEL(root)) return NULL; - NativeWidget* widget = NativeWidget::GetNativeWidgetForNativeView(root); + WidgetGtk* widget = WidgetGtk::GetViewForNative(root); if (!widget) { // TODO(jcampan): http://crbug.com/21378 Reenable this NOTREACHED() when the // options page is only based on views. @@ -36,7 +36,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 d6f1e02..faf3815 100644 --- a/views/focus/focus_manager_win.cc +++ b/views/focus/focus_manager_win.cc @@ -23,10 +23,8 @@ void FocusManager::FocusNativeView(gfx::NativeView native_view) { // static 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; + WidgetWin* widget = WidgetWin::GetRootWidget(native_view); + return widget ? widget->GetFocusManager() : NULL; } // static |