OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_WEBAPK_MANIFEST_UPGRADE_DETECTOR_FETCHER_H_ | 5 #ifndef CHROME_BROWSER_ANDROID_WEBAPK_MANIFEST_UPGRADE_DETECTOR_FETCHER_H_ |
6 #define CHROME_BROWSER_ANDROID_WEBAPK_MANIFEST_UPGRADE_DETECTOR_FETCHER_H_ | 6 #define CHROME_BROWSER_ANDROID_WEBAPK_MANIFEST_UPGRADE_DETECTOR_FETCHER_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/macros.h" | 10 #include "base/macros.h" |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 private: | 51 private: |
52 ~ManifestUpgradeDetectorFetcher() override; | 52 ~ManifestUpgradeDetectorFetcher() override; |
53 | 53 |
54 // content::WebContentsObserver: | 54 // content::WebContentsObserver: |
55 void DidFinishLoad(content::RenderFrameHost* render_frame_host, | 55 void DidFinishLoad(content::RenderFrameHost* render_frame_host, |
56 const GURL& validated_url) override; | 56 const GURL& validated_url) override; |
57 | 57 |
58 // Called once the installable data has been fetched. | 58 // Called once the installable data has been fetched. |
59 void OnDidGetInstallableData(const InstallableData& installable_data); | 59 void OnDidGetInstallableData(const InstallableData& installable_data); |
60 | 60 |
61 void OnDataAvailable(const ShortcutInfo& info, const SkBitmap& icon); | 61 void OnDataAvailable(bool is_installable, |
| 62 const ShortcutInfo& info, |
| 63 const SkBitmap& icon); |
62 | 64 |
63 // Points to the Java object. | 65 // Points to the Java object. |
64 base::android::ScopedJavaGlobalRef<jobject> java_ref_; | 66 base::android::ScopedJavaGlobalRef<jobject> java_ref_; |
65 | 67 |
66 // The detector will only fetch the URL within the scope of the WebAPK. | 68 // The detector will only fetch the URL within the scope of the WebAPK. |
67 const GURL scope_; | 69 const GURL scope_; |
68 | 70 |
69 // The WebAPK's Web Manifest URL that the detector is looking for. | 71 // The WebAPK's Web Manifest URL that the detector is looking for. |
70 const GURL web_manifest_url_; | 72 const GURL web_manifest_url_; |
71 | 73 |
72 base::WeakPtrFactory<ManifestUpgradeDetectorFetcher> weak_ptr_factory_; | 74 base::WeakPtrFactory<ManifestUpgradeDetectorFetcher> weak_ptr_factory_; |
73 | 75 |
74 DISALLOW_COPY_AND_ASSIGN(ManifestUpgradeDetectorFetcher); | 76 DISALLOW_COPY_AND_ASSIGN(ManifestUpgradeDetectorFetcher); |
75 }; | 77 }; |
76 | 78 |
77 #endif // CHROME_BROWSER_ANDROID_WEBAPK_MANIFEST_UPGRADE_DETECTOR_FETCHER_H_ | 79 #endif // CHROME_BROWSER_ANDROID_WEBAPK_MANIFEST_UPGRADE_DETECTOR_FETCHER_H_ |
OLD | NEW |