Chromium Code Reviews| Index: chrome/browser/tab_contents/tab_contents_view_gtk.cc |
| diff --git a/chrome/browser/tab_contents/tab_contents_view_gtk.cc b/chrome/browser/tab_contents/tab_contents_view_gtk.cc |
| index 4f63b299c3b21b72f6c9690cb26ece0d8ae77a57..4ca60b5127713259a3bfe114a912af8c816e8c5f 100644 |
| --- a/chrome/browser/tab_contents/tab_contents_view_gtk.cc |
| +++ b/chrome/browser/tab_contents/tab_contents_view_gtk.cc |
| @@ -272,6 +272,8 @@ void TabContentsViewGtk::GotFocus() { |
| // This is called when we the renderer asks us to take focus back (i.e., it has |
|
Lei Zhang
2011/11/16 21:52:06
s/when we/when /
|
| // iterated past the last focusable element on the page). |
| void TabContentsViewGtk::TakeFocus(bool reverse) { |
| + if (!tab_contents_->delegate()) |
| + return; |
| if (!tab_contents_->delegate()->TakeFocus(reverse)) { |
| gtk_widget_child_focus(GTK_WIDGET(GetTopLevelNativeWindow()), |
| reverse ? GTK_DIR_TAB_BACKWARD : GTK_DIR_TAB_FORWARD); |