OLD | NEW |
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2014 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_SETTINGS_WINDOW_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_UI_SETTINGS_WINDOW_MANAGER_H_ |
6 #define CHROME_BROWSER_UI_SETTINGS_WINDOW_MANAGER_H_ | 6 #define CHROME_BROWSER_UI_SETTINGS_WINDOW_MANAGER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 20 matching lines...) Expand all Loading... |
31 void RemoveObserver(SettingsWindowManagerObserver* observer); | 31 void RemoveObserver(SettingsWindowManagerObserver* observer); |
32 | 32 |
33 // Shows a chrome:// page (e.g. Settings, About) in an an existing system | 33 // Shows a chrome:// page (e.g. Settings, About) in an an existing system |
34 // Browser window for |profile| or creates a new one. | 34 // Browser window for |profile| or creates a new one. |
35 void ShowChromePageForProfile(Profile* profile, const GURL& gurl); | 35 void ShowChromePageForProfile(Profile* profile, const GURL& gurl); |
36 | 36 |
37 // If a Browser settings window for |profile| has already been created, | 37 // If a Browser settings window for |profile| has already been created, |
38 // returns it, otherwise returns NULL. | 38 // returns it, otherwise returns NULL. |
39 Browser* FindBrowserForProfile(Profile* profile); | 39 Browser* FindBrowserForProfile(Profile* profile); |
40 | 40 |
| 41 // Returns true if |browser| is a settings window. |
| 42 bool IsSettingsBrowser(Browser* browser) const; |
| 43 |
41 private: | 44 private: |
42 friend struct DefaultSingletonTraits<SettingsWindowManager>; | 45 friend struct DefaultSingletonTraits<SettingsWindowManager>; |
43 typedef std::map<Profile*, SessionID::id_type> ProfileSessionMap; | 46 typedef std::map<Profile*, SessionID::id_type> ProfileSessionMap; |
44 | 47 |
45 SettingsWindowManager(); | 48 SettingsWindowManager(); |
46 ~SettingsWindowManager(); | 49 ~SettingsWindowManager(); |
47 | 50 |
48 ObserverList<SettingsWindowManagerObserver> observers_; | 51 ObserverList<SettingsWindowManagerObserver> observers_; |
49 ProfileSessionMap settings_session_map_; | 52 ProfileSessionMap settings_session_map_; |
50 | 53 |
51 DISALLOW_COPY_AND_ASSIGN(SettingsWindowManager); | 54 DISALLOW_COPY_AND_ASSIGN(SettingsWindowManager); |
52 }; | 55 }; |
53 | 56 |
54 } // namespace chrome | 57 } // namespace chrome |
55 | 58 |
56 #endif // CHROME_BROWSER_UI_SETTINGS_WINDOW_MANAGER_H_ | 59 #endif // CHROME_BROWSER_UI_SETTINGS_WINDOW_MANAGER_H_ |
OLD | NEW |