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 #include "chrome/browser/ui/settings_window_manager.h" | 5 #include "chrome/browser/ui/settings_window_manager.h" |
6 | 6 |
| 7 #include "base/command_line.h" |
7 #include "chrome/browser/profiles/profile.h" | 8 #include "chrome/browser/profiles/profile.h" |
8 #include "chrome/browser/ui/browser_finder.h" | 9 #include "chrome/browser/ui/browser_finder.h" |
9 #include "chrome/browser/ui/browser_finder.h" | 10 #include "chrome/browser/ui/browser_finder.h" |
10 #include "chrome/browser/ui/browser_navigator.h" | 11 #include "chrome/browser/ui/browser_navigator.h" |
11 #include "chrome/browser/ui/browser_window.h" | 12 #include "chrome/browser/ui/browser_window.h" |
12 #include "chrome/browser/ui/chrome_pages.h" | 13 #include "chrome/browser/ui/chrome_pages.h" |
13 #include "chrome/browser/ui/settings_window_manager_observer.h" | 14 #include "chrome/browser/ui/settings_window_manager_observer.h" |
14 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 15 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| 16 #include "chrome/common/chrome_switches.h" |
15 #include "content/public/browser/user_metrics.h" | 17 #include "content/public/browser/user_metrics.h" |
16 #include "content/public/browser/web_contents.h" | 18 #include "content/public/browser/web_contents.h" |
17 #include "url/gurl.h" | 19 #include "url/gurl.h" |
18 | 20 |
19 namespace chrome { | 21 namespace chrome { |
20 | 22 |
| 23 bool SettingsWindowEnabled() { |
| 24 return CommandLine::ForCurrentProcess()->HasSwitch( |
| 25 ::switches::kEnableSettingsWindow); |
| 26 } |
| 27 |
21 // static | 28 // static |
22 SettingsWindowManager* SettingsWindowManager::GetInstance() { | 29 SettingsWindowManager* SettingsWindowManager::GetInstance() { |
23 return Singleton<SettingsWindowManager>::get(); | 30 return Singleton<SettingsWindowManager>::get(); |
24 } | 31 } |
25 | 32 |
26 void SettingsWindowManager::AddObserver( | 33 void SettingsWindowManager::AddObserver( |
27 SettingsWindowManagerObserver* observer) { | 34 SettingsWindowManagerObserver* observer) { |
28 observers_.AddObserver(observer); | 35 observers_.AddObserver(observer); |
29 } | 36 } |
30 | 37 |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 return NULL; | 81 return NULL; |
75 } | 82 } |
76 | 83 |
77 SettingsWindowManager::SettingsWindowManager() { | 84 SettingsWindowManager::SettingsWindowManager() { |
78 } | 85 } |
79 | 86 |
80 SettingsWindowManager::~SettingsWindowManager() { | 87 SettingsWindowManager::~SettingsWindowManager() { |
81 } | 88 } |
82 | 89 |
83 } // namespace chrome | 90 } // namespace chrome |
OLD | NEW |