summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser')
-rw-r--r--chrome/browser/renderer_host/render_widget_host_view_gtk.cc13
1 files changed, 9 insertions, 4 deletions
diff --git a/chrome/browser/renderer_host/render_widget_host_view_gtk.cc b/chrome/browser/renderer_host/render_widget_host_view_gtk.cc
index ee2f7b9..c11d3af 100644
--- a/chrome/browser/renderer_host/render_widget_host_view_gtk.cc
+++ b/chrome/browser/renderer_host/render_widget_host_view_gtk.cc
@@ -234,16 +234,21 @@ void RenderWidgetHostViewGtk::MovePluginWindows(
}
void RenderWidgetHostViewGtk::Focus() {
- host_->Focus();
+ gtk_widget_grab_focus(view_.get());
}
void RenderWidgetHostViewGtk::Blur() {
- host_->Blur();
+ // TODO(estade): We should be clearing native focus as well, but I know of no
+ // way to do that without focusing another widget.
+ // TODO(estade): it doesn't seem like the CanBlur() check should be necessary
+ // since we are only called in response to a ViewHost blur message, but this
+ // check is made on Windows so I've added it here as well.
+ if (host_->CanBlur())
+ host_->Blur();
}
bool RenderWidgetHostViewGtk::HasFocus() {
- NOTIMPLEMENTED();
- return false;
+ return gtk_widget_is_focus(view_.get());
}
void RenderWidgetHostViewGtk::Show() {