Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(328)

Side by Side Diff: chrome/browser/ui/webui/ntp/app_launcher_handler.cc

Issue 142993002: Remove unused members from WebApplicationInfo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 683 matching lines...) Expand 10 before | Expand all | Expand 10 after
694 694
695 Profile* profile = Profile::FromWebUI(web_ui()); 695 Profile* profile = Profile::FromWebUI(web_ui());
696 FaviconService* favicon_service = 696 FaviconService* favicon_service =
697 FaviconServiceFactory::GetForProfile(profile, Profile::EXPLICIT_ACCESS); 697 FaviconServiceFactory::GetForProfile(profile, Profile::EXPLICIT_ACCESS);
698 if (!favicon_service) { 698 if (!favicon_service) {
699 LOG(ERROR) << "No favicon service"; 699 LOG(ERROR) << "No favicon service";
700 return; 700 return;
701 } 701 }
702 702
703 scoped_ptr<AppInstallInfo> install_info(new AppInstallInfo()); 703 scoped_ptr<AppInstallInfo> install_info(new AppInstallInfo());
704 install_info->is_bookmark_app = true;
705 install_info->title = title; 704 install_info->title = title;
706 install_info->app_url = launch_url; 705 install_info->app_url = launch_url;
707 install_info->page_ordinal = page_ordinal; 706 install_info->page_ordinal = page_ordinal;
708 707
709 favicon_service->GetFaviconImageForURL( 708 favicon_service->GetFaviconImageForURL(
710 FaviconService::FaviconForURLParams(launch_url, 709 FaviconService::FaviconForURLParams(launch_url,
711 chrome::FAVICON, 710 chrome::FAVICON,
712 gfx::kFaviconSize), 711 gfx::kFaviconSize),
713 base::Bind(&AppLauncherHandler::OnFaviconForApp, 712 base::Bind(&AppLauncherHandler::OnFaviconForApp,
714 base::Unretained(this), 713 base::Unretained(this),
(...skipping 11 matching lines...) Expand all
726 } 725 }
727 726
728 void AppLauncherHandler::OnLearnMore(const base::ListValue* args) { 727 void AppLauncherHandler::OnLearnMore(const base::ListValue* args) {
729 RecordAppLauncherPromoHistogram(apps::APP_LAUNCHER_PROMO_LEARN_MORE); 728 RecordAppLauncherPromoHistogram(apps::APP_LAUNCHER_PROMO_LEARN_MORE);
730 } 729 }
731 730
732 void AppLauncherHandler::OnFaviconForApp( 731 void AppLauncherHandler::OnFaviconForApp(
733 scoped_ptr<AppInstallInfo> install_info, 732 scoped_ptr<AppInstallInfo> install_info,
734 const chrome::FaviconImageResult& image_result) { 733 const chrome::FaviconImageResult& image_result) {
735 scoped_ptr<WebApplicationInfo> web_app(new WebApplicationInfo()); 734 scoped_ptr<WebApplicationInfo> web_app(new WebApplicationInfo());
736 web_app->is_bookmark_app = install_info->is_bookmark_app;
737 web_app->title = install_info->title; 735 web_app->title = install_info->title;
738 web_app->app_url = install_info->app_url; 736 web_app->app_url = install_info->app_url;
739 737
740 if (!image_result.image.IsEmpty()) { 738 if (!image_result.image.IsEmpty()) {
741 WebApplicationInfo::IconInfo icon; 739 WebApplicationInfo::IconInfo icon;
742 icon.data = image_result.image.AsBitmap(); 740 icon.data = image_result.image.AsBitmap();
743 icon.width = icon.data.width(); 741 icon.width = icon.data.width();
744 icon.height = icon.data.height(); 742 icon.height = icon.data.height();
745 web_app->icons.push_back(icon); 743 web_app->icons.push_back(icon);
746 } 744 }
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
845 ExtensionUninstallDialog* AppLauncherHandler::GetExtensionUninstallDialog() { 843 ExtensionUninstallDialog* AppLauncherHandler::GetExtensionUninstallDialog() {
846 if (!extension_uninstall_dialog_.get()) { 844 if (!extension_uninstall_dialog_.get()) {
847 Browser* browser = chrome::FindBrowserWithWebContents( 845 Browser* browser = chrome::FindBrowserWithWebContents(
848 web_ui()->GetWebContents()); 846 web_ui()->GetWebContents());
849 extension_uninstall_dialog_.reset( 847 extension_uninstall_dialog_.reset(
850 ExtensionUninstallDialog::Create(extension_service_->profile(), 848 ExtensionUninstallDialog::Create(extension_service_->profile(),
851 browser, this)); 849 browser, this));
852 } 850 }
853 return extension_uninstall_dialog_.get(); 851 return extension_uninstall_dialog_.get();
854 } 852 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/ntp/app_launcher_handler.h ('k') | chrome/common/extensions/extension_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698