Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(19)

Side by Side Diff: chrome/browser/android/large_icon_bridge.cc

Issue 2237943002: Remove now-unnecessary .obj() in Java method calls. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@switch-context
Patch Set: Rebase *again* :( Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 result.bitmap.bitmap_data->size(), 45 result.bitmap.bitmap_data->size(),
46 &bitmap); 46 &bitmap);
47 if (!bitmap.isNull()) 47 if (!bitmap.isNull())
48 j_bitmap = gfx::ConvertToJavaBitmap(&bitmap); 48 j_bitmap = gfx::ConvertToJavaBitmap(&bitmap);
49 } 49 }
50 50
51 jint background_color = kDefaultBackgroundColor; 51 jint background_color = kDefaultBackgroundColor;
52 if (result.fallback_icon_style) 52 if (result.fallback_icon_style)
53 background_color = result.fallback_icon_style->background_color; 53 background_color = result.fallback_icon_style->background_color;
54 54
55 Java_LargeIconCallback_onLargeIconAvailable(env, 55 Java_LargeIconCallback_onLargeIconAvailable(env, j_callback->obj(), j_bitmap,
56 j_callback->obj(),
57 j_bitmap.obj(),
58 background_color); 56 background_color);
59 } 57 }
60 58
61 } // namespace 59 } // namespace
62 60
63 static jlong Init(JNIEnv* env, const JavaParamRef<jclass>& clazz) { 61 static jlong Init(JNIEnv* env, const JavaParamRef<jclass>& clazz) {
64 return reinterpret_cast<intptr_t>(new LargeIconBridge()); 62 return reinterpret_cast<intptr_t>(new LargeIconBridge());
65 } 63 }
66 64
67 LargeIconBridge::LargeIconBridge() { 65 LargeIconBridge::LargeIconBridge() {
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 callback_runner, 102 callback_runner,
105 &cancelable_task_tracker_); 103 &cancelable_task_tracker_);
106 104
107 return true; 105 return true;
108 } 106 }
109 107
110 // static 108 // static
111 bool LargeIconBridge::RegisterLargeIconBridge(JNIEnv* env) { 109 bool LargeIconBridge::RegisterLargeIconBridge(JNIEnv* env) {
112 return RegisterNativesImpl(env); 110 return RegisterNativesImpl(env);
113 } 111 }
OLDNEW
« no previous file with comments | « chrome/browser/android/intent_helper.cc ('k') | chrome/browser/android/location_settings_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698