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

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: Disable http/tests/serviceworker/registration.html 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 static int GetMinimumHomescreenIconSizeInDp(); 77 static int GetMinimumHomescreenIconSizeInDp();
78 78
79 // Returns the ideal size for an image displayed on a web app's splash 79 // Returns the ideal size for an image displayed on a web app's splash
80 // screen. 80 // screen.
81 static int GetIdealSplashImageSizeInDp(); 81 static int GetIdealSplashImageSizeInDp();
82 82
83 // Returns the minimum size for an image displayed on a web app's splash 83 // Returns the minimum size for an image displayed on a web app's splash
84 // screen. 84 // screen.
85 static int GetMinimumSplashImageSizeInDp(); 85 static int GetMinimumSplashImageSizeInDp();
86 86
87 // Called when the homescreen image fetch initiated in FetchHomescreenImage()
88 // completes.
89 static void OnFetchedHomescreenImage(
90 const base::android::ScopedJavaGlobalRef<jobject> java_callback,
91 const SkBitmap& image);
92
87 // Fetches the splash screen image and stores it inside the WebappDataStorage 93 // Fetches the splash screen image and stores it inside the WebappDataStorage
88 // of the webapp. The WebappDataStorage object *must* have been previously 94 // of the webapp. The WebappDataStorage object *must* have been previously
89 // created by |AddShortcutInBackgroundWithSkBitmap|; this method should be 95 // created by |AddShortcutInBackgroundWithSkBitmap|; this method should be
90 // passed as a closure to that method. 96 // passed as a closure to that method.
91 static void FetchSplashScreenImage(content::WebContents* web_contents, 97 static void FetchSplashScreenImage(content::WebContents* web_contents,
92 const GURL& image_url, 98 const GURL& image_url,
93 const int ideal_splash_image_size_in_dp, 99 const int ideal_splash_image_size_in_dp,
94 const int minimum_splash_image_size_in_dp, 100 const int minimum_splash_image_size_in_dp,
95 const std::string& webapp_id); 101 const std::string& webapp_id);
96 102
(...skipping 19 matching lines...) Expand all
116 static GURL GetScopeFromURL(const GURL& url); 122 static GURL GetScopeFromURL(const GURL& url);
117 123
118 private: 124 private:
119 ShortcutHelper() = delete; 125 ShortcutHelper() = delete;
120 ~ShortcutHelper() = delete; 126 ~ShortcutHelper() = delete;
121 127
122 DISALLOW_COPY_AND_ASSIGN(ShortcutHelper); 128 DISALLOW_COPY_AND_ASSIGN(ShortcutHelper);
123 }; 129 };
124 130
125 #endif // CHROME_BROWSER_ANDROID_SHORTCUT_HELPER_H_ 131 #endif // CHROME_BROWSER_ANDROID_SHORTCUT_HELPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698