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

Side by Side Diff: chrome/browser/media/android/router/media_router_dialog_controller_android.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/media/android/router/media_router_dialog_controller_and roid.h" 5 #include "chrome/browser/media/android/router/media_router_dialog_controller_and roid.h"
6 6
7 #include "base/android/context_utils.h" 7 #include "base/android/context_utils.h"
8 #include "base/android/jni_android.h" 8 #include "base/android/jni_android.h"
9 #include "base/android/jni_string.h" 9 #include "base/android/jni_string.h"
10 #include "chrome/browser/media/android/router/media_router_android.h" 10 #include "chrome/browser/media/android/router/media_router_android.h"
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 MediaRouterAndroid* router = static_cast<MediaRouterAndroid*>( 126 MediaRouterAndroid* router = static_cast<MediaRouterAndroid*>(
127 MediaRouterFactory::GetApiForBrowserContext( 127 MediaRouterFactory::GetApiForBrowserContext(
128 initiator()->GetBrowserContext())); 128 initiator()->GetBrowserContext()));
129 const MediaRoute* matching_route = router->FindRouteBySource(source_id); 129 const MediaRoute* matching_route = router->FindRouteBySource(source_id);
130 if (matching_route) { 130 if (matching_route) {
131 ScopedJavaLocalRef<jstring> jmedia_route_id = 131 ScopedJavaLocalRef<jstring> jmedia_route_id =
132 base::android::ConvertUTF8ToJavaString( 132 base::android::ConvertUTF8ToJavaString(
133 env, matching_route->media_route_id()); 133 env, matching_route->media_route_id());
134 134
135 Java_ChromeMediaRouterDialogController_openRouteControllerDialog( 135 Java_ChromeMediaRouterDialogController_openRouteControllerDialog(
136 env, java_dialog_controller_.obj(), jsource_urn.obj(), 136 env, java_dialog_controller_, jsource_urn, jmedia_route_id);
137 jmedia_route_id.obj());
138 return; 137 return;
139 } 138 }
140 139
141 Java_ChromeMediaRouterDialogController_openRouteChooserDialog( 140 Java_ChromeMediaRouterDialogController_openRouteChooserDialog(
142 env, java_dialog_controller_.obj(), jsource_urn.obj()); 141 env, java_dialog_controller_, jsource_urn);
143 } 142 }
144 143
145 void MediaRouterDialogControllerAndroid::CloseMediaRouterDialog() { 144 void MediaRouterDialogControllerAndroid::CloseMediaRouterDialog() {
146 JNIEnv* env = base::android::AttachCurrentThread(); 145 JNIEnv* env = base::android::AttachCurrentThread();
147 146
148 Java_ChromeMediaRouterDialogController_closeDialog( 147 Java_ChromeMediaRouterDialogController_closeDialog(env,
149 env, java_dialog_controller_.obj()); 148 java_dialog_controller_);
150 } 149 }
151 150
152 bool MediaRouterDialogControllerAndroid::IsShowingMediaRouterDialog() const { 151 bool MediaRouterDialogControllerAndroid::IsShowingMediaRouterDialog() const {
153 JNIEnv* env = base::android::AttachCurrentThread(); 152 JNIEnv* env = base::android::AttachCurrentThread();
154 return Java_ChromeMediaRouterDialogController_isShowingDialog( 153 return Java_ChromeMediaRouterDialogController_isShowingDialog(
155 env, java_dialog_controller_.obj()); 154 env, java_dialog_controller_);
156 } 155 }
157 156
158 } // namespace media_router 157 } // namespace media_router
159 158
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698