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/ntp/app_launcher_handler.h" | 5 #include "chrome/browser/ui/webui/ntp/app_launcher_handler.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "apps/metrics_names.h" | 9 #include "apps/metrics_names.h" |
10 #include "apps/pref_names.h" | 10 #include "apps/pref_names.h" |
(...skipping 735 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
746 } | 746 } |
747 | 747 |
748 void AppLauncherHandler::OnLocalStatePreferenceChanged() { | 748 void AppLauncherHandler::OnLocalStatePreferenceChanged() { |
749 web_ui()->CallJavascriptFunction( | 749 web_ui()->CallJavascriptFunction( |
750 "ntp.appLauncherPromoPrefChangeCallback", | 750 "ntp.appLauncherPromoPrefChangeCallback", |
751 base::FundamentalValue(g_browser_process->local_state()->GetBoolean( | 751 base::FundamentalValue(g_browser_process->local_state()->GetBoolean( |
752 apps::prefs::kShowAppLauncherPromo))); | 752 apps::prefs::kShowAppLauncherPromo))); |
753 } | 753 } |
754 | 754 |
755 // static | 755 // static |
756 void AppLauncherHandler::RegisterUserPrefs( | 756 void AppLauncherHandler::RegisterProfilePrefs( |
757 user_prefs::PrefRegistrySyncable* registry) { | 757 user_prefs::PrefRegistrySyncable* registry) { |
758 registry->RegisterListPref(prefs::kNtpAppPageNames, | 758 registry->RegisterListPref(prefs::kNtpAppPageNames, |
759 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); | 759 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); |
760 } | 760 } |
761 | 761 |
762 void AppLauncherHandler::CleanupAfterUninstall() { | 762 void AppLauncherHandler::CleanupAfterUninstall() { |
763 extension_id_prompting_.clear(); | 763 extension_id_prompting_.clear(); |
764 } | 764 } |
765 | 765 |
766 // static | 766 // static |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
892 ExtensionUninstallDialog* AppLauncherHandler::GetExtensionUninstallDialog() { | 892 ExtensionUninstallDialog* AppLauncherHandler::GetExtensionUninstallDialog() { |
893 if (!extension_uninstall_dialog_.get()) { | 893 if (!extension_uninstall_dialog_.get()) { |
894 Browser* browser = chrome::FindBrowserWithWebContents( | 894 Browser* browser = chrome::FindBrowserWithWebContents( |
895 web_ui()->GetWebContents()); | 895 web_ui()->GetWebContents()); |
896 extension_uninstall_dialog_.reset( | 896 extension_uninstall_dialog_.reset( |
897 ExtensionUninstallDialog::Create(extension_service_->profile(), | 897 ExtensionUninstallDialog::Create(extension_service_->profile(), |
898 browser, this)); | 898 browser, this)); |
899 } | 899 } |
900 return extension_uninstall_dialog_.get(); | 900 return extension_uninstall_dialog_.get(); |
901 } | 901 } |
OLD | NEW |