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

Side by Side Diff: chrome/browser/android/banners/app_banner_manager.h

Issue 886643003: Use heuristic to work out when to prompt for app install banners. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review feedback Created 5 years, 10 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/android/banners/app_banner_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_ANDROID_BANNERS_APP_BANNER_MANAGER_H_ 5 #ifndef CHROME_BROWSER_ANDROID_BANNERS_APP_BANNER_MANAGER_H_
6 #define CHROME_BROWSER_ANDROID_BANNERS_APP_BANNER_MANAGER_H_ 6 #define CHROME_BROWSER_ANDROID_BANNERS_APP_BANNER_MANAGER_H_
7 7
8 #include "base/android/jni_android.h" 8 #include "base/android/jni_android.h"
9 #include "base/android/jni_weak_ref.h" 9 #include "base/android/jni_weak_ref.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 // process of showing a banner for the package designated by |tag_content| on 131 // process of showing a banner for the package designated by |tag_content| on
132 // the page at the |expected_url|. 132 // the page at the |expected_url|.
133 void OnDidRetrieveMetaTagContent(bool success, 133 void OnDidRetrieveMetaTagContent(bool success,
134 const std::string& tag_name, 134 const std::string& tag_name,
135 const std::string& tag_content, 135 const std::string& tag_content,
136 const GURL& expected_url); 136 const GURL& expected_url);
137 137
138 // Called when the result of the CheckHasServiceWorker query has completed. 138 // Called when the result of the CheckHasServiceWorker query has completed.
139 void OnDidCheckHasServiceWorker(bool has_service_worker); 139 void OnDidCheckHasServiceWorker(bool has_service_worker);
140 140
141 // Record that the banner could be shown at this point, if the triggering
142 // heuristic allowed.
143 void RecordCouldShowBanner(const std::string& package_or_start_url);
144
145 // Check if the banner should be shown.
146 bool CheckIfShouldShow(const std::string& package_or_start_url);
147
141 // Fetches the icon for an app. 148 // Fetches the icon for an app.
142 scoped_ptr<chrome::BitmapFetcher> fetcher_; 149 scoped_ptr<chrome::BitmapFetcher> fetcher_;
143 GURL validated_url_; 150 GURL validated_url_;
144 GURL app_icon_url_; 151 GURL app_icon_url_;
145 152
146 base::string16 app_title_; 153 base::string16 app_title_;
147 scoped_ptr<SkBitmap> app_icon_; 154 scoped_ptr<SkBitmap> app_icon_;
148 155
149 content::Manifest web_app_data_; 156 content::Manifest web_app_data_;
150 157
(...skipping 10 matching lines...) Expand all
161 168
162 DISALLOW_COPY_AND_ASSIGN(AppBannerManager); 169 DISALLOW_COPY_AND_ASSIGN(AppBannerManager);
163 }; // class AppBannerManager 170 }; // class AppBannerManager
164 171
165 // Register native methods 172 // Register native methods
166 bool RegisterAppBannerManager(JNIEnv* env); 173 bool RegisterAppBannerManager(JNIEnv* env);
167 174
168 } // namespace banners 175 } // namespace banners
169 176
170 #endif // CHROME_BROWSER_ANDROID_BANNERS_APP_BANNER_MANAGER_H_ 177 #endif // CHROME_BROWSER_ANDROID_BANNERS_APP_BANNER_MANAGER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/android/banners/app_banner_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698