OLD | NEW |
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/location.h" | 7 #include "base/location.h" |
8 #include "base/single_thread_task_runner.h" | 8 #include "base/single_thread_task_runner.h" |
9 #include "base/threading/thread_task_runner_handle.h" | 9 #include "base/threading/thread_task_runner_handle.h" |
10 #include "chrome/browser/chrome_notification_types.h" | 10 #include "chrome/browser/chrome_notification_types.h" |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
218 | 218 |
219 if (is_attempting_to_close_browser_) { | 219 if (is_attempting_to_close_browser_) { |
220 ClearUnloadState(content::Source<content::WebContents>(source).ptr(), | 220 ClearUnloadState(content::Source<content::WebContents>(source).ptr(), |
221 false); // See comment for ClearUnloadState(). | 221 false); // See comment for ClearUnloadState(). |
222 } | 222 } |
223 } | 223 } |
224 | 224 |
225 //////////////////////////////////////////////////////////////////////////////// | 225 //////////////////////////////////////////////////////////////////////////////// |
226 // UnloadController, TabStripModelObserver implementation: | 226 // UnloadController, TabStripModelObserver implementation: |
227 | 227 |
228 void UnloadController::TabInsertedAt(content::WebContents* contents, | 228 void UnloadController::TabInsertedAt(TabStripModel* tab_strip_model, |
| 229 content::WebContents* contents, |
229 int index, | 230 int index, |
230 bool foreground) { | 231 bool foreground) { |
231 TabAttachedImpl(contents); | 232 TabAttachedImpl(contents); |
232 } | 233 } |
233 | 234 |
234 void UnloadController::TabDetachedAt(content::WebContents* contents, | 235 void UnloadController::TabDetachedAt(content::WebContents* contents, |
235 int index) { | 236 int index) { |
236 TabDetachedImpl(contents); | 237 TabDetachedImpl(contents); |
237 } | 238 } |
238 | 239 |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
360 ProcessPendingTabs(); | 361 ProcessPendingTabs(); |
361 } else { | 362 } else { |
362 base::ThreadTaskRunnerHandle::Get()->PostTask( | 363 base::ThreadTaskRunnerHandle::Get()->PostTask( |
363 FROM_HERE, base::Bind(&UnloadController::ProcessPendingTabs, | 364 FROM_HERE, base::Bind(&UnloadController::ProcessPendingTabs, |
364 weak_factory_.GetWeakPtr())); | 365 weak_factory_.GetWeakPtr())); |
365 } | 366 } |
366 } | 367 } |
367 } | 368 } |
368 | 369 |
369 } // namespace chrome | 370 } // namespace chrome |
OLD | NEW |