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

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

Issue 2664983004: Allow ShortcutHelper to retrieve badge icon dimensions. (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 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 56
57 // Adds a shortcut which opens in a browser tab to the launcher. 57 // Adds a shortcut which opens in a browser tab to the launcher.
58 static void AddShortcutWithSkBitmap( 58 static void AddShortcutWithSkBitmap(
59 const ShortcutInfo& info, 59 const ShortcutInfo& info,
60 const SkBitmap& icon_bitmap); 60 const SkBitmap& icon_bitmap);
61 61
62 // Shows toast notifying user that a WebAPK install is already in progress 62 // Shows toast notifying user that a WebAPK install is already in progress
63 // when user tries to queue a new install for the same WebAPK. 63 // when user tries to queue a new install for the same WebAPK.
64 static void ShowWebApkInstallInProgressToast(); 64 static void ShowWebApkInstallInProgressToast();
65 65
66 // Returns the ideal size for an icon representing a web app. 66 // Returns the ideal size for an icon representing a web app or a WebAPK.
67 static int GetIdealHomescreenIconSizeInPx(); 67 static int GetIdealHomescreenIconSizeInPx();
68 68
69 // Returns the minimum size for an icon representing a web app. 69 // Returns the minimum size for an icon representing a web app or a WebAPK.
70 static int GetMinimumHomescreenIconSizeInPx(); 70 static int GetMinimumHomescreenIconSizeInPx();
71 71
72 // Returns the ideal size for an image displayed on a web app's splash 72 // Returns the ideal size for an image displayed on a web app's splash
73 // screen. 73 // screen.
74 static int GetIdealSplashImageSizeInPx(); 74 static int GetIdealSplashImageSizeInPx();
75 75
76 // Returns the minimum size for an image displayed on a web app's splash 76 // Returns the minimum size for an image displayed on a web app's splash
77 // screen. 77 // screen.
78 static int GetMinimumSplashImageSizeInPx(); 78 static int GetMinimumSplashImageSizeInPx();
79 79
80 // Returns the ideal size for a badge icon of a WebAPK.
81 static int GetIdealBadgeIconSizeInPx();
82
80 // Fetches the splash screen image and stores it inside the WebappDataStorage 83 // Fetches the splash screen image and stores it inside the WebappDataStorage
81 // of the webapp. The WebappDataStorage object *must* have been previously 84 // of the webapp. The WebappDataStorage object *must* have been previously
82 // created by |AddShortcutInBackgroundWithSkBitmap|; this method should be 85 // created by |AddShortcutInBackgroundWithSkBitmap|; this method should be
83 // passed as a closure to that method. 86 // passed as a closure to that method.
84 static void FetchSplashScreenImage(content::WebContents* web_contents, 87 static void FetchSplashScreenImage(content::WebContents* web_contents,
85 const GURL& image_url, 88 const GURL& image_url,
86 const int ideal_splash_image_size_in_dp, 89 const int ideal_splash_image_size_in_dp,
87 const int minimum_splash_image_size_in_dp, 90 const int minimum_splash_image_size_in_dp,
88 const std::string& webapp_id); 91 const std::string& webapp_id);
89 92
(...skipping 25 matching lines...) Expand all
115 static GURL GetScopeFromURL(const GURL& url); 118 static GURL GetScopeFromURL(const GURL& url);
116 119
117 private: 120 private:
118 ShortcutHelper() = delete; 121 ShortcutHelper() = delete;
119 ~ShortcutHelper() = delete; 122 ~ShortcutHelper() = delete;
120 123
121 DISALLOW_COPY_AND_ASSIGN(ShortcutHelper); 124 DISALLOW_COPY_AND_ASSIGN(ShortcutHelper);
122 }; 125 };
123 126
124 #endif // CHROME_BROWSER_ANDROID_SHORTCUT_HELPER_H_ 127 #endif // CHROME_BROWSER_ANDROID_SHORTCUT_HELPER_H_
OLDNEW
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/ShortcutHelper.java ('k') | chrome/browser/android/shortcut_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698