Chromium Code Reviews| Index: content/public/browser/android/bitmap_holder.h |
| diff --git a/content/browser/android/jni_helper.h b/content/public/browser/android/bitmap_holder.h |
| similarity index 76% |
| rename from content/browser/android/jni_helper.h |
| rename to content/public/browser/android/bitmap_holder.h |
| index c7fa56935a0fba4fef13099f0cdc57c5b5649668..cbfd976e944cc6523a3eda375f1df80e31d5c7ab 100644 |
| --- a/content/browser/android/jni_helper.h |
| +++ b/content/public/browser/android/bitmap_holder.h |
| @@ -2,8 +2,8 @@ |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| -#ifndef CONTENT_BROWSER_ANDROID_JNI_HELPER_H_ |
| -#define CONTENT_BROWSER_ANDROID_JNI_HELPER_H_ |
| +#ifndef CONTENT_PUBLIC_BROWSER_ANDROID_BITMAP_HOLDER_H_ |
| +#define CONTENT_PUBLIC_BROWSER_ANDROID_BITMAP_HOLDER_H_ |
| #include <jni.h> |
| #include <string> |
| @@ -18,6 +18,9 @@ namespace gfx { |
| class Size; |
| } |
| +namespace content { |
| + |
| +// TODO(sievers): Remove this and use ScopedJavaLocalRef instead. |
| // Auto creator/destructor for a JNI frame for local references. This allows |
| // safely having more than 16 local references, and avoids calls to |
| // DeleteLocalRef. |
| @@ -53,16 +56,6 @@ class AutoLockJavaBitmap { |
| DISALLOW_COPY_AND_ASSIGN(AutoLockJavaBitmap); |
| }; |
| -// Tell Java to write its current stack trace into Android logs. Note that the |
| -// trace will stop at the entry point into C++ code. |
| -void PrintJavaStackTrace(); |
| - |
| -// Fills in the given vector<string> from a java String[]. |
| -void ConvertJavaArrayOfStringsToVectorOfStrings( |
| - JNIEnv* env, |
| - jobjectArray jstrings, |
| - std::vector<std::string>* vec); |
| - |
| // Helper method to create an Android Java Bitmap object. You can use the |
| // AutoLockJavaBitmap class to manipulate its pixels, and pass it back up |
| // to Java code for drawing. Returns a JNI local reference to the bitmap. |
| @@ -75,9 +68,9 @@ void DeleteJavaBitmap(jobject bitmap); |
| // Paint one java bitmap into another. Scale if needed. |
| void PaintJavaBitmapToJavaBitmap(jobject sourceBitmap, |
| - const gfx::Rect& sourceRect, |
| - jobject destBitmap, |
| - const gfx::Rect& destRect); |
| + const gfx::Rect& sourceRect, |
|
Ted C
2012/06/15 20:52:17
indent of this looks messed up.
|
| + jobject destBitmap, |
| + const gfx::Rect& destRect); |
| // Copy the Chromium Skia bitmap into a new Java bitmap. Useful for small UI |
| // bitmaps originating from WebKit that we want to manipulate in Java (such as |
| @@ -86,7 +79,6 @@ void PaintJavaBitmapToJavaBitmap(jobject sourceBitmap, |
| base::android::ScopedJavaLocalRef<jobject> ConvertToJavaBitmap( |
| const SkBitmap* skbitmap); |
| -// Registers our JNI methods. |
| -bool RegisterJniHelper(JNIEnv* env); |
| +} // namespace content |
| -#endif // CONTENT_BROWSER_ANDROID_JNI_HELPER_H_ |
| +#endif // CONTENT_PUBLIC_BROWSER_ANDROID_BITMAP_HOLDER_H_ |