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

Unified Diff: chrome/browser/tabs/tab_strip_model.cc

Issue 7134035: Make an inserted selected tab selected before calling TabInsertedAt on observers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 9 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/test/data/extensions/api_test/tabs/basics/events.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/tabs/tab_strip_model.cc
diff --git a/chrome/browser/tabs/tab_strip_model.cc b/chrome/browser/tabs/tab_strip_model.cc
index de8df7ff8a0a1c3618d3afb7c5f844aec280eaec..4b6a900a0a6a57fe005c892f54417abb8214365a 100644
--- a/chrome/browser/tabs/tab_strip_model.cc
+++ b/chrome/browser/tabs/tab_strip_model.cc
@@ -155,12 +155,14 @@ void TabStripModel::InsertTabContentsAt(int index,
contents_data_.insert(contents_data_.begin() + index, data);
selection_model_.IncrementFrom(index);
+ if (active) {
sky 2011/06/09 17:13:01 I'm nervous of the effects of doing this on the Ta
Yoyo Zhou 2011/06/09 18:08:54 It gets discarded in ExtensionBrowserEventRouter::
+ selection_model_.SetSelectedIndex(index);
+ }
FOR_EACH_OBSERVER(TabStripModelObserver, observers_,
TabInsertedAt(contents, index, active));
if (active) {
- selection_model_.SetSelectedIndex(index);
NotifyTabSelectedIfChanged(selected_contents, index, false);
}
}
« no previous file with comments | « no previous file | chrome/test/data/extensions/api_test/tabs/basics/events.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698