OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/ui/gtk/constrained_window_gtk.h" | 5 #include "chrome/browser/ui/gtk/constrained_window_gtk.h" |
6 | 6 |
7 #include <gdk/gdkkeysyms.h> | 7 #include <gdk/gdkkeysyms.h> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
11 #include "chrome/browser/ui/browser_list.h" | 11 #include "chrome/browser/ui/browser_list.h" |
12 #include "chrome/browser/ui/constrained_window_tab_helper.h" | 12 #include "chrome/browser/ui/constrained_window_tab_helper.h" |
| 13 #include "chrome/browser/ui/constrained_window_tab_helper_delegate.h" |
13 #include "chrome/browser/ui/gtk/gtk_util.h" | 14 #include "chrome/browser/ui/gtk/gtk_util.h" |
14 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" | 15 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" |
15 #include "content/public/browser/browser_thread.h" | 16 #include "content/public/browser/browser_thread.h" |
16 #include "content/public/browser/web_contents.h" | 17 #include "content/public/browser/web_contents.h" |
17 #include "ui/base/gtk/focus_store_gtk.h" | 18 #include "ui/base/gtk/focus_store_gtk.h" |
18 #include "ui/base/gtk/gtk_compat.h" | 19 #include "ui/base/gtk/gtk_compat.h" |
19 #include "ui/base/gtk/gtk_hig_constants.h" | 20 #include "ui/base/gtk/gtk_hig_constants.h" |
20 | 21 |
21 #include "chrome/browser/tab_contents/chrome_web_contents_view_delegate_gtk.h" | 22 #include "chrome/browser/tab_contents/chrome_web_contents_view_delegate_gtk.h" |
22 | 23 |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 } | 144 } |
144 | 145 |
145 void ConstrainedWindowGtk::OnHierarchyChanged(GtkWidget* sender, | 146 void ConstrainedWindowGtk::OnHierarchyChanged(GtkWidget* sender, |
146 GtkWidget* previous_toplevel) { | 147 GtkWidget* previous_toplevel) { |
147 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 148 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
148 if (!gtk_widget_is_toplevel(gtk_widget_get_toplevel(widget()))) | 149 if (!gtk_widget_is_toplevel(gtk_widget_get_toplevel(widget()))) |
149 return; | 150 return; |
150 | 151 |
151 FocusConstrainedWindow(); | 152 FocusConstrainedWindow(); |
152 } | 153 } |
OLD | NEW |