| 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 773 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 784 void AppLauncherHandler::SetAppToBeHighlighted() { | 784 void AppLauncherHandler::SetAppToBeHighlighted() { |
| 785 if (highlight_app_id_.empty()) | 785 if (highlight_app_id_.empty()) |
| 786 return; | 786 return; |
| 787 | 787 |
| 788 StringValue app_id(highlight_app_id_); | 788 StringValue app_id(highlight_app_id_); |
| 789 web_ui()->CallJavascriptFunction("ntp.setAppToBeHighlighted", app_id); | 789 web_ui()->CallJavascriptFunction("ntp.setAppToBeHighlighted", app_id); |
| 790 highlight_app_id_.clear(); | 790 highlight_app_id_.clear(); |
| 791 } | 791 } |
| 792 | 792 |
| 793 // static | 793 // static |
| 794 void AppLauncherHandler::RegisterUserPrefs(PrefService* pref_service) { | 794 void AppLauncherHandler::RegisterUserPrefs(PrefServiceBase* pref_service) { |
| 795 pref_service->RegisterListPref(prefs::kNtpAppPageNames, | 795 pref_service->RegisterListPref(prefs::kNtpAppPageNames, |
| 796 PrefService::SYNCABLE_PREF); | 796 PrefService::SYNCABLE_PREF); |
| 797 } | 797 } |
| 798 | 798 |
| 799 void AppLauncherHandler::CleanupAfterUninstall() { | 799 void AppLauncherHandler::CleanupAfterUninstall() { |
| 800 extension_id_prompting_.clear(); | 800 extension_id_prompting_.clear(); |
| 801 } | 801 } |
| 802 | 802 |
| 803 // static | 803 // static |
| 804 void AppLauncherHandler::RecordAppLaunchType( | 804 void AppLauncherHandler::RecordAppLaunchType( |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 939 | 939 |
| 940 ExtensionInstallPrompt* AppLauncherHandler::GetExtensionInstallPrompt() { | 940 ExtensionInstallPrompt* AppLauncherHandler::GetExtensionInstallPrompt() { |
| 941 if (!extension_install_ui_.get()) { | 941 if (!extension_install_ui_.get()) { |
| 942 Browser* browser = browser::FindBrowserWithWebContents( | 942 Browser* browser = browser::FindBrowserWithWebContents( |
| 943 web_ui()->GetWebContents()); | 943 web_ui()->GetWebContents()); |
| 944 extension_install_ui_.reset( | 944 extension_install_ui_.reset( |
| 945 chrome::CreateExtensionInstallPromptWithBrowser(browser)); | 945 chrome::CreateExtensionInstallPromptWithBrowser(browser)); |
| 946 } | 946 } |
| 947 return extension_install_ui_.get(); | 947 return extension_install_ui_.get(); |
| 948 } | 948 } |
| OLD | NEW |