| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/gtk/repost_form_warning_gtk.h" | 5 #include "chrome/browser/gtk/repost_form_warning_gtk.h" |
| 6 | 6 |
| 7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
| 8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
| 9 #include "chrome/browser/browser_thread.h" | 9 #include "chrome/browser/browser_thread.h" |
| 10 #include "chrome/browser/gtk/gtk_util.h" | 10 #include "chrome/browser/gtk/gtk_util.h" |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 } | 81 } |
| 82 | 82 |
| 83 void RepostFormWarningGtk::OnHierarchyChanged(GtkWidget* root, | 83 void RepostFormWarningGtk::OnHierarchyChanged(GtkWidget* root, |
| 84 GtkWidget* previous_toplevel) { | 84 GtkWidget* previous_toplevel) { |
| 85 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 85 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 86 if (!GTK_WIDGET_TOPLEVEL(gtk_widget_get_toplevel(cancel_))) { | 86 if (!GTK_WIDGET_TOPLEVEL(gtk_widget_get_toplevel(cancel_))) { |
| 87 return; | 87 return; |
| 88 } | 88 } |
| 89 gtk_widget_grab_focus(cancel_); | 89 gtk_widget_grab_focus(cancel_); |
| 90 } | 90 } |
| OLD | NEW |