Commit f7566289 authored by sadrul@chromium.org's avatar sadrul@chromium.org

views-desktop: Add the desktop-window as an observer for a widget when it gets...

views-desktop: Add the desktop-window as an observer for a widget when it gets added to the desktop.

This fixes sending keyboard events to the browser in views-desktop.

TBR=sky@chromium.org
BUG=none
TEST=none

Review URL: http://codereview.chromium.org/7604024

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@96126 0039d316-1c4b-4281-b951-d872f2087c98
parent dd81a7cf
...@@ -176,8 +176,14 @@ void DesktopWindowView::ViewHierarchyChanged( ...@@ -176,8 +176,14 @@ void DesktopWindowView::ViewHierarchyChanged(
bool is_add, View* parent, View* child) { bool is_add, View* parent, View* child) {
if (!is_add && if (!is_add &&
active_native_widget_ && active_native_widget_ &&
active_native_widget_->GetView() == child) active_native_widget_->GetView() == child) {
active_native_widget_ = NULL; active_native_widget_ = NULL;
} else if (child->GetClassName() ==
internal::NativeWidgetView::kViewClassName) {
internal::NativeWidgetView* native_widget_view =
static_cast<internal::NativeWidgetView*>(child);
native_widget_view->GetAssociatedWidget()->AddObserver(this);
}
} }
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment