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 1157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1168 infobar_container_->ChangeTabContents(NULL); | 1168 infobar_container_->ChangeTabContents(NULL); |
1169 UpdateDevToolsForContents(NULL); | 1169 UpdateDevToolsForContents(NULL); |
1170 } | 1170 } |
1171 contents_container_->DetachTab(contents); | 1171 contents_container_->DetachTab(contents); |
1172 } | 1172 } |
1173 | 1173 |
1174 void BrowserWindowGtk::ActiveTabChanged(TabContentsWrapper* old_contents, | 1174 void BrowserWindowGtk::ActiveTabChanged(TabContentsWrapper* old_contents, |
1175 TabContentsWrapper* new_contents, | 1175 TabContentsWrapper* new_contents, |
1176 int index, | 1176 int index, |
1177 bool user_gesture) { | 1177 bool user_gesture) { |
1178 if (old_contents == new_contents) | |
1179 return; | |
1180 | |
1181 if (old_contents && !old_contents->tab_contents()->is_being_destroyed()) | 1178 if (old_contents && !old_contents->tab_contents()->is_being_destroyed()) |
1182 old_contents->view()->StoreFocus(); | 1179 old_contents->view()->StoreFocus(); |
1183 | 1180 |
1184 // Update various elements that are interested in knowing the current | 1181 // Update various elements that are interested in knowing the current |
1185 // TabContents. | 1182 // TabContents. |
1186 infobar_container_->ChangeTabContents(new_contents); | 1183 infobar_container_->ChangeTabContents(new_contents); |
1187 contents_container_->SetTab(new_contents); | 1184 contents_container_->SetTab(new_contents); |
1188 UpdateDevToolsForContents(new_contents->tab_contents()); | 1185 UpdateDevToolsForContents(new_contents->tab_contents()); |
1189 | 1186 |
1190 new_contents->tab_contents()->DidBecomeSelected(); | 1187 new_contents->tab_contents()->DidBecomeSelected(); |
(...skipping 1185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2376 // are taken from the WMs' source code. | 2373 // are taken from the WMs' source code. |
2377 return (wm_name == "Blackbox" || | 2374 return (wm_name == "Blackbox" || |
2378 wm_name == "compiz" || | 2375 wm_name == "compiz" || |
2379 wm_name == "Compiz" || | 2376 wm_name == "Compiz" || |
2380 wm_name == "e16" || // Enlightenment DR16 | 2377 wm_name == "e16" || // Enlightenment DR16 |
2381 wm_name == "Metacity" || | 2378 wm_name == "Metacity" || |
2382 wm_name == "Mutter" || | 2379 wm_name == "Mutter" || |
2383 wm_name == "Openbox" || | 2380 wm_name == "Openbox" || |
2384 wm_name == "Xfwm4"); | 2381 wm_name == "Xfwm4"); |
2385 } | 2382 } |
OLD | NEW |