| 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/pref_names.h" | 9 #include "apps/pref_names.h" |
| 10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
| (...skipping 727 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 738 } | 738 } |
| 739 | 739 |
| 740 void AppLauncherHandler::OnLocalStatePreferenceChanged() { | 740 void AppLauncherHandler::OnLocalStatePreferenceChanged() { |
| 741 web_ui()->CallJavascriptFunction( | 741 web_ui()->CallJavascriptFunction( |
| 742 "ntp.appLauncherPromoPrefChangeCallback", | 742 "ntp.appLauncherPromoPrefChangeCallback", |
| 743 base::FundamentalValue(g_browser_process->local_state()->GetBoolean( | 743 base::FundamentalValue(g_browser_process->local_state()->GetBoolean( |
| 744 apps::prefs::kShowAppLauncherPromo))); | 744 apps::prefs::kShowAppLauncherPromo))); |
| 745 } | 745 } |
| 746 | 746 |
| 747 // static | 747 // static |
| 748 void AppLauncherHandler::RegisterUserPrefs(PrefRegistrySyncable* registry) { | 748 void AppLauncherHandler::RegisterUserPrefs( |
| 749 user_prefs::PrefRegistrySyncable* registry) { |
| 749 registry->RegisterListPref(prefs::kNtpAppPageNames, | 750 registry->RegisterListPref(prefs::kNtpAppPageNames, |
| 750 PrefRegistrySyncable::SYNCABLE_PREF); | 751 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); |
| 751 } | 752 } |
| 752 | 753 |
| 753 void AppLauncherHandler::CleanupAfterUninstall() { | 754 void AppLauncherHandler::CleanupAfterUninstall() { |
| 754 extension_id_prompting_.clear(); | 755 extension_id_prompting_.clear(); |
| 755 } | 756 } |
| 756 | 757 |
| 757 // static | 758 // static |
| 758 void AppLauncherHandler::RecordAppLaunchType( | 759 void AppLauncherHandler::RecordAppLaunchType( |
| 759 extension_misc::AppLaunchBucket bucket, | 760 extension_misc::AppLaunchBucket bucket, |
| 760 extensions::Manifest::Type app_type) { | 761 extensions::Manifest::Type app_type) { |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 865 ExtensionUninstallDialog* AppLauncherHandler::GetExtensionUninstallDialog() { | 866 ExtensionUninstallDialog* AppLauncherHandler::GetExtensionUninstallDialog() { |
| 866 if (!extension_uninstall_dialog_.get()) { | 867 if (!extension_uninstall_dialog_.get()) { |
| 867 Browser* browser = chrome::FindBrowserWithWebContents( | 868 Browser* browser = chrome::FindBrowserWithWebContents( |
| 868 web_ui()->GetWebContents()); | 869 web_ui()->GetWebContents()); |
| 869 extension_uninstall_dialog_.reset( | 870 extension_uninstall_dialog_.reset( |
| 870 ExtensionUninstallDialog::Create(extension_service_->profile(), | 871 ExtensionUninstallDialog::Create(extension_service_->profile(), |
| 871 browser, this)); | 872 browser, this)); |
| 872 } | 873 } |
| 873 return extension_uninstall_dialog_.get(); | 874 return extension_uninstall_dialog_.get(); |
| 874 } | 875 } |
| OLD | NEW |