| 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 #ifndef CHROME_BROWSER_UI_FAST_UNLOAD_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_UI_FAST_UNLOAD_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_UI_FAST_UNLOAD_CONTROLLER_H_ | 6 #define CHROME_BROWSER_UI_FAST_UNLOAD_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| 11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 12 #include "base/memory/weak_ptr.h" | 12 #include "base/memory/weak_ptr.h" |
| 13 #include "base/strings/string_piece.h" | 13 #include "base/strings/string_piece.h" |
| 14 #include "chrome/browser/ui/tabs/tab_strip_model_observer.h" | 14 #include "chrome/browser/ui/tabs/tab_strip_model_observer.h" |
| 15 #include "content/public/browser/notification_observer.h" | 15 #include "content/public/browser/notification_observer.h" |
| 16 #include "content/public/browser/notification_registrar.h" | 16 #include "content/public/browser/notification_registrar.h" |
| 17 | 17 |
| 18 class Browser; | 18 class Browser; |
| 19 class TabStripModel; | 19 class TabStripModel; |
| 20 | 20 |
| 21 namespace content { | 21 namespace content { |
| 22 class NotificationSource; | 22 class NotificationSource; |
| 23 class NotificationDetails; | 23 class NotifictaionDetails; |
| 24 class WebContents; | 24 class WebContents; |
| 25 } | 25 } |
| 26 | 26 |
| 27 namespace chrome { | 27 namespace chrome { |
| 28 // FastUnloadController manages closing tabs and windows -- especially in | 28 // FastUnloadController manages closing tabs and windows -- especially in |
| 29 // regards to beforeunload handlers (have proceed/cancel dialogs) and | 29 // regards to beforeunload handlers (have proceed/cancel dialogs) and |
| 30 // unload handlers (have no user interaction). | 30 // unload handlers (have no user interaction). |
| 31 // | 31 // |
| 32 // Typical flow of closing a tab: | 32 // Typical flow of closing a tab: |
| 33 // 1. Browser calls CanCloseContents(). | 33 // 1. Browser calls CanCloseContents(). |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 scoped_ptr<DetachedWebContentsDelegate> detached_delegate_; | 197 scoped_ptr<DetachedWebContentsDelegate> detached_delegate_; |
| 198 | 198 |
| 199 base::WeakPtrFactory<FastUnloadController> weak_factory_; | 199 base::WeakPtrFactory<FastUnloadController> weak_factory_; |
| 200 | 200 |
| 201 DISALLOW_COPY_AND_ASSIGN(FastUnloadController); | 201 DISALLOW_COPY_AND_ASSIGN(FastUnloadController); |
| 202 }; | 202 }; |
| 203 | 203 |
| 204 } // namespace chrome | 204 } // namespace chrome |
| 205 | 205 |
| 206 #endif // CHROME_BROWSER_UI_FAST_UNLOAD_CONTROLLER_H_ | 206 #endif // CHROME_BROWSER_UI_FAST_UNLOAD_CONTROLLER_H_ |
| OLD | NEW |