Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 "chrome/browser/android/shortcut_info.h" | 10 #include "chrome/browser/android/shortcut_info.h" |
| 11 #include "third_party/skia/include/core/SkBitmap.h" | 11 #include "third_party/skia/include/core/SkBitmap.h" |
| 12 | 12 |
| 13 // ShortcutHelper is the C++ counterpart of org.chromium.chrome.browser's | 13 // ShortcutHelper is the C++ counterpart of org.chromium.chrome.browser's |
| 14 // ShortcutHelper in Java. The object is owned by the Java object. It is created | 14 // ShortcutHelper in Java. |
| 15 // from there via a JNI (Initialize) call and MUST BE DESTROYED via Destroy(). | 15 class ShortcutHelper final { |
|
gone
2015/08/26 02:01:19
I asked you to update this comment when your origi
Lalit Maganti
2015/08/26 13:11:56
Yeah I missed them all because I basically redid t
| |
| 16 class ShortcutHelper { | |
| 17 public: | 16 public: |
| 18 // Registers JNI hooks. | 17 // Registers JNI hooks. |
| 19 static bool RegisterShortcutHelper(JNIEnv* env); | 18 static bool RegisterShortcutHelper(JNIEnv* env); |
| 20 | 19 |
| 21 // Adds a shortcut to the launcher using a SkBitmap. | 20 // Adds a shortcut to the launcher using a SkBitmap. |
| 22 // Must be called on the IO thread. | 21 // Must be called on the IO thread. |
| 23 static void AddShortcutInBackgroundWithSkBitmap(const ShortcutInfo& info, | 22 static void AddShortcutInBackgroundWithSkBitmap(const ShortcutInfo& info, |
| 23 const std::string& webapp_id, | |
| 24 const SkBitmap& icon_bitmap); | 24 const SkBitmap& icon_bitmap); |
| 25 | |
| 26 // Add splashscreen icon to the data of the webapp. | |
| 27 static void AddSplashscreenIconToWebappData(const std::string& webapp_id, | |
| 28 const SkBitmap& splash_icon); | |
| 29 | |
| 25 private: | 30 private: |
| 26 ShortcutHelper(); | 31 ShortcutHelper() = delete; |
| 32 ~ShortcutHelper() = delete; | |
| 27 | 33 |
| 28 DISALLOW_COPY_AND_ASSIGN(ShortcutHelper); | 34 DISALLOW_COPY_AND_ASSIGN(ShortcutHelper); |
| 29 }; | 35 }; |
| 30 | 36 |
| 31 #endif // CHROME_BROWSER_ANDROID_SHORTCUT_HELPER_H_ | 37 #endif // CHROME_BROWSER_ANDROID_SHORTCUT_HELPER_H_ |
| OLD | NEW |