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

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

Issue 2676863002: Update WebApkInstaller to support badge icon in installation. (Closed)
Patch Set: Rebase Created 3 years, 8 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 45
46 // Shows alert to prompt user for name of home screen shortcut. 46 // Shows alert to prompt user for name of home screen shortcut.
47 void ShowDialog(); 47 void ShowDialog();
48 48
49 // Called only when the AddToHomescreenDataFetcher has retrieved all of the 49 // Called only when the AddToHomescreenDataFetcher has retrieved all of the
50 // data needed to add the shortcut. 50 // data needed to add the shortcut.
51 void AddShortcut(const ShortcutInfo& info, const SkBitmap& icon); 51 void AddShortcut(const ShortcutInfo& info, const SkBitmap& icon);
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,
56 const SkBitmap& primary_icon,
57 const SkBitmap& badge_icon);
56 58
57 void RecordAddToHomescreen(); 59 void RecordAddToHomescreen();
58 60
59 // AddToHomescreenDataFetcher::Observer: 61 // AddToHomescreenDataFetcher::Observer:
60 void OnDidDetermineWebApkCompatibility(bool is_webapk_compatible) override; 62 void OnDidDetermineWebApkCompatibility(bool is_webapk_compatible) override;
61 void OnUserTitleAvailable(const base::string16& user_title) override; 63 void OnUserTitleAvailable(const base::string16& user_title) override;
62 void OnDataAvailable(const ShortcutInfo& info, 64 void OnDataAvailable(const ShortcutInfo& info,
63 const SkBitmap& primary_icon, 65 const SkBitmap& primary_icon,
64 const SkBitmap& badge_icon) override; 66 const SkBitmap& badge_icon) override;
65 SkBitmap FinalizeLauncherIconInBackground(const SkBitmap& icon, 67 SkBitmap FinalizeLauncherIconInBackground(const SkBitmap& icon,
(...skipping 10 matching lines...) Expand all
76 // Whether the site is WebAPK-compatible. 78 // Whether the site is WebAPK-compatible.
77 bool is_webapk_compatible_; 79 bool is_webapk_compatible_;
78 80
79 // Fetches data required to add a shortcut. 81 // Fetches data required to add a shortcut.
80 scoped_refptr<AddToHomescreenDataFetcher> data_fetcher_; 82 scoped_refptr<AddToHomescreenDataFetcher> data_fetcher_;
81 83
82 DISALLOW_COPY_AND_ASSIGN(AddToHomescreenManager); 84 DISALLOW_COPY_AND_ASSIGN(AddToHomescreenManager);
83 }; 85 };
84 86
85 #endif // CHROME_BROWSER_ANDROID_WEBAPPS_ADD_TO_HOMESCREEN_MANAGER_H_ 87 #endif // CHROME_BROWSER_ANDROID_WEBAPPS_ADD_TO_HOMESCREEN_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698