| 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/favicon_helper.h" | 5 #include "chrome/browser/android/favicon_helper.h" |
| 6 | 6 |
| 7 #include <jni.h> | 7 #include <jni.h> |
| 8 #include <stddef.h> |
| 8 | 9 |
| 9 #include <vector> | 10 #include <vector> |
| 10 | 11 |
| 11 #include "base/android/jni_android.h" | 12 #include "base/android/jni_android.h" |
| 12 #include "base/android/jni_array.h" | 13 #include "base/android/jni_array.h" |
| 13 #include "base/android/jni_string.h" | 14 #include "base/android/jni_string.h" |
| 14 #include "base/android/scoped_java_ref.h" | 15 #include "base/android/scoped_java_ref.h" |
| 15 #include "base/bind.h" | 16 #include "base/bind.h" |
| 16 #include "base/strings/string_util.h" | 17 #include "base/strings/string_util.h" |
| 17 #include "base/strings/utf_string_conversions.h" | 18 #include "base/strings/utf_string_conversions.h" |
| (...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 252 | 253 |
| 253 gfx::JavaBitmap bitmap_lock(bitmap); | 254 gfx::JavaBitmap bitmap_lock(bitmap); |
| 254 SkBitmap skbitmap = gfx::CreateSkBitmapFromJavaBitmap(bitmap_lock); | 255 SkBitmap skbitmap = gfx::CreateSkBitmapFromJavaBitmap(bitmap_lock); |
| 255 return color_utils::CalculateKMeanColorOfBitmap(skbitmap); | 256 return color_utils::CalculateKMeanColorOfBitmap(skbitmap); |
| 256 } | 257 } |
| 257 | 258 |
| 258 // static | 259 // static |
| 259 bool FaviconHelper::RegisterFaviconHelper(JNIEnv* env) { | 260 bool FaviconHelper::RegisterFaviconHelper(JNIEnv* env) { |
| 260 return RegisterNativesImpl(env); | 261 return RegisterNativesImpl(env); |
| 261 } | 262 } |
| OLD | NEW |