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

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

Issue 2589503002: Use exact pixel sizes instead of dip in webapp/WebAPK installability code (Closed)
Patch Set: Merge branch 'master' into dp_px Created 4 years 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 const std::string& webapp_id, 53 const std::string& webapp_id,
54 const SkBitmap& icon_bitmap, 54 const SkBitmap& icon_bitmap,
55 const base::Closure& splash_image_callback); 55 const base::Closure& splash_image_callback);
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 // Returns the ideal size for an icon representing a web app. 62 // Returns the ideal size for an icon representing a web app.
63 static int GetIdealHomescreenIconSizeInDp(); 63 static int GetIdealHomescreenIconSizeInPx();
64 64
65 // Returns the minimum size for an icon representing a web app. 65 // Returns the minimum size for an icon representing a web app.
66 static int GetMinimumHomescreenIconSizeInDp(); 66 static int GetMinimumHomescreenIconSizeInPx();
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 GetIdealSplashImageSizeInPx();
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 GetMinimumSplashImageSizeInPx();
75 75
76 // Fetches the splash screen image and stores it inside the WebappDataStorage 76 // Fetches the splash screen image and stores it inside the WebappDataStorage
77 // of the webapp. The WebappDataStorage object *must* have been previously 77 // of the webapp. The WebappDataStorage object *must* have been previously
78 // created by |AddShortcutInBackgroundWithSkBitmap|; this method should be 78 // created by |AddShortcutInBackgroundWithSkBitmap|; this method should be
79 // passed as a closure to that method. 79 // passed as a closure to that method.
80 static void FetchSplashScreenImage(content::WebContents* web_contents, 80 static void FetchSplashScreenImage(content::WebContents* web_contents,
81 const GURL& image_url, 81 const GURL& image_url,
82 const int ideal_splash_image_size_in_dp, 82 const int ideal_splash_image_size_in_dp,
83 const int minimum_splash_image_size_in_dp, 83 const int minimum_splash_image_size_in_dp,
84 const std::string& webapp_id); 84 const std::string& webapp_id);
(...skipping 24 matching lines...) Expand all
109 static GURL GetScopeFromURL(const GURL& url); 109 static GURL GetScopeFromURL(const GURL& url);
110 110
111 private: 111 private:
112 ShortcutHelper() = delete; 112 ShortcutHelper() = delete;
113 ~ShortcutHelper() = delete; 113 ~ShortcutHelper() = delete;
114 114
115 DISALLOW_COPY_AND_ASSIGN(ShortcutHelper); 115 DISALLOW_COPY_AND_ASSIGN(ShortcutHelper);
116 }; 116 };
117 117
118 #endif // CHROME_BROWSER_ANDROID_SHORTCUT_HELPER_H_ 118 #endif // CHROME_BROWSER_ANDROID_SHORTCUT_HELPER_H_
OLDNEW
« no previous file with comments | « chrome/browser/android/banners/app_banner_manager_android.cc ('k') | chrome/browser/android/shortcut_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698