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

Side by Side Diff: trunk/src/chrome/browser/ui/tabs/tab_strip_model.cc

Issue 192913002: Revert 253735 "Always broadcast one last "tab not blocked" notif..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 9 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/tabs/tab_strip_model.h" 5 #include "chrome/browser/ui/tabs/tab_strip_model.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
(...skipping 1232 matching lines...) Expand 10 before | Expand all | Expand 10 after
1243 InternalCloseTab(closing_contents, index, 1243 InternalCloseTab(closing_contents, index,
1244 (close_types & CLOSE_CREATE_HISTORICAL_TAB) != 0); 1244 (close_types & CLOSE_CREATE_HISTORICAL_TAB) != 0);
1245 } 1245 }
1246 1246
1247 return retval; 1247 return retval;
1248 } 1248 }
1249 1249
1250 void TabStripModel::InternalCloseTab(WebContents* contents, 1250 void TabStripModel::InternalCloseTab(WebContents* contents,
1251 int index, 1251 int index,
1252 bool create_historical_tabs) { 1252 bool create_historical_tabs) {
1253 // Reset the blocked state of the tab, and fire a notification if necessary.
1254 // <http://crbug.com/336386#c4> . TODO(avi): Remove all the "blocked" code and
1255 // the WebContentsModalDialogManager from TabStripModel, and move all that
1256 // tracking code to the modal dialog code, where it belongs.
1257 SetTabBlocked(index, false);
1258
1259 FOR_EACH_OBSERVER(TabStripModelObserver, observers_, 1253 FOR_EACH_OBSERVER(TabStripModelObserver, observers_,
1260 TabClosingAt(this, contents, index)); 1254 TabClosingAt(this, contents, index));
1261 1255
1262 // Ask the delegate to save an entry for this tab in the historical tab 1256 // Ask the delegate to save an entry for this tab in the historical tab
1263 // database if applicable. 1257 // database if applicable.
1264 if (create_historical_tabs) 1258 if (create_historical_tabs)
1265 delegate_->CreateHistoricalTab(contents); 1259 delegate_->CreateHistoricalTab(contents);
1266 1260
1267 // Deleting the WebContents will call back to us via 1261 // Deleting the WebContents will call back to us via
1268 // WebContentsData::WebContentsDestroyed and detach it. 1262 // WebContentsData::WebContentsDestroyed and detach it.
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
1403 void TabStripModel::ForgetOpenersAndGroupsReferencing( 1397 void TabStripModel::ForgetOpenersAndGroupsReferencing(
1404 const WebContents* tab) { 1398 const WebContents* tab) {
1405 for (WebContentsDataVector::const_iterator i = contents_data_.begin(); 1399 for (WebContentsDataVector::const_iterator i = contents_data_.begin();
1406 i != contents_data_.end(); ++i) { 1400 i != contents_data_.end(); ++i) {
1407 if ((*i)->group() == tab) 1401 if ((*i)->group() == tab)
1408 (*i)->set_group(NULL); 1402 (*i)->set_group(NULL);
1409 if ((*i)->opener() == tab) 1403 if ((*i)->opener() == tab)
1410 (*i)->set_opener(NULL); 1404 (*i)->set_opener(NULL);
1411 } 1405 }
1412 } 1406 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698