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

Side by Side Diff: chrome/browser/ui/browser_tab_strip_model_delegate.cc

Issue 10831308: Revert 151036 - Speculative revert to see if this change introduced a performance regression on Mac… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 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) 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/browser_tab_strip_model_delegate.h" 5 #include "chrome/browser/ui/browser_tab_strip_model_delegate.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/sessions/tab_restore_service.h" 10 #include "chrome/browser/sessions/tab_restore_service.h"
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 124
125 // We don't create historical tabs for print preview tabs. 125 // We don't create historical tabs for print preview tabs.
126 if (contents->web_contents()->GetURL() == GURL(kChromeUIPrintURL)) 126 if (contents->web_contents()->GetURL() == GURL(kChromeUIPrintURL))
127 return; 127 return;
128 128
129 TabRestoreService* service = 129 TabRestoreService* service =
130 TabRestoreServiceFactory::GetForProfile(browser_->profile()); 130 TabRestoreServiceFactory::GetForProfile(browser_->profile());
131 131
132 // We only create historical tab entries for tabbed browser windows. 132 // We only create historical tab entries for tabbed browser windows.
133 if (service && browser_->CanSupportWindowFeature(Browser::FEATURE_TABSTRIP)) { 133 if (service && browser_->CanSupportWindowFeature(Browser::FEATURE_TABSTRIP)) {
134 service->CreateHistoricalTab( 134 service->CreateHistoricalTab(contents->web_contents(),
135 &contents->web_contents()->GetController(),
136 browser_->tab_strip_model()->GetIndexOfTabContents(contents)); 135 browser_->tab_strip_model()->GetIndexOfTabContents(contents));
137 } 136 }
138 } 137 }
139 138
140 bool BrowserTabStripModelDelegate::RunUnloadListenerBeforeClosing( 139 bool BrowserTabStripModelDelegate::RunUnloadListenerBeforeClosing(
141 TabContents* contents) { 140 TabContents* contents) {
142 return Browser::RunUnloadEventsHelper(contents->web_contents()); 141 return Browser::RunUnloadEventsHelper(contents->web_contents());
143 } 142 }
144 143
145 bool BrowserTabStripModelDelegate::CanBookmarkAllTabs() const { 144 bool BrowserTabStripModelDelegate::CanBookmarkAllTabs() const {
(...skipping 13 matching lines...) Expand all
159 } 158 }
160 159
161 //////////////////////////////////////////////////////////////////////////////// 160 ////////////////////////////////////////////////////////////////////////////////
162 // BrowserTabStripModelDelegate, private: 161 // BrowserTabStripModelDelegate, private:
163 162
164 void BrowserTabStripModelDelegate::CloseFrame() { 163 void BrowserTabStripModelDelegate::CloseFrame() {
165 browser_->window()->Close(); 164 browser_->window()->Close();
166 } 165 }
167 166
168 } // namespace chrome 167 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698