OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/browser_window_gtk.h" | 5 #include "chrome/browser/ui/gtk/browser_window_gtk.h" |
6 | 6 |
7 #include <gdk/gdkkeysyms.h> | 7 #include <gdk/gdkkeysyms.h> |
8 | 8 |
9 #include <dlfcn.h> | 9 #include <dlfcn.h> |
10 #include <string> | 10 #include <string> |
(...skipping 1158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1169 infobar_container_->ChangeTabContents(NULL); | 1169 infobar_container_->ChangeTabContents(NULL); |
1170 UpdateDevToolsForContents(NULL); | 1170 UpdateDevToolsForContents(NULL); |
1171 } | 1171 } |
1172 contents_container_->DetachTab(contents); | 1172 contents_container_->DetachTab(contents); |
1173 } | 1173 } |
1174 | 1174 |
1175 void BrowserWindowGtk::ActiveTabChanged(TabContentsWrapper* old_contents, | 1175 void BrowserWindowGtk::ActiveTabChanged(TabContentsWrapper* old_contents, |
1176 TabContentsWrapper* new_contents, | 1176 TabContentsWrapper* new_contents, |
1177 int index, | 1177 int index, |
1178 bool user_gesture) { | 1178 bool user_gesture) { |
1179 if (old_contents == new_contents) | |
1180 return; | |
1181 | |
1182 if (old_contents && !old_contents->tab_contents()->is_being_destroyed()) | 1179 if (old_contents && !old_contents->tab_contents()->is_being_destroyed()) |
1183 old_contents->view()->StoreFocus(); | 1180 old_contents->view()->StoreFocus(); |
1184 | 1181 |
1185 // Update various elements that are interested in knowing the current | 1182 // Update various elements that are interested in knowing the current |
1186 // TabContents. | 1183 // TabContents. |
1187 infobar_container_->ChangeTabContents(new_contents); | 1184 infobar_container_->ChangeTabContents(new_contents); |
1188 contents_container_->SetTab(new_contents); | 1185 contents_container_->SetTab(new_contents); |
1189 UpdateDevToolsForContents(new_contents->tab_contents()); | 1186 UpdateDevToolsForContents(new_contents->tab_contents()); |
1190 | 1187 |
1191 new_contents->tab_contents()->DidBecomeSelected(); | 1188 new_contents->tab_contents()->DidBecomeSelected(); |
(...skipping 1180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2372 // are taken from the WMs' source code. | 2369 // are taken from the WMs' source code. |
2373 return (wm_name == "Blackbox" || | 2370 return (wm_name == "Blackbox" || |
2374 wm_name == "compiz" || | 2371 wm_name == "compiz" || |
2375 wm_name == "Compiz" || | 2372 wm_name == "Compiz" || |
2376 wm_name == "e16" || // Enlightenment DR16 | 2373 wm_name == "e16" || // Enlightenment DR16 |
2377 wm_name == "Metacity" || | 2374 wm_name == "Metacity" || |
2378 wm_name == "Mutter" || | 2375 wm_name == "Mutter" || |
2379 wm_name == "Openbox" || | 2376 wm_name == "Openbox" || |
2380 wm_name == "Xfwm4"); | 2377 wm_name == "Xfwm4"); |
2381 } | 2378 } |
OLD | NEW |