Chromium Code Reviews| 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 62 // so notify and THEN delete the object. | 62 // so notify and THEN delete the object. |
| 63 static void AddBrowser(Browser* browser); | 63 static void AddBrowser(Browser* browser); |
| 64 static void RemoveBrowser(Browser* browser); | 64 static void RemoveBrowser(Browser* browser); |
| 65 | 65 |
| 66 // Adds and removes |observer| from the observer list for all desktops. | 66 // Adds and removes |observer| from the observer list for all desktops. |
| 67 // Observers are responsible for making sure the notifying browser is relevant | 67 // Observers are responsible for making sure the notifying browser is relevant |
| 68 // to them (e.g., on the specific desktop they care about if any). | 68 // to them (e.g., on the specific desktop they care about if any). |
| 69 static void AddObserver(chrome::BrowserListObserver* observer); | 69 static void AddObserver(chrome::BrowserListObserver* observer); |
| 70 static void RemoveObserver(chrome::BrowserListObserver* observer); | 70 static void RemoveObserver(chrome::BrowserListObserver* observer); |
| 71 | 71 |
| 72 // Called when the user switches to workspace X. Moves all the browsers that | |
|
sky
2016/07/07 03:23:27
'workspace X' -> 'workspace |new_workspace|' or 'n
Tom (Use chromium acct)
2016/07/07 19:12:10
Done.
| |
| 73 // show on workspace X to the end of the browser list (i.e. the browsers that | |
|
sky
2016/07/07 03:23:27
similar comment.
Tom (Use chromium acct)
2016/07/07 19:12:10
Done.
| |
| 74 // were "activated" most recently). | |
| 75 static void ReorderAfterWorkspaceChange(const std::string& new_workspace); | |
| 76 | |
| 72 // Called by Browser objects when their window is activated (focused). This | 77 // Called by Browser objects when their window is activated (focused). This |
| 73 // allows us to determine what the last active Browser was on each desktop. | 78 // allows us to determine what the last active Browser was on each desktop. |
| 74 static void SetLastActive(Browser* browser); | 79 static void SetLastActive(Browser* browser); |
| 75 | 80 |
| 76 // Closes all browsers for |profile| across all desktops. | 81 // Closes all browsers for |profile| across all desktops. |
| 77 // TODO(mlerman): Move the Profile Deletion flow to use the overloaded | 82 // TODO(mlerman): Move the Profile Deletion flow to use the overloaded |
| 78 // version of this method with a callback, then remove this method. | 83 // version of this method with a callback, then remove this method. |
| 79 static void CloseAllBrowsersWithProfile(Profile* profile); | 84 static void CloseAllBrowsersWithProfile(Profile* profile); |
| 80 | 85 |
| 81 // Closes all browsers for |profile| across all desktops. Uses | 86 // Closes all browsers for |profile| across all desktops. Uses |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 133 // removal across all BrowserLists. | 138 // removal across all BrowserLists. |
| 134 static base::LazyInstance< | 139 static base::LazyInstance< |
| 135 base::ObserverList<chrome::BrowserListObserver>>::Leaky observers_; | 140 base::ObserverList<chrome::BrowserListObserver>>::Leaky observers_; |
| 136 | 141 |
| 137 static BrowserList* instance_; | 142 static BrowserList* instance_; |
| 138 | 143 |
| 139 DISALLOW_COPY_AND_ASSIGN(BrowserList); | 144 DISALLOW_COPY_AND_ASSIGN(BrowserList); |
| 140 }; | 145 }; |
| 141 | 146 |
| 142 #endif // CHROME_BROWSER_UI_BROWSER_LIST_H_ | 147 #endif // CHROME_BROWSER_UI_BROWSER_LIST_H_ |
| OLD | NEW |