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_array.h" | 10 #include "base/android/jni_array.h" |
11 #include "base/android/jni_string.h" | 11 #include "base/android/jni_string.h" |
12 #include "base/bind.h" | 12 #include "base/bind.h" |
13 #include "base/callback.h" | 13 #include "base/callback.h" |
14 #include "base/command_line.h" | 14 #include "base/command_line.h" |
15 #include "base/strings/string16.h" | 15 #include "base/strings/string16.h" |
16 #include "base/strings/utf_string_conversions.h" | 16 #include "base/strings/utf_string_conversions.h" |
17 #include "chrome/browser/manifest/manifest_icon_downloader.h" | 17 #include "chrome/browser/manifest/manifest_icon_downloader.h" |
18 #include "chrome/common/chrome_switches.h" | 18 #include "chrome/common/chrome_switches.h" |
19 #include "content/public/browser/browser_thread.h" | 19 #include "content/public/browser/browser_thread.h" |
20 #include "content/public/browser/web_contents.h" | 20 #include "content/public/browser/web_contents.h" |
21 #include "jni/ShortcutHelper_jni.h" | 21 #include "jni/ShortcutHelper_jni.h" |
22 #include "ui/gfx/android/java_bitmap.h" | 22 #include "ui/gfx/android/java_bitmap.h" |
23 #include "ui/gfx/color_analysis.h" | 23 #include "ui/gfx/color_analysis.h" |
24 #include "url/gurl.h" | 24 #include "url/gurl.h" |
25 | 25 |
| 26 using base::android::JavaParamRef; |
| 27 using base::android::ScopedJavaLocalRef; |
26 using content::Manifest; | 28 using content::Manifest; |
27 | 29 |
28 namespace { | 30 namespace { |
29 | 31 |
30 static int kIdealHomescreenIconSize = -1; | 32 static int kIdealHomescreenIconSize = -1; |
31 static int kMinimumHomescreenIconSize = -1; | 33 static int kMinimumHomescreenIconSize = -1; |
32 static int kIdealSplashImageSize = -1; | 34 static int kIdealSplashImageSize = -1; |
33 static int kMinimumSplashImageSize = -1; | 35 static int kMinimumSplashImageSize = -1; |
34 | 36 |
35 static int kDefaultRGBIconValue = 145; | 37 static int kDefaultRGBIconValue = 145; |
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
311 DCHECK(jsplash_image_callback); | 313 DCHECK(jsplash_image_callback); |
312 base::Closure* splash_image_callback = | 314 base::Closure* splash_image_callback = |
313 reinterpret_cast<base::Closure*>(jsplash_image_callback); | 315 reinterpret_cast<base::Closure*>(jsplash_image_callback); |
314 splash_image_callback->Run(); | 316 splash_image_callback->Run(); |
315 delete splash_image_callback; | 317 delete splash_image_callback; |
316 } | 318 } |
317 | 319 |
318 bool ShortcutHelper::RegisterShortcutHelper(JNIEnv* env) { | 320 bool ShortcutHelper::RegisterShortcutHelper(JNIEnv* env) { |
319 return RegisterNativesImpl(env); | 321 return RegisterNativesImpl(env); |
320 } | 322 } |
OLD | NEW |