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

Side by Side Diff: base/android/memory_pressure_listener_android.cc

Issue 2209993003: Add missing using statements for JNI types. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « base/android/field_trial_list.cc ('k') | base/message_loop/message_pump_android.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "base/android/memory_pressure_listener_android.h" 5 #include "base/android/memory_pressure_listener_android.h"
6 6
7 #include "base/android/context_utils.h" 7 #include "base/android/context_utils.h"
8 #include "base/memory/memory_pressure_listener.h" 8 #include "base/memory/memory_pressure_listener.h"
9 #include "jni/MemoryPressureListener_jni.h" 9 #include "jni/MemoryPressureListener_jni.h"
10 10
11 using base::android::JavaParamRef;
12
11 // Defined and called by JNI. 13 // Defined and called by JNI.
12 static void OnMemoryPressure(JNIEnv* env, 14 static void OnMemoryPressure(JNIEnv* env,
13 const JavaParamRef<jclass>& clazz, 15 const JavaParamRef<jclass>& clazz,
14 jint memory_pressure_level) { 16 jint memory_pressure_level) {
15 base::MemoryPressureListener::NotifyMemoryPressure( 17 base::MemoryPressureListener::NotifyMemoryPressure(
16 static_cast<base::MemoryPressureListener::MemoryPressureLevel>( 18 static_cast<base::MemoryPressureListener::MemoryPressureLevel>(
17 memory_pressure_level)); 19 memory_pressure_level));
18 } 20 }
19 21
20 namespace base { 22 namespace base {
21 namespace android { 23 namespace android {
22 24
23 bool MemoryPressureListenerAndroid::Register(JNIEnv* env) { 25 bool MemoryPressureListenerAndroid::Register(JNIEnv* env) {
24 return RegisterNativesImpl(env); 26 return RegisterNativesImpl(env);
25 } 27 }
26 28
27 void MemoryPressureListenerAndroid::RegisterSystemCallback(JNIEnv* env) { 29 void MemoryPressureListenerAndroid::RegisterSystemCallback(JNIEnv* env) {
28 Java_MemoryPressureListener_registerSystemCallback( 30 Java_MemoryPressureListener_registerSystemCallback(
29 env, GetApplicationContext()); 31 env, GetApplicationContext());
30 } 32 }
31 33
32 } // namespace android 34 } // namespace android
33 } // namespace base 35 } // namespace base
OLDNEW
« no previous file with comments | « base/android/field_trial_list.cc ('k') | base/message_loop/message_pump_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698