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_
11 #include "base/memory/singleton.h"
12 #include "chrome/browser/sessions/session_id.h"
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
{
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
);
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
);
43 #endif // CHROME_BROWSER_UI_SETTINGS_WINDOW_MANAGER_H_