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. There are no instances of this class so there is |
|
gone
2015/08/26 18:43:43
nit: Don't bother talking about ownership if it do
Lalit Maganti
2015/08/26 19:40:26
Removed.
| |
| 15 // from there via a JNI (Initialize) call and MUST BE DESTROYED via Destroy(). | 15 // no ownership to consider. |
| 16 class ShortcutHelper { | 16 class ShortcutHelper { |
| 17 public: | 17 public: |
| 18 // Registers JNI hooks. | 18 // Registers JNI hooks. |
| 19 static bool RegisterShortcutHelper(JNIEnv* env); | 19 static bool RegisterShortcutHelper(JNIEnv* env); |
| 20 | 20 |
| 21 // Adds a shortcut to the launcher using a SkBitmap. | 21 // Adds a shortcut to the launcher using a SkBitmap. |
| 22 // Must be called on the IO thread. | 22 // Must be called on the IO thread. |
| 23 static void AddShortcutInBackgroundWithSkBitmap(const ShortcutInfo& info, | 23 static void AddShortcutInBackgroundWithSkBitmap(const ShortcutInfo& info, |
| 24 const SkBitmap& icon_bitmap); | 24 const SkBitmap& icon_bitmap); |
| 25 private: | 25 private: |
| 26 ShortcutHelper(); | 26 ShortcutHelper(); |
| 27 | 27 |
| 28 DISALLOW_COPY_AND_ASSIGN(ShortcutHelper); | 28 DISALLOW_COPY_AND_ASSIGN(ShortcutHelper); |
| 29 }; | 29 }; |
| 30 | 30 |
| 31 #endif // CHROME_BROWSER_ANDROID_SHORTCUT_HELPER_H_ | 31 #endif // CHROME_BROWSER_ANDROID_SHORTCUT_HELPER_H_ |
| OLD | NEW |