| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/large_icon_bridge.h" | 5 #include "chrome/browser/android/large_icon_bridge.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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 background_color = result.fallback_icon_style->background_color; | 52 background_color = result.fallback_icon_style->background_color; |
| 53 | 53 |
| 54 Java_LargeIconCallback_onLargeIconAvailable(env, | 54 Java_LargeIconCallback_onLargeIconAvailable(env, |
| 55 j_callback->obj(), | 55 j_callback->obj(), |
| 56 j_bitmap.obj(), | 56 j_bitmap.obj(), |
| 57 background_color); | 57 background_color); |
| 58 } | 58 } |
| 59 | 59 |
| 60 } // namespace | 60 } // namespace |
| 61 | 61 |
| 62 static jlong Init(JNIEnv* env, jclass clazz) { | 62 static jlong Init(JNIEnv* env, const JavaParamRef<jclass>& clazz) { |
| 63 return reinterpret_cast<intptr_t>(new LargeIconBridge()); | 63 return reinterpret_cast<intptr_t>(new LargeIconBridge()); |
| 64 } | 64 } |
| 65 | 65 |
| 66 LargeIconBridge::LargeIconBridge() { | 66 LargeIconBridge::LargeIconBridge() { |
| 67 } | 67 } |
| 68 | 68 |
| 69 LargeIconBridge::~LargeIconBridge() { | 69 LargeIconBridge::~LargeIconBridge() { |
| 70 } | 70 } |
| 71 | 71 |
| 72 void LargeIconBridge::Destroy(JNIEnv* env, jobject obj) { | 72 void LargeIconBridge::Destroy(JNIEnv* env, jobject obj) { |
| (...skipping 30 matching lines...) Expand all Loading... |
| 103 callback_runner, | 103 callback_runner, |
| 104 &cancelable_task_tracker_); | 104 &cancelable_task_tracker_); |
| 105 | 105 |
| 106 return true; | 106 return true; |
| 107 } | 107 } |
| 108 | 108 |
| 109 // static | 109 // static |
| 110 bool LargeIconBridge::RegisterLargeIconBridge(JNIEnv* env) { | 110 bool LargeIconBridge::RegisterLargeIconBridge(JNIEnv* env) { |
| 111 return RegisterNativesImpl(env); | 111 return RegisterNativesImpl(env); |
| 112 } | 112 } |
| OLD | NEW |