OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/fast_unload_controller.h" | 5 #include "chrome/browser/ui/fast_unload_controller.h" |
6 | 6 |
7 #include "base/location.h" | 7 #include "base/location.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "base/single_thread_task_runner.h" | 10 #include "base/single_thread_task_runner.h" |
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
281 DCHECK_EQ(content::NOTIFICATION_WEB_CONTENTS_DISCONNECTED, type); | 281 DCHECK_EQ(content::NOTIFICATION_WEB_CONTENTS_DISCONNECTED, type); |
282 | 282 |
283 registrar_.Remove(this, content::NOTIFICATION_WEB_CONTENTS_DISCONNECTED, | 283 registrar_.Remove(this, content::NOTIFICATION_WEB_CONTENTS_DISCONNECTED, |
284 source); | 284 source); |
285 ClearUnloadState(content::Source<content::WebContents>(source).ptr()); | 285 ClearUnloadState(content::Source<content::WebContents>(source).ptr()); |
286 } | 286 } |
287 | 287 |
288 //////////////////////////////////////////////////////////////////////////////// | 288 //////////////////////////////////////////////////////////////////////////////// |
289 // FastUnloadController, TabStripModelObserver implementation: | 289 // FastUnloadController, TabStripModelObserver implementation: |
290 | 290 |
291 void FastUnloadController::TabInsertedAt(content::WebContents* contents, | 291 void FastUnloadController::TabInsertedAt(TabStripModel* tab_strip_model, |
| 292 content::WebContents* contents, |
292 int index, | 293 int index, |
293 bool foreground) { | 294 bool foreground) { |
294 TabAttachedImpl(contents); | 295 TabAttachedImpl(contents); |
295 } | 296 } |
296 | 297 |
297 void FastUnloadController::TabDetachedAt(content::WebContents* contents, | 298 void FastUnloadController::TabDetachedAt(content::WebContents* contents, |
298 int index) { | 299 int index) { |
299 TabDetachedImpl(contents); | 300 TabDetachedImpl(contents); |
300 } | 301 } |
301 | 302 |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
472 } | 473 } |
473 } | 474 } |
474 | 475 |
475 void FastUnloadController::PostTaskForProcessPendingTabs() { | 476 void FastUnloadController::PostTaskForProcessPendingTabs() { |
476 base::ThreadTaskRunnerHandle::Get()->PostTask( | 477 base::ThreadTaskRunnerHandle::Get()->PostTask( |
477 FROM_HERE, base::Bind(&FastUnloadController::ProcessPendingTabs, | 478 FROM_HERE, base::Bind(&FastUnloadController::ProcessPendingTabs, |
478 weak_factory_.GetWeakPtr())); | 479 weak_factory_.GetWeakPtr())); |
479 } | 480 } |
480 | 481 |
481 } // namespace chrome | 482 } // namespace chrome |
OLD | NEW |