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

Side by Side Diff: chromecast/base/chromecast_config_android.cc

Issue 1312153003: jni_generator: Pass object parameters as JavaParamRef. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 3 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 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 "chromecast/base/chromecast_config_android.h" 5 #include "chromecast/base/chromecast_config_android.h"
6 6
7 #include "base/android/jni_android.h" 7 #include "base/android/jni_android.h"
8 #include "base/lazy_instance.h" 8 #include "base/lazy_instance.h"
9 #include "jni/ChromecastConfigAndroid_jni.h" 9 #include "jni/ChromecastConfigAndroid_jni.h"
10 10
(...skipping 29 matching lines...) Expand all
40 env, base::android::GetApplicationContext()); 40 env, base::android::GetApplicationContext());
41 } 41 }
42 42
43 // Registers a handler to be notified when SendUsageStats is changed. 43 // Registers a handler to be notified when SendUsageStats is changed.
44 void ChromecastConfigAndroid::SetSendUsageStatsChangedCallback( 44 void ChromecastConfigAndroid::SetSendUsageStatsChangedCallback(
45 const base::Callback<void(bool)>& callback) { 45 const base::Callback<void(bool)>& callback) {
46 send_usage_stats_changed_callback_ = callback; 46 send_usage_stats_changed_callback_ = callback;
47 } 47 }
48 48
49 // Called from Java. 49 // Called from Java.
50 void SetSendUsageStatsEnabled(JNIEnv* env, jclass caller, jboolean enabled) { 50 void SetSendUsageStatsEnabled(JNIEnv* env,
51 const JavaParamRef<jclass>& caller,
52 jboolean enabled) {
51 ChromecastConfigAndroid::GetInstance()-> 53 ChromecastConfigAndroid::GetInstance()->
52 send_usage_stats_changed_callback().Run(enabled); 54 send_usage_stats_changed_callback().Run(enabled);
53 } 55 }
54 56
55 } // namespace android 57 } // namespace android
56 } // namespace chromecast 58 } // namespace chromecast
OLDNEW
« no previous file with comments | « chromecast/android/cast_metrics_helper_android.cc ('k') | chromecast/browser/android/cast_window_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698