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

Side by Side Diff: chrome/browser/android/shortcut_helper.h

Issue 2206493002: Update WebAPK if homescreen icon changed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge branch 'webapk_updater_images0' into webapk_updater_images2 Created 4 years, 4 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_SHORTCUT_HELPER_H_ 5 #ifndef CHROME_BROWSER_ANDROID_SHORTCUT_HELPER_H_
6 #define CHROME_BROWSER_ANDROID_SHORTCUT_HELPER_H_ 6 #define CHROME_BROWSER_ANDROID_SHORTCUT_HELPER_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/callback_forward.h" 10 #include "base/callback_forward.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 static int GetMinimumHomescreenIconSizeInDp(); 66 static int GetMinimumHomescreenIconSizeInDp();
67 67
68 // Returns the ideal size for an image displayed on a web app's splash 68 // Returns the ideal size for an image displayed on a web app's splash
69 // screen. 69 // screen.
70 static int GetIdealSplashImageSizeInDp(); 70 static int GetIdealSplashImageSizeInDp();
71 71
72 // Returns the minimum size for an image displayed on a web app's splash 72 // Returns the minimum size for an image displayed on a web app's splash
73 // screen. 73 // screen.
74 static int GetMinimumSplashImageSizeInDp(); 74 static int GetMinimumSplashImageSizeInDp();
75 75
76 // Called when the homescreen image fetch initiated in FetchHomescreenImage()
77 // completes.
78 static void OnFetchedHomescreenImage(
79 const base::android::ScopedJavaGlobalRef<jobject> j_callback,
Xi Han 2016/08/10 15:49:19 java_callback?
pkotwicz 2016/08/10 19:03:47 Done.
80 const SkBitmap& image);
81
76 // Fetches the splash screen image and stores it inside the WebappDataStorage 82 // Fetches the splash screen image and stores it inside the WebappDataStorage
77 // of the webapp. The WebappDataStorage object *must* have been previously 83 // of the webapp. The WebappDataStorage object *must* have been previously
78 // created by |AddShortcutInBackgroundWithSkBitmap|; this method should be 84 // created by |AddShortcutInBackgroundWithSkBitmap|; this method should be
79 // passed as a closure to that method. 85 // passed as a closure to that method.
80 static void FetchSplashScreenImage(content::WebContents* web_contents, 86 static void FetchSplashScreenImage(content::WebContents* web_contents,
81 const GURL& image_url, 87 const GURL& image_url,
82 const int ideal_splash_image_size_in_dp, 88 const int ideal_splash_image_size_in_dp,
83 const int minimum_splash_image_size_in_dp, 89 const int minimum_splash_image_size_in_dp,
84 const std::string& webapp_id); 90 const std::string& webapp_id);
85 91
(...skipping 14 matching lines...) Expand all
100 static bool IsWebApkInstalled(const GURL& url); 106 static bool IsWebApkInstalled(const GURL& url);
101 107
102 private: 108 private:
103 ShortcutHelper() = delete; 109 ShortcutHelper() = delete;
104 ~ShortcutHelper() = delete; 110 ~ShortcutHelper() = delete;
105 111
106 DISALLOW_COPY_AND_ASSIGN(ShortcutHelper); 112 DISALLOW_COPY_AND_ASSIGN(ShortcutHelper);
107 }; 113 };
108 114
109 #endif // CHROME_BROWSER_ANDROID_SHORTCUT_HELPER_H_ 115 #endif // CHROME_BROWSER_ANDROID_SHORTCUT_HELPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698