| 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 #ifndef CHROME_BROWSER_UI_BROWSER_LIST_H_ | 5 #ifndef CHROME_BROWSER_UI_BROWSER_LIST_H_ |
| 6 #define CHROME_BROWSER_UI_BROWSER_LIST_H_ | 6 #define CHROME_BROWSER_UI_BROWSER_LIST_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 // the browser list (i.e. the browsers that were "activated" most recently). | 75 // the browser list (i.e. the browsers that were "activated" most recently). |
| 76 static void MoveBrowsersInWorkspaceToFront(const std::string& new_workspace); | 76 static void MoveBrowsersInWorkspaceToFront(const std::string& new_workspace); |
| 77 | 77 |
| 78 // Called by Browser objects when their window is activated (focused). This | 78 // Called by Browser objects when their window is activated (focused). This |
| 79 // allows us to determine what the last active Browser was on each desktop. | 79 // allows us to determine what the last active Browser was on each desktop. |
| 80 static void SetLastActive(Browser* browser); | 80 static void SetLastActive(Browser* browser); |
| 81 | 81 |
| 82 // Notifies the observers when the current active browser becomes not active. | 82 // Notifies the observers when the current active browser becomes not active. |
| 83 static void NotifyBrowserNoLongerActive(Browser* browser); | 83 static void NotifyBrowserNoLongerActive(Browser* browser); |
| 84 | 84 |
| 85 // Notifies the observers when browser close was started. This may be called |
| 86 // more than once for a particular browser. |
| 87 static void NotifyBrowserCloseStarted(Browser* browser); |
| 88 |
| 85 // Closes all browsers for |profile| across all desktops. | 89 // Closes all browsers for |profile| across all desktops. |
| 86 // TODO(mlerman): Move the Profile Deletion flow to use the overloaded | 90 // TODO(mlerman): Move the Profile Deletion flow to use the overloaded |
| 87 // version of this method with a callback, then remove this method. | 91 // version of this method with a callback, then remove this method. |
| 88 static void CloseAllBrowsersWithProfile(Profile* profile); | 92 static void CloseAllBrowsersWithProfile(Profile* profile); |
| 89 | 93 |
| 90 // Closes all browsers for |profile| across all desktops. Uses | 94 // Closes all browsers for |profile| across all desktops. Uses |
| 91 // TryToCloseBrowserList() to do the actual closing. Trigger any | 95 // TryToCloseBrowserList() to do the actual closing. Trigger any |
| 92 // OnBeforeUnload events if |if_force| is false. If all OnBeforeUnload events | 96 // OnBeforeUnload events if |if_force| is false. If all OnBeforeUnload events |
| 93 // are confirmed or |skip_beforeunload| is true, |on_close_success| is called, | 97 // are confirmed or |skip_beforeunload| is true, |on_close_success| is called, |
| 94 // otherwise |on_close_aborted| is called. | 98 // otherwise |on_close_aborted| is called. |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 // removal across all BrowserLists. | 157 // removal across all BrowserLists. |
| 154 static base::LazyInstance< | 158 static base::LazyInstance< |
| 155 base::ObserverList<chrome::BrowserListObserver>>::Leaky observers_; | 159 base::ObserverList<chrome::BrowserListObserver>>::Leaky observers_; |
| 156 | 160 |
| 157 static BrowserList* instance_; | 161 static BrowserList* instance_; |
| 158 | 162 |
| 159 DISALLOW_COPY_AND_ASSIGN(BrowserList); | 163 DISALLOW_COPY_AND_ASSIGN(BrowserList); |
| 160 }; | 164 }; |
| 161 | 165 |
| 162 #endif // CHROME_BROWSER_UI_BROWSER_LIST_H_ | 166 #endif // CHROME_BROWSER_UI_BROWSER_LIST_H_ |
| OLD | NEW |