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

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

Issue 1749603002: Store URLs in WebappDataStorage, and purge them when history is cleared. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 9 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/macros.h" 10 #include "base/macros.h"
(...skipping 30 matching lines...) Expand all
41 // Returns the minimum size for an image displayed on a web app's splash 41 // Returns the minimum size for an image displayed on a web app's splash
42 // screen. 42 // screen.
43 static int GetMinimumSplashImageSizeInDp(); 43 static int GetMinimumSplashImageSizeInDp();
44 44
45 // Fetches the splash screen image and stores it inside the WebappDataStorage 45 // Fetches the splash screen image and stores it inside the WebappDataStorage
46 // of the webapp. 46 // of the webapp.
47 static void FetchSplashScreenImage(content::WebContents* web_contents, 47 static void FetchSplashScreenImage(content::WebContents* web_contents,
48 const GURL& image_url, 48 const GURL& image_url,
49 const int ideal_splash_image_size_in_dp, 49 const int ideal_splash_image_size_in_dp,
50 const int minimum_splash_image_size_in_dp, 50 const int minimum_splash_image_size_in_dp,
51 const std::string& webapp_id); 51 const std::string& webapp_id,
52 const std::string& webapp_scope);
52 53
53 // Stores the data of the webapp which is not placed inside the shortcut. 54 // Stores the data of the webapp which is not placed inside the shortcut.
54 static void StoreWebappData(const std::string& webapp_id, 55 static void StoreWebappData(const std::string& webapp_id,
56 const std::string& webapp_url,
55 const SkBitmap& splash_image); 57 const SkBitmap& splash_image);
56 58
57 // Modify the given icon to matche the launcher requirements, then returns the 59 // Modify the given icon to matche the launcher requirements, then returns the
58 // new icon. It might generate an entirely new icon, in which case, 60 // new icon. It might generate an entirely new icon, in which case,
59 // |is_generated| will be set to |true|. 61 // |is_generated| will be set to |true|.
60 static SkBitmap FinalizeLauncherIcon(const SkBitmap& icon, 62 static SkBitmap FinalizeLauncherIcon(const SkBitmap& icon,
61 const GURL& url, 63 const GURL& url,
62 bool* is_generated); 64 bool* is_generated);
63 65
64 private: 66 private:
65 ShortcutHelper() = delete; 67 ShortcutHelper() = delete;
66 ~ShortcutHelper() = delete; 68 ~ShortcutHelper() = delete;
67 69
68 DISALLOW_COPY_AND_ASSIGN(ShortcutHelper); 70 DISALLOW_COPY_AND_ASSIGN(ShortcutHelper);
69 }; 71 };
70 72
71 #endif // CHROME_BROWSER_ANDROID_SHORTCUT_HELPER_H_ 73 #endif // CHROME_BROWSER_ANDROID_SHORTCUT_HELPER_H_
OLDNEW
« no previous file with comments | « chrome/browser/android/banners/app_banner_data_fetcher_android.cc ('k') | chrome/browser/android/shortcut_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698