ExtensionSyncService: listen for relevant changes instead of being explicitly called...
[chromium-blink-merge.git] / chrome / browser / android / shortcut_helper.h
blob93e1c9d589a86307befc9bbc041867eb15ffadae
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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_ANDROID_SHORTCUT_HELPER_H_
6 #define CHROME_BROWSER_ANDROID_SHORTCUT_HELPER_H_
8 #include "base/android/jni_android.h"
9 #include "base/android/jni_weak_ref.h"
10 #include "chrome/browser/android/shortcut_info.h"
11 #include "third_party/skia/include/core/SkBitmap.h"
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
15 // from there via a JNI (Initialize) call and MUST BE DESTROYED via Destroy().
16 class ShortcutHelper {
17 public:
18 // Registers JNI hooks.
19 static bool RegisterShortcutHelper(JNIEnv* env);
21 // Adds a shortcut to the launcher using a SkBitmap.
22 // Must be called on the IO thread.
23 static void AddShortcutInBackgroundWithSkBitmap(const ShortcutInfo& info,
24 const SkBitmap& icon_bitmap);
25 private:
26 ShortcutHelper();
28 DISALLOW_COPY_AND_ASSIGN(ShortcutHelper);
31 #endif // CHROME_BROWSER_ANDROID_SHORTCUT_HELPER_H_