| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/logo_bridge.h" | 5 #include "chrome/browser/android/logo_bridge.h" |
| 6 | 6 |
| 7 #include <jni.h> | 7 #include <jni.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include "base/android/jni_android.h" | 10 #include "base/android/jni_android.h" |
| 11 #include "base/android/jni_array.h" | 11 #include "base/android/jni_array.h" |
| 12 #include "base/android/jni_string.h" | 12 #include "base/android/jni_string.h" |
| 13 #include "base/android/scoped_java_ref.h" | 13 #include "base/android/scoped_java_ref.h" |
| 14 #include "base/bind.h" | 14 #include "base/bind.h" |
| 15 #include "base/feature_list.h" | 15 #include "base/feature_list.h" |
| 16 #include "base/metrics/histogram_macros.h" | 16 #include "base/metrics/histogram_macros.h" |
| 17 #include "chrome/browser/android/logo_service.h" | 17 #include "chrome/browser/android/logo_service.h" |
| 18 #include "chrome/browser/doodle/doodle_service_factory.h" | 18 #include "chrome/browser/doodle/doodle_service_factory.h" |
| 19 #include "chrome/browser/profiles/profile.h" | 19 #include "chrome/browser/profiles/profile.h" |
| 20 #include "chrome/browser/profiles/profile_android.h" | 20 #include "chrome/browser/profiles/profile_android.h" |
| 21 #include "chrome/browser/search/suggestions/image_decoder_impl.h" | 21 #include "chrome/browser/search/suggestions/image_decoder_impl.h" |
| 22 #include "components/image_fetcher/image_fetcher_impl.h" | 22 #include "components/image_fetcher/core/image_fetcher_impl.h" |
| 23 #include "components/search_provider_logos/logo_tracker.h" | 23 #include "components/search_provider_logos/logo_tracker.h" |
| 24 #include "jni/LogoBridge_jni.h" | 24 #include "jni/LogoBridge_jni.h" |
| 25 #include "net/url_request/url_fetcher.h" | 25 #include "net/url_request/url_fetcher.h" |
| 26 #include "net/url_request/url_fetcher_delegate.h" | 26 #include "net/url_request/url_fetcher_delegate.h" |
| 27 #include "net/url_request/url_request_context_getter.h" | 27 #include "net/url_request/url_request_context_getter.h" |
| 28 #include "net/url_request/url_request_status.h" | 28 #include "net/url_request/url_request_status.h" |
| 29 #include "third_party/skia/include/core/SkBitmap.h" | 29 #include "third_party/skia/include/core/SkBitmap.h" |
| 30 #include "ui/gfx/android/java_bitmap.h" | 30 #include "ui/gfx/android/java_bitmap.h" |
| 31 #include "ui/gfx/image/image.h" | 31 #include "ui/gfx/image/image.h" |
| 32 #include "url/gurl.h" | 32 #include "url/gurl.h" |
| (...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 304 ScopedJavaLocalRef<jobject> j_logo = MakeJavaLogo( | 304 ScopedJavaLocalRef<jobject> j_logo = MakeJavaLogo( |
| 305 env, image.ToSkBitmap(), on_click_url, alt_text, animated_image_url); | 305 env, image.ToSkBitmap(), on_click_url, alt_text, animated_image_url); |
| 306 Java_LogoObserver_onLogoAvailable(env, j_logo_observer_, j_logo, | 306 Java_LogoObserver_onLogoAvailable(env, j_logo_observer_, j_logo, |
| 307 config_from_cache); | 307 config_from_cache); |
| 308 } | 308 } |
| 309 | 309 |
| 310 // static | 310 // static |
| 311 bool RegisterLogoBridge(JNIEnv* env) { | 311 bool RegisterLogoBridge(JNIEnv* env) { |
| 312 return RegisterNativesImpl(env); | 312 return RegisterNativesImpl(env); |
| 313 } | 313 } |
| OLD | NEW |