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

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

Issue 7553020: Revert 94715 - Revert 94714 - Improve layout for bookmark-apps. Add treatment for small icons. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Merging to head Created 9 years, 4 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 43cd98b2fd5e34090e7af13a4edb74b7990e861c..f6c55fb95e4e4c65009306c8d4f0704642c50dd7 100644
--- a/chrome/browser/ui/webui/ntp/app_launcher_handler.cc
+++ b/chrome/browser/ui/webui/ntp/app_launcher_handler.cc
@@ -116,16 +116,18 @@ void AppLauncherHandler::CreateAppInfo(const Extension* extension,
DictionaryValue* value) {
bool enabled = service->IsExtensionEnabled(extension->id()) &&
!service->GetTerminatedExtension(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());
@@ -137,7 +139,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",
@@ -685,7 +689,7 @@ void AppLauncherHandler::HandleSaveAppPageName(const ListValue* args) {
}
void AppLauncherHandler::HandleGenerateAppForLink(const ListValue* args) {
- string16 url;
+ std::string url;
CHECK(args->GetString(0, &url));
string16 title;
@@ -713,7 +717,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