| 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 <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
| (...skipping 761 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 772 highlight_app_id_.clear(); | 772 highlight_app_id_.clear(); |
| 773 } | 773 } |
| 774 | 774 |
| 775 void AppLauncherHandler::OnPreferenceChanged() { | 775 void AppLauncherHandler::OnPreferenceChanged() { |
| 776 DictionaryValue dictionary; | 776 DictionaryValue dictionary; |
| 777 FillAppDictionary(&dictionary); | 777 FillAppDictionary(&dictionary); |
| 778 web_ui()->CallJavascriptFunction("ntp.appsPrefChangeCallback", dictionary); | 778 web_ui()->CallJavascriptFunction("ntp.appsPrefChangeCallback", dictionary); |
| 779 } | 779 } |
| 780 | 780 |
| 781 // static | 781 // static |
| 782 void AppLauncherHandler::RegisterUserPrefs(PrefServiceBase* pref_service) { | 782 void AppLauncherHandler::RegisterUserPrefs(PrefServiceSyncable* pref_service) { |
| 783 pref_service->RegisterListPref(prefs::kNtpAppPageNames, | 783 pref_service->RegisterListPref(prefs::kNtpAppPageNames, |
| 784 PrefService::SYNCABLE_PREF); | 784 PrefServiceSyncable::SYNCABLE_PREF); |
| 785 } | 785 } |
| 786 | 786 |
| 787 void AppLauncherHandler::CleanupAfterUninstall() { | 787 void AppLauncherHandler::CleanupAfterUninstall() { |
| 788 extension_id_prompting_.clear(); | 788 extension_id_prompting_.clear(); |
| 789 } | 789 } |
| 790 | 790 |
| 791 // static | 791 // static |
| 792 void AppLauncherHandler::RecordAppLaunchType( | 792 void AppLauncherHandler::RecordAppLaunchType( |
| 793 extension_misc::AppLaunchBucket bucket) { | 793 extension_misc::AppLaunchBucket bucket) { |
| 794 UMA_HISTOGRAM_ENUMERATION(extension_misc::kAppLaunchHistogram, bucket, | 794 UMA_HISTOGRAM_ENUMERATION(extension_misc::kAppLaunchHistogram, bucket, |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 925 return extension_uninstall_dialog_.get(); | 925 return extension_uninstall_dialog_.get(); |
| 926 } | 926 } |
| 927 | 927 |
| 928 ExtensionInstallPrompt* AppLauncherHandler::GetExtensionInstallPrompt() { | 928 ExtensionInstallPrompt* AppLauncherHandler::GetExtensionInstallPrompt() { |
| 929 if (!extension_install_ui_.get()) { | 929 if (!extension_install_ui_.get()) { |
| 930 extension_install_ui_.reset( | 930 extension_install_ui_.reset( |
| 931 new ExtensionInstallPrompt(web_ui()->GetWebContents())); | 931 new ExtensionInstallPrompt(web_ui()->GetWebContents())); |
| 932 } | 932 } |
| 933 return extension_install_ui_.get(); | 933 return extension_install_ui_.get(); |
| 934 } | 934 } |
| OLD | NEW |