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

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

Issue 10823340: [Android] Upstream Modal Dialogs functionality (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove webview code Created 8 years, 4 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
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_core_impl.h" 5 #include "content/browser/android/content_view_core_impl.h"
6 6
7 #include "base/android/jni_android.h" 7 #include "base/android/jni_android.h"
8 #include "base/android/jni_array.h" 8 #include "base/android/jni_array.h"
9 #include "base/android/jni_string.h" 9 #include "base/android/jni_string.h"
10 #include "base/android/scoped_java_ref.h" 10 #include "base/android/scoped_java_ref.h"
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 } 144 }
145 145
146 RenderWidgetHostViewAndroid* 146 RenderWidgetHostViewAndroid*
147 ContentViewCoreImpl::GetRenderWidgetHostViewAndroid() { 147 ContentViewCoreImpl::GetRenderWidgetHostViewAndroid() {
148 RenderWidgetHostView* rwhv = NULL; 148 RenderWidgetHostView* rwhv = NULL;
149 if (web_contents_) 149 if (web_contents_)
150 rwhv = web_contents_->GetRenderWidgetHostView(); 150 rwhv = web_contents_->GetRenderWidgetHostView();
151 return static_cast<RenderWidgetHostViewAndroid*>(rwhv); 151 return static_cast<RenderWidgetHostViewAndroid*>(rwhv);
152 } 152 }
153 153
154 ScopedJavaLocalRef<jobject> ContentViewCoreImpl::GetJavaObject() {
155 JNIEnv* env = AttachCurrentThread();
156 return java_ref_.get(env);
157 }
158
154 // ---------------------------------------------------------------------------- 159 // ----------------------------------------------------------------------------
155 // Methods called from Java via JNI 160 // Methods called from Java via JNI
156 // ---------------------------------------------------------------------------- 161 // ----------------------------------------------------------------------------
157 162
158 void ContentViewCoreImpl::SelectPopupMenuItems(JNIEnv* env, jobject obj, 163 void ContentViewCoreImpl::SelectPopupMenuItems(JNIEnv* env, jobject obj,
159 jintArray indices) { 164 jintArray indices) {
160 RenderViewHostImpl* rvhi = static_cast<RenderViewHostImpl*>( 165 RenderViewHostImpl* rvhi = static_cast<RenderViewHostImpl*>(
161 web_contents_->GetRenderViewHost()); 166 web_contents_->GetRenderViewHost());
162 DCHECK(rvhi); 167 DCHECK(rvhi);
163 if (indices == NULL) { 168 if (indices == NULL) {
(...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after
626 if (!HasField(env, clazz, "mNativeContentViewCore", "I")) { 631 if (!HasField(env, clazz, "mNativeContentViewCore", "I")) {
627 DLOG(ERROR) << "Unable to find ContentView.mNativeContentViewCore!"; 632 DLOG(ERROR) << "Unable to find ContentView.mNativeContentViewCore!";
628 return false; 633 return false;
629 } 634 }
630 g_native_content_view = GetFieldID(env, clazz, "mNativeContentViewCore", "I"); 635 g_native_content_view = GetFieldID(env, clazz, "mNativeContentViewCore", "I");
631 636
632 return RegisterNativesImpl(env) >= 0; 637 return RegisterNativesImpl(env) >= 0;
633 } 638 }
634 639
635 } // namespace content 640 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698