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 "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
(...skipping 682 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
693 if (!favicon_service) { | 693 if (!favicon_service) { |
694 LOG(ERROR) << "No favicon service"; | 694 LOG(ERROR) << "No favicon service"; |
695 return; | 695 return; |
696 } | 696 } |
697 | 697 |
698 scoped_ptr<AppInstallInfo> install_info(new AppInstallInfo()); | 698 scoped_ptr<AppInstallInfo> install_info(new AppInstallInfo()); |
699 install_info->title = title; | 699 install_info->title = title; |
700 install_info->app_url = launch_url; | 700 install_info->app_url = launch_url; |
701 install_info->page_ordinal = page_ordinal; | 701 install_info->page_ordinal = page_ordinal; |
702 | 702 |
703 favicon_service->GetFaviconImageForURL( | 703 favicon_service->GetFaviconImageForPageURL( |
704 FaviconService::FaviconForURLParams( | 704 FaviconService::FaviconForPageURLParams( |
705 launch_url, favicon_base::FAVICON, gfx::kFaviconSize), | 705 launch_url, favicon_base::FAVICON, gfx::kFaviconSize), |
706 base::Bind(&AppLauncherHandler::OnFaviconForApp, | 706 base::Bind(&AppLauncherHandler::OnFaviconForApp, |
707 base::Unretained(this), | 707 base::Unretained(this), |
708 base::Passed(&install_info)), | 708 base::Passed(&install_info)), |
709 &cancelable_task_tracker_); | 709 &cancelable_task_tracker_); |
710 } | 710 } |
711 | 711 |
712 void AppLauncherHandler::StopShowingAppLauncherPromo( | 712 void AppLauncherHandler::StopShowingAppLauncherPromo( |
713 const base::ListValue* args) { | 713 const base::ListValue* args) { |
714 #if defined(ENABLE_APP_LIST) | 714 #if defined(ENABLE_APP_LIST) |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
838 AppLauncherHandler::GetExtensionUninstallDialog() { | 838 AppLauncherHandler::GetExtensionUninstallDialog() { |
839 if (!extension_uninstall_dialog_.get()) { | 839 if (!extension_uninstall_dialog_.get()) { |
840 Browser* browser = chrome::FindBrowserWithWebContents( | 840 Browser* browser = chrome::FindBrowserWithWebContents( |
841 web_ui()->GetWebContents()); | 841 web_ui()->GetWebContents()); |
842 extension_uninstall_dialog_.reset( | 842 extension_uninstall_dialog_.reset( |
843 extensions::ExtensionUninstallDialog::Create( | 843 extensions::ExtensionUninstallDialog::Create( |
844 extension_service_->profile(), browser, this)); | 844 extension_service_->profile(), browser, this)); |
845 } | 845 } |
846 return extension_uninstall_dialog_.get(); | 846 return extension_uninstall_dialog_.get(); |
847 } | 847 } |
OLD | NEW |