| 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 <memory> | 
| 8 #include <set> | 9 #include <set> | 
| 9 | 10 | 
| 10 #include "base/callback.h" | 11 #include "base/callback.h" | 
| 11 #include "base/macros.h" | 12 #include "base/macros.h" | 
| 12 #include "base/memory/scoped_ptr.h" |  | 
| 13 #include "base/memory/weak_ptr.h" | 13 #include "base/memory/weak_ptr.h" | 
| 14 #include "base/strings/string_piece.h" | 14 #include "base/strings/string_piece.h" | 
| 15 #include "chrome/browser/ui/tabs/tab_strip_model_observer.h" | 15 #include "chrome/browser/ui/tabs/tab_strip_model_observer.h" | 
| 16 #include "content/public/browser/notification_observer.h" | 16 #include "content/public/browser/notification_observer.h" | 
| 17 #include "content/public/browser/notification_registrar.h" | 17 #include "content/public/browser/notification_registrar.h" | 
| 18 | 18 | 
| 19 class Browser; | 19 class Browser; | 
| 20 class TabStripModel; | 20 class TabStripModel; | 
| 21 | 21 | 
| 22 namespace content { | 22 namespace content { | 
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 187   // a Browser window isn't just immediately closed. | 187   // a Browser window isn't just immediately closed. | 
| 188   bool is_attempting_to_close_browser_; | 188   bool is_attempting_to_close_browser_; | 
| 189 | 189 | 
| 190   // A callback to call to report whether the user chose to close all tabs of | 190   // A callback to call to report whether the user chose to close all tabs of | 
| 191   // |browser_| that have beforeunload event handlers. This is set only if we | 191   // |browser_| that have beforeunload event handlers. This is set only if we | 
| 192   // are currently confirming that the browser is closable. | 192   // are currently confirming that the browser is closable. | 
| 193   base::Callback<void(bool)> on_close_confirmed_; | 193   base::Callback<void(bool)> on_close_confirmed_; | 
| 194 | 194 | 
| 195   // Manage tabs with beforeunload/unload handlers that close detached. | 195   // Manage tabs with beforeunload/unload handlers that close detached. | 
| 196   class DetachedWebContentsDelegate; | 196   class DetachedWebContentsDelegate; | 
| 197   scoped_ptr<DetachedWebContentsDelegate> detached_delegate_; | 197   std::unique_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 | 
|---|