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

Unified Diff: chrome/renderer/web_apps.cc

Issue 568823003: Merge Android RetrieveWebappInformation and Extensions GetApplicationInfo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@manifest_manager_content
Patch Set: Created 6 years, 3 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/renderer/web_apps.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/web_apps.cc
diff --git a/chrome/renderer/web_apps.cc b/chrome/renderer/web_apps.cc
index 2c9801ed0798836fd14fba78101677b249841393..039ee635633f293a8adf9b6363bbb58dea0c19cd 100644
--- a/chrome/renderer/web_apps.cc
+++ b/chrome/renderer/web_apps.cc
@@ -118,16 +118,15 @@ bool ParseIconSizes(const base::string16& text,
return (*is_any || !sizes->empty());
}
-bool ParseWebAppFromWebDocument(WebFrame* frame,
- WebApplicationInfo* app_info,
- base::string16* error) {
+void ParseWebAppFromWebDocument(WebFrame* frame,
+ WebApplicationInfo* app_info) {
WebDocument document = frame->document();
if (document.isNull())
- return true;
+ return;
WebElement head = document.head();
if (head.isNull())
- return true;
+ return;
GURL document_url = document.url();
WebNodeList children = head.childNodes();
@@ -167,11 +166,17 @@ bool ParseWebAppFromWebDocument(WebFrame* frame,
document_url.Resolve(url) : GURL(url);
if (!app_info->app_url.is_valid())
app_info->app_url = GURL();
+ } else if (name == "mobile-web-app-capable" &&
+ LowerCaseEqualsASCII(content, "yes")) {
+ app_info->mobile_capable = WebApplicationInfo::MOBILE_CAPABLE;
+ } else if (name == "apple-mobile-web-app-capable" &&
+ LowerCaseEqualsASCII(content, "yes") &&
+ app_info->mobile_capable ==
+ WebApplicationInfo::MOBILE_CAPABLE_UNSPECIFIED) {
+ app_info->mobile_capable = WebApplicationInfo::MOBILE_CAPABLE_APPLE;
}
}
}
-
- return true;
}
} // namespace web_apps
« no previous file with comments | « chrome/renderer/web_apps.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698