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

Side by Side Diff: content/browser/android/content_view_render_view.cc

Issue 1312153003: jni_generator: Pass object parameters as JavaParamRef. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 3 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "content/browser/android/content_view_render_view.h" 5 #include "content/browser/android/content_view_render_view.h"
6 6
7 #include "base/android/jni_android.h" 7 #include "base/android/jni_android.h"
8 #include "base/android/jni_string.h" 8 #include "base/android/jni_string.h"
9 #include "base/android/scoped_java_ref.h" 9 #include "base/android/scoped_java_ref.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 25 matching lines...) Expand all
36 gfx::NativeWindow root_window) 36 gfx::NativeWindow root_window)
37 : root_window_(root_window), current_surface_format_(0) { 37 : root_window_(root_window), current_surface_format_(0) {
38 java_obj_.Reset(env, obj); 38 java_obj_.Reset(env, obj);
39 } 39 }
40 40
41 ContentViewRenderView::~ContentViewRenderView() { 41 ContentViewRenderView::~ContentViewRenderView() {
42 } 42 }
43 43
44 // static 44 // static
45 static jlong Init(JNIEnv* env, 45 static jlong Init(JNIEnv* env,
46 jobject obj, 46 const JavaParamRef<jobject>& obj,
47 jlong native_root_window) { 47 jlong native_root_window) {
48 gfx::NativeWindow root_window = 48 gfx::NativeWindow root_window =
49 reinterpret_cast<gfx::NativeWindow>(native_root_window); 49 reinterpret_cast<gfx::NativeWindow>(native_root_window);
50 ContentViewRenderView* content_view_render_view = 50 ContentViewRenderView* content_view_render_view =
51 new ContentViewRenderView(env, obj, root_window); 51 new ContentViewRenderView(env, obj, root_window);
52 return reinterpret_cast<intptr_t>(content_view_render_view); 52 return reinterpret_cast<intptr_t>(content_view_render_view);
53 } 53 }
54 54
55 void ContentViewRenderView::Destroy(JNIEnv* env, jobject obj) { 55 void ContentViewRenderView::Destroy(JNIEnv* env, jobject obj) {
56 delete this; 56 delete this;
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 compositor_.reset(Compositor::Create(this, root_window_)); 111 compositor_.reset(Compositor::Create(this, root_window_));
112 } 112 }
113 113
114 jlong ContentViewRenderView::GetUIResourceProvider(JNIEnv* env, 114 jlong ContentViewRenderView::GetUIResourceProvider(JNIEnv* env,
115 jobject obj) { 115 jobject obj) {
116 if (!compositor_) 116 if (!compositor_)
117 return 0; 117 return 0;
118 return reinterpret_cast<intptr_t>(&compositor_->GetUIResourceProvider()); 118 return reinterpret_cast<intptr_t>(&compositor_->GetUIResourceProvider());
119 } 119 }
120 } // namespace content 120 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/android/content_view_core_impl.cc ('k') | content/browser/android/content_view_statics.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698