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

Side by Side Diff: chrome/browser/android/webapps/add_to_homescreen_manager.h

Issue 2669133003: Update AddToHomescreenDataFetcher to accept badge icon for WebAPK. (Closed)
Patch Set: Addressing comments Created 3 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
OLDNEW
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_WEBAPPS_ADD_TO_HOMESCREEN_MANAGER_H_ 5 #ifndef CHROME_BROWSER_ANDROID_WEBAPPS_ADD_TO_HOMESCREEN_MANAGER_H_
6 #define CHROME_BROWSER_ANDROID_WEBAPPS_ADD_TO_HOMESCREEN_MANAGER_H_ 6 #define CHROME_BROWSER_ANDROID_WEBAPPS_ADD_TO_HOMESCREEN_MANAGER_H_
7 7
8 #include "base/android/jni_android.h" 8 #include "base/android/jni_android.h"
9 #include "base/android/scoped_java_ref.h" 9 #include "base/android/scoped_java_ref.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 52
53 // Called only when the AddToHomescreenDataFetcher has retrieved all of the 53 // Called only when the AddToHomescreenDataFetcher has retrieved all of the
54 // data needed to install a WebAPK. 54 // data needed to install a WebAPK.
55 void CreateInfoBarForWebApk(const ShortcutInfo& info, const SkBitmap& icon); 55 void CreateInfoBarForWebApk(const ShortcutInfo& info, const SkBitmap& icon);
56 56
57 void RecordAddToHomescreen(); 57 void RecordAddToHomescreen();
58 58
59 // AddToHomescreenDataFetcher::Observer: 59 // AddToHomescreenDataFetcher::Observer:
60 void OnDidDetermineWebApkCompatibility(bool is_webapk_compatible) override; 60 void OnDidDetermineWebApkCompatibility(bool is_webapk_compatible) override;
61 void OnUserTitleAvailable(const base::string16& user_title) override; 61 void OnUserTitleAvailable(const base::string16& user_title) override;
62 void OnDataAvailable(const ShortcutInfo& info, const SkBitmap& icon) override; 62 void OnDataAvailable(const ShortcutInfo& info,
63 const SkBitmap& primary_icon,
64 const SkBitmap& badge_icon) override;
63 SkBitmap FinalizeLauncherIconInBackground(const SkBitmap& icon, 65 SkBitmap FinalizeLauncherIconInBackground(const SkBitmap& icon,
64 const GURL& url, 66 const GURL& url,
65 bool* is_generated) override; 67 bool* is_generated) override;
66 68
67 // Points to the Java object. 69 // Points to the Java object.
68 base::android::ScopedJavaGlobalRef<jobject> java_ref_; 70 base::android::ScopedJavaGlobalRef<jobject> java_ref_;
69 71
70 // Whether the user has requested that a shortcut be added while a fetch was 72 // Whether the user has requested that a shortcut be added while a fetch was
71 // in progress. 73 // in progress.
72 bool add_shortcut_pending_; 74 bool add_shortcut_pending_;
73 75
74 // Whether the site is WebAPK-compatible. 76 // Whether the site is WebAPK-compatible.
75 bool is_webapk_compatible_; 77 bool is_webapk_compatible_;
76 78
77 // Fetches data required to add a shortcut. 79 // Fetches data required to add a shortcut.
78 scoped_refptr<AddToHomescreenDataFetcher> data_fetcher_; 80 scoped_refptr<AddToHomescreenDataFetcher> data_fetcher_;
79 81
80 DISALLOW_COPY_AND_ASSIGN(AddToHomescreenManager); 82 DISALLOW_COPY_AND_ASSIGN(AddToHomescreenManager);
81 }; 83 };
82 84
83 #endif // CHROME_BROWSER_ANDROID_WEBAPPS_ADD_TO_HOMESCREEN_MANAGER_H_ 85 #endif // CHROME_BROWSER_ANDROID_WEBAPPS_ADD_TO_HOMESCREEN_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698