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 #include "chrome/browser/android/shortcut_helper.h" | 5 #include "chrome/browser/android/shortcut_helper.h" |
6 | 6 |
7 #include <jni.h> | 7 #include <jni.h> |
8 | 8 |
9 #include "base/android/jni_android.h" | 9 #include "base/android/jni_android.h" |
10 #include "base/android/jni_string.h" | 10 #include "base/android/jni_string.h" |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 b_value, | 162 b_value, |
163 is_webapp_capable); | 163 is_webapp_capable); |
164 } | 164 } |
165 | 165 |
166 // Adds a shortcut to the current URL to the Android home screen, firing | 166 // Adds a shortcut to the current URL to the Android home screen, firing |
167 // background tasks to pull all the data required. | 167 // background tasks to pull all the data required. |
168 // Note that we don't actually care about the tab here -- we just want | 168 // Note that we don't actually care about the tab here -- we just want |
169 // its otherwise inaccessible WebContents. | 169 // its otherwise inaccessible WebContents. |
170 static void AddShortcut(JNIEnv* env, jclass clazz, jint tab_android_ptr) { | 170 static void AddShortcut(JNIEnv* env, jclass clazz, jint tab_android_ptr) { |
171 TabAndroid* tab = reinterpret_cast<TabAndroid*>(tab_android_ptr); | 171 TabAndroid* tab = reinterpret_cast<TabAndroid*>(tab_android_ptr); |
172 ShortcutHelper::AddShortcut(tab->GetWebContents()); | 172 ShortcutHelper::AddShortcut(tab->web_contents()); |
173 } | 173 } |
OLD | NEW |