| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/webui/uber/uber_ui.h" | 5 #include "chrome/browser/ui/webui/uber/uber_ui.h" |
| 6 | 6 |
| 7 #include "base/stl_util.h" | 7 #include "base/stl_util.h" |
| 8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
| 9 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
| 10 #include "chrome/browser/ui/webui/chrome_web_ui_controller_factory.h" | 10 #include "chrome/browser/ui/webui/chrome_web_ui_controller_factory.h" |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 | 89 |
| 90 // TODO(jhawkins): Attempt to get rid of IDS_SHORT_PRODUCT_OS_NAME. | 90 // TODO(jhawkins): Attempt to get rid of IDS_SHORT_PRODUCT_OS_NAME. |
| 91 #if defined(OS_CHROMEOS) | 91 #if defined(OS_CHROMEOS) |
| 92 source->AddLocalizedString("shortProductName", IDS_SHORT_PRODUCT_OS_NAME); | 92 source->AddLocalizedString("shortProductName", IDS_SHORT_PRODUCT_OS_NAME); |
| 93 #else | 93 #else |
| 94 source->AddLocalizedString("shortProductName", IDS_SHORT_PRODUCT_NAME); | 94 source->AddLocalizedString("shortProductName", IDS_SHORT_PRODUCT_NAME); |
| 95 #endif // defined(OS_CHROMEOS) | 95 #endif // defined(OS_CHROMEOS) |
| 96 | 96 |
| 97 source->AddBoolean("hideExtensions", ::switches::MdExtensionsEnabled()); | 97 source->AddBoolean("hideExtensions", ::switches::MdExtensionsEnabled()); |
| 98 source->AddBoolean("hideSettingsAndHelp", | 98 source->AddBoolean("hideSettingsAndHelp", |
| 99 ::switches::SettingsWindowEnabled()); | 99 ::switches::SettingsWindowEnabled() || |
| 100 base::FeatureList::IsEnabled( |
| 101 features::kMaterialDesignSettingsFeature)); |
| 100 source->AddString("extensionsHost", chrome::kChromeUIExtensionsHost); | 102 source->AddString("extensionsHost", chrome::kChromeUIExtensionsHost); |
| 101 source->AddLocalizedString("extensionsDisplayName", | 103 source->AddLocalizedString("extensionsDisplayName", |
| 102 IDS_MANAGE_EXTENSIONS_SETTING_WINDOWS_TITLE); | 104 IDS_MANAGE_EXTENSIONS_SETTING_WINDOWS_TITLE); |
| 103 source->AddString("helpHost", chrome::kChromeUIHelpHost); | 105 source->AddString("helpHost", chrome::kChromeUIHelpHost); |
| 104 source->AddLocalizedString("helpDisplayName", IDS_ABOUT_TITLE); | 106 source->AddLocalizedString("helpDisplayName", IDS_ABOUT_TITLE); |
| 105 source->AddString("historyHost", chrome::kChromeUIHistoryHost); | 107 source->AddString("historyHost", chrome::kChromeUIHistoryHost); |
| 106 source->AddLocalizedString("historyDisplayName", IDS_HISTORY_TITLE); | 108 source->AddLocalizedString("historyDisplayName", IDS_HISTORY_TITLE); |
| 107 source->AddString("settingsHost", chrome::kChromeUISettingsHost); | 109 source->AddString("settingsHost", chrome::kChromeUISettingsHost); |
| 108 source->AddLocalizedString("settingsDisplayName", IDS_SETTINGS_TITLE); | 110 source->AddLocalizedString("settingsDisplayName", IDS_SETTINGS_TITLE); |
| 109 bool overrides_history = | 111 bool overrides_history = |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 241 // opens the default history page if one is uninstalled or disabled. | 243 // opens the default history page if one is uninstalled or disabled. |
| 242 UpdateHistoryNavigation(web_ui()); | 244 UpdateHistoryNavigation(web_ui()); |
| 243 } | 245 } |
| 244 | 246 |
| 245 void UberFrameUI::OnExtensionUnloaded( | 247 void UberFrameUI::OnExtensionUnloaded( |
| 246 content::BrowserContext* browser_context, | 248 content::BrowserContext* browser_context, |
| 247 const extensions::Extension* extension, | 249 const extensions::Extension* extension, |
| 248 extensions::UnloadedExtensionInfo::Reason reason) { | 250 extensions::UnloadedExtensionInfo::Reason reason) { |
| 249 UpdateHistoryNavigation(web_ui()); | 251 UpdateHistoryNavigation(web_ui()); |
| 250 } | 252 } |
| OLD | NEW |