| 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" |
| 11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 #include "base/location.h" | 12 #include "base/location.h" |
| 13 #include "base/strings/string16.h" | 13 #include "base/strings/string16.h" |
| 14 #include "base/task/cancelable_task_tracker.h" |
| 14 #include "base/threading/worker_pool.h" | 15 #include "base/threading/worker_pool.h" |
| 15 #include "chrome/browser/android/tab_android.h" | 16 #include "chrome/browser/android/tab_android.h" |
| 16 #include "chrome/browser/favicon/favicon_service.h" | 17 #include "chrome/browser/favicon/favicon_service.h" |
| 17 #include "chrome/browser/favicon/favicon_service_factory.h" | 18 #include "chrome/browser/favicon/favicon_service_factory.h" |
| 18 #include "chrome/common/cancelable_task_tracker.h" | |
| 19 #include "chrome/common/render_messages.h" | 19 #include "chrome/common/render_messages.h" |
| 20 #include "content/public/browser/user_metrics.h" | 20 #include "content/public/browser/user_metrics.h" |
| 21 #include "content/public/browser/web_contents.h" | 21 #include "content/public/browser/web_contents.h" |
| 22 #include "content/public/browser/web_contents_observer.h" | 22 #include "content/public/browser/web_contents_observer.h" |
| 23 #include "content/public/common/frame_navigate_params.h" | 23 #include "content/public/common/frame_navigate_params.h" |
| 24 #include "jni/ShortcutHelper_jni.h" | 24 #include "jni/ShortcutHelper_jni.h" |
| 25 #include "ui/gfx/android/java_bitmap.h" | 25 #include "ui/gfx/android/java_bitmap.h" |
| 26 #include "ui/gfx/codec/png_codec.h" | 26 #include "ui/gfx/codec/png_codec.h" |
| 27 #include "ui/gfx/color_analysis.h" | 27 #include "ui/gfx/color_analysis.h" |
| 28 #include "ui/gfx/favicon_size.h" | 28 #include "ui/gfx/favicon_size.h" |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 jclass clazz, | 207 jclass clazz, |
| 208 jlong tab_android_ptr, | 208 jlong tab_android_ptr, |
| 209 jstring title, | 209 jstring title, |
| 210 jint launcher_large_icon_size) { | 210 jint launcher_large_icon_size) { |
| 211 TabAndroid* tab = reinterpret_cast<TabAndroid*>(tab_android_ptr); | 211 TabAndroid* tab = reinterpret_cast<TabAndroid*>(tab_android_ptr); |
| 212 ShortcutHelper::AddShortcut( | 212 ShortcutHelper::AddShortcut( |
| 213 tab->web_contents(), | 213 tab->web_contents(), |
| 214 base::android::ConvertJavaStringToUTF16(env, title), | 214 base::android::ConvertJavaStringToUTF16(env, title), |
| 215 launcher_large_icon_size); | 215 launcher_large_icon_size); |
| 216 } | 216 } |
| OLD | NEW |