| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_ANDROID_H_ | 5 #ifndef CHROME_BROWSER_ANDROID_BANNERS_APP_BANNER_MANAGER_ANDROID_H_ |
| 6 #define CHROME_BROWSER_ANDROID_BANNERS_APP_BANNER_MANAGER_ANDROID_H_ | 6 #define CHROME_BROWSER_ANDROID_BANNERS_APP_BANNER_MANAGER_ANDROID_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/android/scoped_java_ref.h" | 10 #include "base/android/scoped_java_ref.h" |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 | 66 |
| 67 protected: | 67 protected: |
| 68 // AppBannerManager overrides. | 68 // AppBannerManager overrides. |
| 69 std::string GetAppIdentifier() override; | 69 std::string GetAppIdentifier() override; |
| 70 std::string GetBannerType() override; | 70 std::string GetBannerType() override; |
| 71 int GetIdealIconSizeInPx() override; | 71 int GetIdealIconSizeInPx() override; |
| 72 int GetMinimumIconSizeInPx() override; | 72 int GetMinimumIconSizeInPx() override; |
| 73 bool IsWebAppInstalled(content::BrowserContext* browser_context, | 73 bool IsWebAppInstalled(content::BrowserContext* browser_context, |
| 74 const GURL& start_url, | 74 const GURL& start_url, |
| 75 const GURL& manifest_url) override; | 75 const GURL& manifest_url) override; |
| 76 | |
| 77 void PerformInstallableCheck() override; | 76 void PerformInstallableCheck() override; |
| 78 void OnAppIconFetched(const SkBitmap& bitmap) override; | 77 void OnAppIconFetched(const SkBitmap& bitmap) override; |
| 78 void ResetCurrentPageData() override; |
| 79 void ShowBanner() override; | 79 void ShowBanner() override; |
| 80 | 80 |
| 81 private: | 81 private: |
| 82 friend class content::WebContentsUserData<AppBannerManagerAndroid>; | 82 friend class content::WebContentsUserData<AppBannerManagerAndroid>; |
| 83 | 83 |
| 84 // Creates the Java-side AppBannerManager. | 84 // Creates the Java-side AppBannerManager. |
| 85 void CreateJavaBannerManager(); | 85 void CreateJavaBannerManager(); |
| 86 | 86 |
| 87 // Returns true if |platform| and |id| are valid for querying the Play Store. | 87 // Returns true if |platform| and |id| are valid for querying the Play Store. |
| 88 bool CheckPlatformAndId(const std::string& platform, | 88 bool CheckPlatformAndId(const std::string& platform, |
| (...skipping 20 matching lines...) Expand all Loading... |
| 109 | 109 |
| 110 // App package name for a native app banner. | 110 // App package name for a native app banner. |
| 111 std::string native_app_package_; | 111 std::string native_app_package_; |
| 112 | 112 |
| 113 DISALLOW_COPY_AND_ASSIGN(AppBannerManagerAndroid); | 113 DISALLOW_COPY_AND_ASSIGN(AppBannerManagerAndroid); |
| 114 }; | 114 }; |
| 115 | 115 |
| 116 } // namespace banners | 116 } // namespace banners |
| 117 | 117 |
| 118 #endif // CHROME_BROWSER_ANDROID_BANNERS_APP_BANNER_MANAGER_ANDROID_H_ | 118 #endif // CHROME_BROWSER_ANDROID_BANNERS_APP_BANNER_MANAGER_ANDROID_H_ |
| OLD | NEW |