Add unit test for the Settings API Bubble.
[chromium-blink-merge.git] / chrome / browser / ui / settings_window_manager.h
blobfc96bcd25054e6d457780132dc84a54c0a2299f9
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.
5 #ifndef CHROME_BROWSER_UI_SETTINGS_WINDOW_MANAGER_H_
6 #define CHROME_BROWSER_UI_SETTINGS_WINDOW_MANAGER_H_
8 #include <map>
9 #include <string>
11 #include "base/memory/singleton.h"
12 #include "chrome/browser/sessions/session_id.h"
14 class Profile;
16 namespace chrome {
18 // Class for managing settings windows when --enable-settings-window is enabled.
19 // TODO(stevenjb): Remove flag comment if enabled by default.
21 class SettingsWindowManager {
22 public:
23 static SettingsWindowManager* GetInstance();
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);
29 private:
30 friend struct DefaultSingletonTraits<SettingsWindowManager>;
31 typedef std::map<Profile*, SessionID::id_type> ProfileSessionMap;
33 SettingsWindowManager();
34 ~SettingsWindowManager();
36 ProfileSessionMap settings_session_map_;
38 DISALLOW_COPY_AND_ASSIGN(SettingsWindowManager);
41 } // namespace chrome
43 #endif // CHROME_BROWSER_UI_SETTINGS_WINDOW_MANAGER_H_