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

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

Issue 14307023: chrome: Use base::MessageLoop. (Part 2) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 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) 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/tabs/tab_strip_model.h" 10 #include "chrome/browser/ui/tabs/tab_strip_model.h"
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 } 240 }
241 241
242 void UnloadController::ClearUnloadState(content::WebContents* web_contents, 242 void UnloadController::ClearUnloadState(content::WebContents* web_contents,
243 bool process_now) { 243 bool process_now) {
244 if (is_attempting_to_close_browser_) { 244 if (is_attempting_to_close_browser_) {
245 RemoveFromSet(&tabs_needing_before_unload_fired_, web_contents); 245 RemoveFromSet(&tabs_needing_before_unload_fired_, web_contents);
246 RemoveFromSet(&tabs_needing_unload_fired_, web_contents); 246 RemoveFromSet(&tabs_needing_unload_fired_, web_contents);
247 if (process_now) { 247 if (process_now) {
248 ProcessPendingTabs(); 248 ProcessPendingTabs();
249 } else { 249 } else {
250 MessageLoop::current()->PostTask( 250 base::MessageLoop::current()->PostTask(
251 FROM_HERE, 251 FROM_HERE,
252 base::Bind(&UnloadController::ProcessPendingTabs, 252 base::Bind(&UnloadController::ProcessPendingTabs,
253 weak_factory_.GetWeakPtr())); 253 weak_factory_.GetWeakPtr()));
254 } 254 }
255 } 255 }
256 } 256 }
257 257
258 } // namespace chrome 258 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698