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

Side by Side Diff: printing/printing_context_android.cc

Issue 83283002: Android: change native pointer types from int to long in src/printing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add jni_generator_ptr_type to gyp Created 7 years, 1 month 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 | « printing/printing.gyp ('k') | no next file » | 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 "printing/printing_context_android.h" 5 #include "printing/printing_context_android.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/android/jni_android.h" 9 #include "base/android/jni_android.h"
10 #include "base/android/jni_array.h" 10 #include "base/android/jni_array.h"
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 int max_pages, 84 int max_pages,
85 bool has_selection, 85 bool has_selection,
86 const PrintSettingsCallback& callback) { 86 const PrintSettingsCallback& callback) {
87 // This method is always run in the UI thread. 87 // This method is always run in the UI thread.
88 callback_ = callback; 88 callback_ = callback;
89 89
90 JNIEnv* env = base::android::AttachCurrentThread(); 90 JNIEnv* env = base::android::AttachCurrentThread();
91 if (j_printing_context_.is_null()) { 91 if (j_printing_context_.is_null()) {
92 j_printing_context_.Reset(Java_PrintingContext_create( 92 j_printing_context_.Reset(Java_PrintingContext_create(
93 env, 93 env,
94 reinterpret_cast<int>(this))); 94 reinterpret_cast<intptr_t>(this)));
95 } 95 }
96 96
97 Java_PrintingContext_pageCountEstimationDone(env, 97 Java_PrintingContext_pageCountEstimationDone(env,
98 j_printing_context_.obj(), 98 j_printing_context_.obj(),
99 max_pages); 99 max_pages);
100 } 100 }
101 101
102 void PrintingContextAndroid::AskUserForSettingsReply(JNIEnv* env, 102 void PrintingContextAndroid::AskUserForSettingsReply(JNIEnv* env,
103 jobject obj, 103 jobject obj,
104 jboolean success) { 104 jboolean success) {
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 // Intentional No-op. 237 // Intentional No-op.
238 return NULL; 238 return NULL;
239 } 239 }
240 240
241 // static 241 // static
242 bool PrintingContextAndroid::RegisterPrintingContext(JNIEnv* env) { 242 bool PrintingContextAndroid::RegisterPrintingContext(JNIEnv* env) {
243 return RegisterNativesImpl(env); 243 return RegisterNativesImpl(env);
244 } 244 }
245 245
246 } // namespace printing 246 } // namespace printing
OLDNEW
« no previous file with comments | « printing/printing.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698