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

Unified Diff: chrome/browser/android/banners/app_banner_data_fetcher_android.h

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: Merging with latest master Created 5 years, 6 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/android/banners/app_banner_data_fetcher_android.h
diff --git a/chrome/browser/android/banners/app_banner_data_fetcher_android.h b/chrome/browser/android/banners/app_banner_data_fetcher_android.h
index e059522e634851aaf6bd37b46f20af92c478e5cf..0f296dd896ca1d710d3aa9f467f61d880acb5725 100644
--- a/chrome/browser/android/banners/app_banner_data_fetcher_android.h
+++ b/chrome/browser/android/banners/app_banner_data_fetcher_android.h
@@ -26,6 +26,16 @@ class AppBannerDataFetcherAndroid : public AppBannerDataFetcher {
base::android::ScopedJavaLocalRef<jobject> app_data,
const GURL& image_url);
+ using AppBannerDataFetcher::OnMessageReceived;
benwells 2015/06/11 01:54:24 Why do you have this?
dominickn (DO NOT USE) 2015/06/11 03:32:12 The parent class OnMessageReceived() has a differe
+
+ // WebContentsObserver override.
+ bool OnMessageReceived(const IPC::Message& message) override;
benwells 2015/06/11 01:54:24 Do these overrides need to be public? Can they be
dominickn (DO NOT USE) 2015/06/11 03:32:12 HandleWebApp should be protected (it's protected i
benwells 2015/06/15 04:14:59 OnMessageReceived should also be protected or priv
+
+ // AppBannerDataFetcher override. Queries the site's meta viewport tag to
+ // detect whether it is responsive, and proceeds by calling the base class
+ // implementation.
+ void HandleWebApp(content::WebContents* web_contents) override;
+
protected:
~AppBannerDataFetcherAndroid() override;
@@ -35,6 +45,11 @@ class AppBannerDataFetcherAndroid : public AppBannerDataFetcher {
const base::string16& title) override;
private:
+ void OnDidRetrieveMetaTagContent(bool success,
+ const std::string& tag_name,
+ const std::string& tag_content,
+ const GURL& expected_url);
+
base::android::ScopedJavaGlobalRef<jobject> native_app_data_;
std::string native_app_package_;

Powered by Google App Engine
This is Rietveld 408576698