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

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

Issue 10035034: Implement the skeleton of an android content shell. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove unnecessary bits. 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_manager.h"
6
7 #include "base/android/jni_android.h"
8 #include "base/android/scoped_java_ref.h"
9 #include "base/lazy_instance.h"
10 #include "content/shell/android/shell_view.h"
11 #include "jni/shell_manager_jni.h"
12
13 using base::android::ScopedJavaLocalRef;
14 using content::ShellView;
15
16 base::LazyInstance<base::android::ScopedJavaGlobalRef<jobject> >
17 g_content_shell_manager = LAZY_INSTANCE_INITIALIZER;
18
19 void Init(JNIEnv* env, jclass clazz, jobject obj) {
20 g_content_shell_manager.Get().Reset(
21 base::android::ScopedJavaLocalRef<jobject>(env, obj));
22 }
23
24 ShellView* CreateShellView() {
25 JNIEnv* env = base::android::AttachCurrentThread();
26 return reinterpret_cast<ShellView*>(Java_ShellManager_createShell(
27 env, g_content_shell_manager.Get().obj()));
28 }
29
30 // Register native methods
31 bool RegisterShellManager(JNIEnv* env) {
32 return RegisterNativesImpl(env);
33 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698