OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_UI_SETTINGS_WINDOW_MANAGER_H_ |
| 6 #define CHROME_BROWSER_UI_SETTINGS_WINDOW_MANAGER_H_ |
| 7 |
| 8 #include <map> |
| 9 #include <string> |
| 10 |
| 11 #include "base/memory/singleton.h" |
| 12 #include "chrome/browser/sessions/session_id.h" |
| 13 |
| 14 class Profile; |
| 15 |
| 16 namespace chrome { |
| 17 |
| 18 // Class for managing settings windows when --enable-settings-window is enabled. |
| 19 // TODO(stevenjb): Remove flag comment if enabled by default. |
| 20 |
| 21 class SettingsWindowManager { |
| 22 public: |
| 23 static SettingsWindowManager* GetInstance(); |
| 24 |
| 25 // Show an existing settings window for |profile| or create a new one, and |
| 26 // navigate to |sub_page|. |
| 27 void ShowForProfile(Profile* profile, const std::string& sub_page); |
| 28 |
| 29 private: |
| 30 friend struct DefaultSingletonTraits<SettingsWindowManager>; |
| 31 typedef std::map<Profile*, SessionID::id_type> ProfileSessionMap; |
| 32 |
| 33 SettingsWindowManager(); |
| 34 ~SettingsWindowManager(); |
| 35 |
| 36 ProfileSessionMap settings_session_map_; |
| 37 |
| 38 DISALLOW_COPY_AND_ASSIGN(SettingsWindowManager); |
| 39 }; |
| 40 |
| 41 } // namespace chrome |
| 42 |
| 43 #endif // CHROME_BROWSER_UI_SETTINGS_WINDOW_MANAGER_H_ |
OLD | NEW |