| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_CHROMEOS_TAB_CLOSEABLE_STATE_WATCHER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_TAB_CLOSEABLE_STATE_WATCHER_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_TAB_CLOSEABLE_STATE_WATCHER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_TAB_CLOSEABLE_STATE_WATCHER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 NONE = 0, // Nothing to do. | 58 NONE = 0, // Nothing to do. |
| 59 OPEN_WINDOW = 1, // Opens a regular (i.e. non-incognito) normal browser. | 59 OPEN_WINDOW = 1, // Opens a regular (i.e. non-incognito) normal browser. |
| 60 OPEN_NTP = 2, // Opens a NewTabPage. | 60 OPEN_NTP = 2, // Opens a NewTabPage. |
| 61 }; | 61 }; |
| 62 | 62 |
| 63 // BrowserList::Observer implementation: | 63 // BrowserList::Observer implementation: |
| 64 virtual void OnBrowserAdded(const Browser* browser); | 64 virtual void OnBrowserAdded(const Browser* browser); |
| 65 virtual void OnBrowserRemoved(const Browser* browser); | 65 virtual void OnBrowserRemoved(const Browser* browser); |
| 66 | 66 |
| 67 // NotificationObserver implementation: | 67 // NotificationObserver implementation: |
| 68 virtual void Observe(NotificationType type, const NotificationSource& source, | 68 virtual void Observe(int type, const NotificationSource& source, |
| 69 const NotificationDetails& details); | 69 const NotificationDetails& details); |
| 70 | 70 |
| 71 // Called by private class TabStripWatcher for TabStripModelObserver | 71 // Called by private class TabStripWatcher for TabStripModelObserver |
| 72 // notifications. | 72 // notifications. |
| 73 // |closing_last_tab| is true if the tab strip is closing the last tab. | 73 // |closing_last_tab| is true if the tab strip is closing the last tab. |
| 74 virtual void OnTabStripChanged(const Browser* browser, bool closing_last_tab); | 74 virtual void OnTabStripChanged(const Browser* browser, bool closing_last_tab); |
| 75 | 75 |
| 76 // Utility functions. | 76 // Utility functions. |
| 77 | 77 |
| 78 // Checks the closeable state of tab. If it has changed, updates it and | 78 // Checks the closeable state of tab. If it has changed, updates it and |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 friend class TabStripWatcher; | 144 friend class TabStripWatcher; |
| 145 | 145 |
| 146 std::vector<TabStripWatcher*> tabstrip_watchers_; | 146 std::vector<TabStripWatcher*> tabstrip_watchers_; |
| 147 | 147 |
| 148 DISALLOW_COPY_AND_ASSIGN(TabCloseableStateWatcher); | 148 DISALLOW_COPY_AND_ASSIGN(TabCloseableStateWatcher); |
| 149 }; | 149 }; |
| 150 | 150 |
| 151 } // namespace chromeos | 151 } // namespace chromeos |
| 152 | 152 |
| 153 #endif // CHROME_BROWSER_CHROMEOS_TAB_CLOSEABLE_STATE_WATCHER_H_ | 153 #endif // CHROME_BROWSER_CHROMEOS_TAB_CLOSEABLE_STATE_WATCHER_H_ |
| OLD | NEW |