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

Side by Side Diff: android_webview/native/aw_picture.h

Issue 1492703004: Pass method parameters as JavaParamRef in android_webview. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: forgot to test compile unit tests before uploading, whoops Created 5 years 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 | « android_webview/native/aw_pdf_exporter.cc ('k') | android_webview/native/aw_picture.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 #ifndef ANDROID_WEBVIEW_NATIVE_AW_PICTURE_H_ 5 #ifndef ANDROID_WEBVIEW_NATIVE_AW_PICTURE_H_
6 #define ANDROID_WEBVIEW_NATIVE_AW_PICTURE_H_ 6 #define ANDROID_WEBVIEW_NATIVE_AW_PICTURE_H_
7 7
8 #include <jni.h> 8 #include <jni.h>
9 9
10 #include "base/android/jni_weak_ref.h" 10 #include "base/android/jni_weak_ref.h"
11 #include "base/android/scoped_java_ref.h" 11 #include "base/android/scoped_java_ref.h"
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 #include "content/public/browser/web_contents_observer.h" 13 #include "content/public/browser/web_contents_observer.h"
14 #include "skia/ext/refptr.h" 14 #include "skia/ext/refptr.h"
15 15
16 class SkPicture; 16 class SkPicture;
17 17
18 namespace android_webview { 18 namespace android_webview {
19 19
20 class AwPicture { 20 class AwPicture {
21 public: 21 public:
22 AwPicture(skia::RefPtr<SkPicture> picture); 22 AwPicture(skia::RefPtr<SkPicture> picture);
23 ~AwPicture(); 23 ~AwPicture();
24 24
25 // Methods called from Java. 25 // Methods called from Java.
26 void Destroy(JNIEnv* env, jobject obj); 26 void Destroy(JNIEnv* env, const base::android::JavaParamRef<jobject>& obj);
27 jint GetWidth(JNIEnv* env, jobject obj); 27 jint GetWidth(JNIEnv* env, const base::android::JavaParamRef<jobject>& obj);
28 jint GetHeight(JNIEnv* env, jobject obj); 28 jint GetHeight(JNIEnv* env, const base::android::JavaParamRef<jobject>& obj);
29 void Draw(JNIEnv* env, jobject obj, jobject canvas); 29 void Draw(JNIEnv* env,
30 const base::android::JavaParamRef<jobject>& obj,
31 const base::android::JavaParamRef<jobject>& canvas);
30 32
31 private: 33 private:
32 skia::RefPtr<SkPicture> picture_; 34 skia::RefPtr<SkPicture> picture_;
33 35
34 DISALLOW_IMPLICIT_CONSTRUCTORS(AwPicture); 36 DISALLOW_IMPLICIT_CONSTRUCTORS(AwPicture);
35 }; 37 };
36 38
37 bool RegisterAwPicture(JNIEnv* env); 39 bool RegisterAwPicture(JNIEnv* env);
38 40
39 } // android_webview 41 } // android_webview
40 42
41 #endif // ANDROID_WEBVIEW_NATIVE_AW_PICTURE_ 43 #endif // ANDROID_WEBVIEW_NATIVE_AW_PICTURE_
OLDNEW
« no previous file with comments | « android_webview/native/aw_pdf_exporter.cc ('k') | android_webview/native/aw_picture.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698