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" |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 bool HasCompletedUnloadProcessing() const; | 110 bool HasCompletedUnloadProcessing() const; |
111 | 111 |
112 // Clears all the state associated with processing tabs' beforeunload/unload | 112 // Clears all the state associated with processing tabs' beforeunload/unload |
113 // events since the user cancelled closing the window. | 113 // events since the user cancelled closing the window. |
114 void CancelWindowClose(); | 114 void CancelWindowClose(); |
115 | 115 |
116 private: | 116 private: |
117 // Overridden from content::NotificationObserver: | 117 // Overridden from content::NotificationObserver: |
118 virtual void Observe(int type, | 118 virtual void Observe(int type, |
119 const content::NotificationSource& source, | 119 const content::NotificationSource& source, |
120 const content::NotificationDetails& details) OVERRIDE; | 120 const content::NotificationDetails& details) override; |
121 | 121 |
122 // Overridden from TabStripModelObserver: | 122 // Overridden from TabStripModelObserver: |
123 virtual void TabInsertedAt(content::WebContents* contents, | 123 virtual void TabInsertedAt(content::WebContents* contents, |
124 int index, | 124 int index, |
125 bool foreground) OVERRIDE; | 125 bool foreground) override; |
126 virtual void TabDetachedAt(content::WebContents* contents, | 126 virtual void TabDetachedAt(content::WebContents* contents, |
127 int index) OVERRIDE; | 127 int index) override; |
128 virtual void TabReplacedAt(TabStripModel* tab_strip_model, | 128 virtual void TabReplacedAt(TabStripModel* tab_strip_model, |
129 content::WebContents* old_contents, | 129 content::WebContents* old_contents, |
130 content::WebContents* new_contents, | 130 content::WebContents* new_contents, |
131 int index) OVERRIDE; | 131 int index) override; |
132 virtual void TabStripEmpty() OVERRIDE; | 132 virtual void TabStripEmpty() override; |
133 | 133 |
134 void TabAttachedImpl(content::WebContents* contents); | 134 void TabAttachedImpl(content::WebContents* contents); |
135 void TabDetachedImpl(content::WebContents* contents); | 135 void TabDetachedImpl(content::WebContents* contents); |
136 | 136 |
137 // Detach |contents| and wait for it to finish closing. | 137 // Detach |contents| and wait for it to finish closing. |
138 // The close must be inititiated outside of this method. | 138 // The close must be inititiated outside of this method. |
139 // Returns true if it succeeds. | 139 // Returns true if it succeeds. |
140 bool DetachWebContents(content::WebContents* contents); | 140 bool DetachWebContents(content::WebContents* contents); |
141 | 141 |
142 // Processes the next tab that needs it's beforeunload/unload event fired. | 142 // Processes the next tab that needs it's beforeunload/unload event fired. |
(...skipping 54 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 |