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