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

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

Issue 11359201: Remove TabContents from TabStripModelObserver::TabReplacedAt. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 1 month 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/unload_controller.h" 5 #include "chrome/browser/ui/unload_controller.h"
6 6
7 #include "base/message_loop.h" 7 #include "base/message_loop.h"
8 #include "chrome/browser/ui/browser.h" 8 #include "chrome/browser/ui/browser.h"
9 #include "chrome/browser/ui/browser_tabstrip.h" 9 #include "chrome/browser/ui/browser_tabstrip.h"
10 #include "chrome/browser/ui/tab_contents/tab_contents.h" 10 #include "chrome/browser/ui/tab_contents/tab_contents.h"
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 bool foreground) { 119 bool foreground) {
120 TabAttachedImpl(contents); 120 TabAttachedImpl(contents);
121 } 121 }
122 122
123 void UnloadController::TabDetachedAt(content::WebContents* contents, 123 void UnloadController::TabDetachedAt(content::WebContents* contents,
124 int index) { 124 int index) {
125 TabDetachedImpl(contents); 125 TabDetachedImpl(contents);
126 } 126 }
127 127
128 void UnloadController::TabReplacedAt(TabStripModel* tab_strip_model, 128 void UnloadController::TabReplacedAt(TabStripModel* tab_strip_model,
129 TabContents* old_contents, 129 content::WebContents* old_contents,
130 TabContents* new_contents, 130 content::WebContents* new_contents,
131 int index) { 131 int index) {
132 TabDetachedImpl(old_contents->web_contents()); 132 TabDetachedImpl(old_contents);
133 TabAttachedImpl(new_contents->web_contents()); 133 TabAttachedImpl(new_contents);
134 } 134 }
135 135
136 void UnloadController::TabStripEmpty() { 136 void UnloadController::TabStripEmpty() {
137 // Set is_attempting_to_close_browser_ here, so that extensions, etc, do not 137 // Set is_attempting_to_close_browser_ here, so that extensions, etc, do not
138 // attempt to add tabs to the browser before it closes. 138 // attempt to add tabs to the browser before it closes.
139 is_attempting_to_close_browser_ = true; 139 is_attempting_to_close_browser_ = true;
140 } 140 }
141 141
142 //////////////////////////////////////////////////////////////////////////////// 142 ////////////////////////////////////////////////////////////////////////////////
143 // UnloadController, private: 143 // UnloadController, private:
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 } else { 250 } else {
251 MessageLoop::current()->PostTask( 251 MessageLoop::current()->PostTask(
252 FROM_HERE, 252 FROM_HERE,
253 base::Bind(&UnloadController::ProcessPendingTabs, 253 base::Bind(&UnloadController::ProcessPendingTabs,
254 weak_factory_.GetWeakPtr())); 254 weak_factory_.GetWeakPtr()));
255 } 255 }
256 } 256 }
257 } 257 }
258 258
259 } // namespace chrome 259 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/ui/unload_controller.h ('k') | chrome/browser/ui/views/tabs/browser_tab_strip_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698