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 "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 enum ManifestIconStatus { | 100 enum ManifestIconStatus { |
101 MANIFEST_ICON_STATUS_NONE, | 101 MANIFEST_ICON_STATUS_NONE, |
102 MANIFEST_ICON_STATUS_FETCHING, | 102 MANIFEST_ICON_STATUS_FETCHING, |
103 MANIFEST_ICON_STATUS_DONE | 103 MANIFEST_ICON_STATUS_DONE |
104 }; | 104 }; |
105 | 105 |
106 ~ShortcutHelper() override; | 106 ~ShortcutHelper() override; |
107 | 107 |
108 void Destroy(); | 108 void Destroy(); |
109 | 109 |
| 110 void RecordAddToHomescreen(); |
| 111 |
110 JavaObjectWeakGlobalRef java_ref_; | 112 JavaObjectWeakGlobalRef java_ref_; |
111 | 113 |
112 ShortcutInfo shortcut_info_; | 114 ShortcutInfo shortcut_info_; |
113 SkBitmap manifest_icon_; | 115 SkBitmap manifest_icon_; |
114 base::CancelableTaskTracker cancelable_task_tracker_; | 116 base::CancelableTaskTracker cancelable_task_tracker_; |
115 | 117 |
116 bool add_shortcut_requested_; | 118 bool add_shortcut_requested_; |
117 | 119 |
118 ManifestIconStatus manifest_icon_status_; | 120 ManifestIconStatus manifest_icon_status_; |
119 const int preferred_icon_size_in_px_; | 121 const int preferred_icon_size_in_px_; |
120 static const int kPreferredIconSizeInDp; | 122 static const int kPreferredIconSizeInDp; |
121 | 123 |
122 base::WeakPtrFactory<ShortcutHelper> weak_ptr_factory_; | 124 base::WeakPtrFactory<ShortcutHelper> weak_ptr_factory_; |
123 | 125 |
124 DISALLOW_COPY_AND_ASSIGN(ShortcutHelper); | 126 DISALLOW_COPY_AND_ASSIGN(ShortcutHelper); |
125 }; | 127 }; |
126 | 128 |
127 #endif // CHROME_BROWSER_ANDROID_SHORTCUT_HELPER_H_ | 129 #endif // CHROME_BROWSER_ANDROID_SHORTCUT_HELPER_H_ |
OLD | NEW |