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 1156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1167 infobar_container_->ChangeTabContents(NULL); | 1167 infobar_container_->ChangeTabContents(NULL); |
1168 UpdateDevToolsForContents(NULL); | 1168 UpdateDevToolsForContents(NULL); |
1169 } | 1169 } |
1170 contents_container_->DetachTab(contents); | 1170 contents_container_->DetachTab(contents); |
1171 } | 1171 } |
1172 | 1172 |
1173 void BrowserWindowGtk::ActiveTabChanged(TabContentsWrapper* old_contents, | 1173 void BrowserWindowGtk::ActiveTabChanged(TabContentsWrapper* old_contents, |
1174 TabContentsWrapper* new_contents, | 1174 TabContentsWrapper* new_contents, |
1175 int index, | 1175 int index, |
1176 bool user_gesture) { | 1176 bool user_gesture) { |
1177 if (old_contents == new_contents) | |
1178 return; | |
1179 | |
1180 if (old_contents && !old_contents->tab_contents()->is_being_destroyed()) | 1177 if (old_contents && !old_contents->tab_contents()->is_being_destroyed()) |
1181 old_contents->view()->StoreFocus(); | 1178 old_contents->view()->StoreFocus(); |
1182 | 1179 |
1183 // Update various elements that are interested in knowing the current | 1180 // Update various elements that are interested in knowing the current |
1184 // TabContents. | 1181 // TabContents. |
1185 infobar_container_->ChangeTabContents(new_contents); | 1182 infobar_container_->ChangeTabContents(new_contents); |
1186 contents_container_->SetTab(new_contents); | 1183 contents_container_->SetTab(new_contents); |
1187 UpdateDevToolsForContents(new_contents->tab_contents()); | 1184 UpdateDevToolsForContents(new_contents->tab_contents()); |
1188 | 1185 |
1189 new_contents->tab_contents()->DidBecomeSelected(); | 1186 new_contents->tab_contents()->DidBecomeSelected(); |
(...skipping 1164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2354 // are taken from the WMs' source code. | 2351 // are taken from the WMs' source code. |
2355 return (wm_name == "Blackbox" || | 2352 return (wm_name == "Blackbox" || |
2356 wm_name == "compiz" || | 2353 wm_name == "compiz" || |
2357 wm_name == "Compiz" || | 2354 wm_name == "Compiz" || |
2358 wm_name == "e16" || // Enlightenment DR16 | 2355 wm_name == "e16" || // Enlightenment DR16 |
2359 wm_name == "Metacity" || | 2356 wm_name == "Metacity" || |
2360 wm_name == "Mutter" || | 2357 wm_name == "Mutter" || |
2361 wm_name == "Openbox" || | 2358 wm_name == "Openbox" || |
2362 wm_name == "Xfwm4"); | 2359 wm_name == "Xfwm4"); |
2363 } | 2360 } |
OLD | NEW |