| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "content/shell/android/shell_view.h" | |
| 6 | |
| 7 #include "base/android/jni_android.h" | |
| 8 #include "jni/shell_view_jni.h" | |
| 9 | |
| 10 namespace content { | |
| 11 | |
| 12 ShellView::ShellView(JNIEnv* env, jobject obj) | |
| 13 : weak_java_shell_view_(env, obj) { | |
| 14 } | |
| 15 | |
| 16 ShellView::~ShellView() { | |
| 17 } | |
| 18 | |
| 19 void ShellView::InitFromTabContents(WebContents* tab_contents) { | |
| 20 JNIEnv* env = base::android::AttachCurrentThread(); | |
| 21 Java_ShellView_initFromNativeTabContents( | |
| 22 env, weak_java_shell_view_.get(env).obj(), | |
| 23 reinterpret_cast<jint>(tab_contents)); | |
| 24 } | |
| 25 | |
| 26 // static | |
| 27 bool ShellView::Register(JNIEnv* env) { | |
| 28 return RegisterNativesImpl(env); | |
| 29 } | |
| 30 | |
| 31 static jint Init(JNIEnv* env, jobject obj) { | |
| 32 return reinterpret_cast<jint>(new ShellView(env, obj)); | |
| 33 } | |
| 34 | |
| 35 } // namespace content | |
| OLD | NEW |