Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(863)

Side by Side Diff: chrome/browser/ui/settings_window_manager.h

Issue 595213005: Eliminate chrome::IsTrustedWindowWithScheme (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Feedback Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
11 #include "base/memory/scoped_ptr.h"
11 #include "base/memory/singleton.h" 12 #include "base/memory/singleton.h"
12 #include "base/observer_list.h" 13 #include "base/observer_list.h"
13 #include "components/sessions/session_id.h" 14 #include "components/sessions/session_id.h"
14 15
15 class Browser; 16 class Browser;
16 class GURL; 17 class GURL;
17 class Profile; 18 class Profile;
18 19
19 namespace chrome { 20 namespace chrome {
20 21
21 class SettingsWindowManagerObserver; 22 class SettingsWindowManagerObserver;
23 struct NavigateParams;
22 24
23 // Class for managing settings windows when --enable-settings-window is enabled. 25 // Class for managing settings windows when --enable-settings-window is enabled.
24 // TODO(stevenjb): Remove flag comment if enabled by default. 26 // TODO(stevenjb): Remove flag comment if enabled by default.
25 27
26 class SettingsWindowManager { 28 class SettingsWindowManager {
27 public: 29 public:
28 static SettingsWindowManager* GetInstance(); 30 static SettingsWindowManager* GetInstance();
29 31
30 void AddObserver(SettingsWindowManagerObserver* observer); 32 void AddObserver(SettingsWindowManagerObserver* observer);
31 void RemoveObserver(SettingsWindowManagerObserver* observer); 33 void RemoveObserver(SettingsWindowManagerObserver* observer);
(...skipping 11 matching lines...) Expand all
43 45
44 private: 46 private:
45 friend struct DefaultSingletonTraits<SettingsWindowManager>; 47 friend struct DefaultSingletonTraits<SettingsWindowManager>;
46 typedef std::map<Profile*, SessionID::id_type> ProfileSessionMap; 48 typedef std::map<Profile*, SessionID::id_type> ProfileSessionMap;
47 49
48 SettingsWindowManager(); 50 SettingsWindowManager();
49 ~SettingsWindowManager(); 51 ~SettingsWindowManager();
50 52
51 ObserverList<SettingsWindowManagerObserver> observers_; 53 ObserverList<SettingsWindowManagerObserver> observers_;
52 ProfileSessionMap settings_session_map_; 54 ProfileSessionMap settings_session_map_;
55 // Persist the most recent Browser NavigateParams so that we can identify
56 // settings browsers during chrome::Navigate() calls.
57 scoped_ptr<NavigateParams> navigate_params_;
53 58
54 DISALLOW_COPY_AND_ASSIGN(SettingsWindowManager); 59 DISALLOW_COPY_AND_ASSIGN(SettingsWindowManager);
55 }; 60 };
56 61
57 } // namespace chrome 62 } // namespace chrome
58 63
59 #endif // CHROME_BROWSER_UI_SETTINGS_WINDOW_MANAGER_H_ 64 #endif // CHROME_BROWSER_UI_SETTINGS_WINDOW_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698