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

Unified Diff: chrome/browser/banners/app_banner_debug_log.cc

Issue 1148163003: Allow only responsive websites to install as a web app on mobile. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Preventing unintended method hiding Created 5 years, 7 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
Index: chrome/browser/banners/app_banner_debug_log.cc
diff --git a/chrome/browser/banners/app_banner_debug_log.cc b/chrome/browser/banners/app_banner_debug_log.cc
index 36818b0b6ade365ccece596be18304a58e9c7375..5ba137654fff3f195ed0f97c77b69fd77dccd4d0 100644
--- a/chrome/browser/banners/app_banner_debug_log.cc
+++ b/chrome/browser/banners/app_banner_debug_log.cc
@@ -39,12 +39,24 @@ const char kNotServedFromSecureOrigin[] =
const char kIgnoredNotSupportedOnAndroid[] =
" application ignored: not supported on Android";
const char kIgnoredNoId[] = "play application ignored: no id provided";
+const char kAddMetaViewportTag[] =
+ "Please check that your site displays appropriately on mobile, and add the "
+ "meta viewport tag with content width=device-width or initial-scale=1";
+// The trailing spaces are intentional as another string is appended.
+const char kMetaViewportTagNotResponsive[] =
benwells 2015/05/27 05:58:55 Why are there two strings when they are appended t
dominickn (DO NOT USE) 2015/06/05 07:42:59 Done.
+ "meta viewport tag not detected, or it contains no indication that your "
+ "site scales for mobile devices. ";
void OutputDeveloperNotShownMessage(content::WebContents* web_contents,
const std::string& message) {
OutputDeveloperDebugMessage(web_contents, "not shown: " + message);
}
+void OutputDeveloperMetaViewportErrorMessage(content::WebContents* web_contents,
+ const std::string& message) {
+ OutputDeveloperNotShownMessage(web_contents, message + kAddMetaViewportTag);
+}
+
void OutputDeveloperDebugMessage(content::WebContents* web_contents,
const std::string& message) {
std::string log_message = "App banner " + message;

Powered by Google App Engine
This is Rietveld 408576698