| 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 1153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1164 // We use index here rather than comparing |contents| because by this time | 1164 // We use index here rather than comparing |contents| because by this time |
| 1165 // the model has already removed |contents| from its list, so | 1165 // the model has already removed |contents| from its list, so |
| 1166 // browser_->GetSelectedTabContents() will return NULL or something else. | 1166 // browser_->GetSelectedTabContents() will return NULL or something else. |
| 1167 if (index == browser_->tabstrip_model()->active_index()) { | 1167 if (index == browser_->tabstrip_model()->active_index()) { |
| 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::TabSelectedAt(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) | 1178 if (old_contents == new_contents) |
| 1179 return; | 1179 return; |
| 1180 | 1180 |
| 1181 if (old_contents && !old_contents->tab_contents()->is_being_destroyed()) | 1181 if (old_contents && !old_contents->tab_contents()->is_being_destroyed()) |
| 1182 old_contents->view()->StoreFocus(); | 1182 old_contents->view()->StoreFocus(); |
| 1183 | 1183 |
| 1184 // Update various elements that are interested in knowing the current | 1184 // Update various elements that are interested in knowing the current |
| 1185 // TabContents. | 1185 // TabContents. |
| 1186 infobar_container_->ChangeTabContents(new_contents); | 1186 infobar_container_->ChangeTabContents(new_contents); |
| 1187 contents_container_->SetTab(new_contents); | 1187 contents_container_->SetTab(new_contents); |
| (...skipping 1183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2371 // are taken from the WMs' source code. | 2371 // are taken from the WMs' source code. |
| 2372 return (wm_name == "Blackbox" || | 2372 return (wm_name == "Blackbox" || |
| 2373 wm_name == "compiz" || | 2373 wm_name == "compiz" || |
| 2374 wm_name == "Compiz" || | 2374 wm_name == "Compiz" || |
| 2375 wm_name == "e16" || // Enlightenment DR16 | 2375 wm_name == "e16" || // Enlightenment DR16 |
| 2376 wm_name == "Metacity" || | 2376 wm_name == "Metacity" || |
| 2377 wm_name == "Mutter" || | 2377 wm_name == "Mutter" || |
| 2378 wm_name == "Openbox" || | 2378 wm_name == "Openbox" || |
| 2379 wm_name == "Xfwm4"); | 2379 wm_name == "Xfwm4"); |
| 2380 } | 2380 } |
| OLD | NEW |