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

Unified Diff: chrome/browser/ui/webui/ntp/app_launcher_handler.cc

Issue 7452008: Improve layout for bookmark-apps. Add a treatment for small icons. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Submit-ready Created 9 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/webui/extension_icon_source.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/ntp/app_launcher_handler.cc
diff --git a/chrome/browser/ui/webui/ntp/app_launcher_handler.cc b/chrome/browser/ui/webui/ntp/app_launcher_handler.cc
index 1af426d25238c49189d529dee3cb830ce6b28fb9..1c38ce3991d84c7012aa2dcfa386aecef9bdfddd 100644
--- a/chrome/browser/ui/webui/ntp/app_launcher_handler.cc
+++ b/chrome/browser/ui/webui/ntp/app_launcher_handler.cc
@@ -101,16 +101,18 @@ void AppLauncherHandler::CreateAppInfo(const Extension* extension,
ExtensionService* service,
DictionaryValue* value) {
bool enabled = service->IsExtensionEnabled(extension->id());
+ bool icon_big_exists = true;
GURL icon_big =
ExtensionIconSource::GetIconURL(extension,
Extension::EXTENSION_ICON_LARGE,
ExtensionIconSet::MATCH_EXACTLY,
- !enabled);
+ !enabled, &icon_big_exists);
+ bool icon_small_exists = true;
GURL icon_small =
ExtensionIconSource::GetIconURL(extension,
Extension::EXTENSION_ICON_BITTY,
ExtensionIconSet::MATCH_BIGGER,
- !enabled);
+ !enabled, &icon_small_exists);
value->Clear();
value->SetString("id", extension->id());
@@ -122,7 +124,9 @@ void AppLauncherHandler::CreateAppInfo(const Extension* extension,
value->SetBoolean("can_uninstall",
Extension::UserMayDisable(extension->location()));
value->SetString("icon_big", icon_big.spec());
+ value->SetBoolean("icon_big_exists", icon_big_exists);
value->SetString("icon_small", icon_small.spec());
+ value->SetBoolean("icon_small_exists", icon_small_exists);
value->SetInteger("launch_container", extension->launch_container());
ExtensionPrefs* prefs = service->extension_prefs();
value->SetInteger("launch_type",
@@ -684,7 +688,6 @@ void AppLauncherHandler::HandleGenerateAppForLink(const ListValue* args) {
return;
}
- // TODO(gbillock): get page thumb from thumbnail db/history svc?
FaviconService::Handle h = favicon_service->GetFaviconForURL(
launch_url, history::FAVICON, &favicon_consumer_,
NewCallback(this, &AppLauncherHandler::OnFaviconForApp));
« no previous file with comments | « chrome/browser/ui/webui/extension_icon_source.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698