Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1492)

Side by Side Diff: chrome/browser/ui/gtk/browser_window_gtk.cc

Issue 7043020: Multi-tab selection: Renaming TabStripModelObserver::TabSelectedAt to ActiveTabChanged (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebasing Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 1151 matching lines...) Expand 10 before | Expand all | Expand 10 after
1162 // We use index here rather than comparing |contents| because by this time 1162 // We use index here rather than comparing |contents| because by this time
1163 // the model has already removed |contents| from its list, so 1163 // the model has already removed |contents| from its list, so
1164 // browser_->GetSelectedTabContents() will return NULL or something else. 1164 // browser_->GetSelectedTabContents() will return NULL or something else.
1165 if (index == browser_->tabstrip_model()->active_index()) { 1165 if (index == browser_->tabstrip_model()->active_index()) {
1166 infobar_container_->ChangeTabContents(NULL); 1166 infobar_container_->ChangeTabContents(NULL);
1167 UpdateDevToolsForContents(NULL); 1167 UpdateDevToolsForContents(NULL);
1168 } 1168 }
1169 contents_container_->DetachTab(contents); 1169 contents_container_->DetachTab(contents);
1170 } 1170 }
1171 1171
1172 void BrowserWindowGtk::TabSelectedAt(TabContentsWrapper* old_contents, 1172 void BrowserWindowGtk::TabActivatedAt(TabContentsWrapper* old_contents,
1173 TabContentsWrapper* new_contents, 1173 TabContentsWrapper* new_contents,
1174 int index, 1174 int index,
1175 bool user_gesture) { 1175 bool user_gesture) {
1176 if (old_contents == new_contents) 1176 if (old_contents == new_contents)
1177 return; 1177 return;
1178 1178
1179 if (old_contents && !old_contents->tab_contents()->is_being_destroyed()) 1179 if (old_contents && !old_contents->tab_contents()->is_being_destroyed())
1180 old_contents->view()->StoreFocus(); 1180 old_contents->view()->StoreFocus();
1181 1181
1182 // Update various elements that are interested in knowing the current 1182 // Update various elements that are interested in knowing the current
1183 // TabContents. 1183 // TabContents.
1184 infobar_container_->ChangeTabContents(new_contents); 1184 infobar_container_->ChangeTabContents(new_contents);
1185 contents_container_->SetTab(new_contents); 1185 contents_container_->SetTab(new_contents);
(...skipping 1183 matching lines...) Expand 10 before | Expand all | Expand 10 after
2369 // are taken from the WMs' source code. 2369 // are taken from the WMs' source code.
2370 return (wm_name == "Blackbox" || 2370 return (wm_name == "Blackbox" ||
2371 wm_name == "compiz" || 2371 wm_name == "compiz" ||
2372 wm_name == "Compiz" || 2372 wm_name == "Compiz" ||
2373 wm_name == "e16" || // Enlightenment DR16 2373 wm_name == "e16" || // Enlightenment DR16
2374 wm_name == "Metacity" || 2374 wm_name == "Metacity" ||
2375 wm_name == "Mutter" || 2375 wm_name == "Mutter" ||
2376 wm_name == "Openbox" || 2376 wm_name == "Openbox" ||
2377 wm_name == "Xfwm4"); 2377 wm_name == "Xfwm4");
2378 } 2378 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698