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