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

Side by Side Diff: content/shell/android/shell_view.cc

Issue 10035034: Implement the skeleton of an android content shell. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed drawable png as it was checked in separately. Created 8 years, 8 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 | Annotate | Revision Log
OLDNEW
(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 } // namespace content
32
33 // ----------------------------------------------------------------------------
34 // Native JNI methods
35 // ----------------------------------------------------------------------------
36
37 static jint Init(JNIEnv* env, jobject obj) {
38 content::ShellView* shell_view = new content::ShellView(env, obj);
39 return reinterpret_cast<jint>(shell_view);
40 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698