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

Side by Side Diff: mojo/android/system/watcher_impl.cc

Issue 2721553004: Remove auto raw pointer deduction from non-linux specific code. (Closed)
Patch Set: rebase Created 3 years, 9 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 | « media/gpu/avda_codec_allocator.cc ('k') | ui/accelerated_widget_mac/ca_renderer_layer_tree.mm » ('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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "mojo/android/system/watcher_impl.h" 5 #include "mojo/android/system/watcher_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/android/base_jni_registrar.h" 10 #include "base/android/base_jni_registrar.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 78
79 static jlong CreateWatcher(JNIEnv* env, const JavaParamRef<jobject>& jcaller) { 79 static jlong CreateWatcher(JNIEnv* env, const JavaParamRef<jobject>& jcaller) {
80 return reinterpret_cast<jlong>(new WatcherImpl); 80 return reinterpret_cast<jlong>(new WatcherImpl);
81 } 81 }
82 82
83 static jint Start(JNIEnv* env, 83 static jint Start(JNIEnv* env,
84 const JavaParamRef<jobject>& jcaller, 84 const JavaParamRef<jobject>& jcaller,
85 jlong watcher_ptr, 85 jlong watcher_ptr,
86 jint mojo_handle, 86 jint mojo_handle,
87 jint signals) { 87 jint signals) {
88 auto watcher = reinterpret_cast<WatcherImpl*>(watcher_ptr); 88 auto* watcher = reinterpret_cast<WatcherImpl*>(watcher_ptr);
89 return watcher->Start(env, jcaller, mojo_handle, signals); 89 return watcher->Start(env, jcaller, mojo_handle, signals);
90 } 90 }
91 91
92 static void Cancel(JNIEnv* env, 92 static void Cancel(JNIEnv* env,
93 const JavaParamRef<jobject>& jcaller, 93 const JavaParamRef<jobject>& jcaller,
94 jlong watcher_ptr) { 94 jlong watcher_ptr) {
95 reinterpret_cast<WatcherImpl*>(watcher_ptr)->Cancel(); 95 reinterpret_cast<WatcherImpl*>(watcher_ptr)->Cancel();
96 } 96 }
97 97
98 static void Delete(JNIEnv* env, 98 static void Delete(JNIEnv* env,
99 const JavaParamRef<jobject>& jcaller, 99 const JavaParamRef<jobject>& jcaller,
100 jlong watcher_ptr) { 100 jlong watcher_ptr) {
101 delete reinterpret_cast<WatcherImpl*>(watcher_ptr); 101 delete reinterpret_cast<WatcherImpl*>(watcher_ptr);
102 } 102 }
103 103
104 bool RegisterWatcherImpl(JNIEnv* env) { 104 bool RegisterWatcherImpl(JNIEnv* env) {
105 return RegisterNativesImpl(env); 105 return RegisterNativesImpl(env);
106 } 106 }
107 107
108 } // namespace android 108 } // namespace android
109 } // namespace mojo 109 } // namespace mojo
OLDNEW
« no previous file with comments | « media/gpu/avda_codec_allocator.cc ('k') | ui/accelerated_widget_mac/ca_renderer_layer_tree.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698