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

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

Issue 2179563003: Android: Remove ContentViewCore::GetLayer() from public interface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments Created 4 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
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/android/jni_android.h" 9 #include "base/android/jni_android.h"
10 #include "base/android/jni_array.h" 10 #include "base/android/jni_array.h"
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 web_contents->GetUserData(kContentViewUserDataKey)); 195 web_contents->GetUserData(kContentViewUserDataKey));
196 return data ? data->get() : NULL; 196 return data ? data->get() : NULL;
197 } 197 }
198 198
199 // static 199 // static
200 ContentViewCore* ContentViewCore::FromWebContents( 200 ContentViewCore* ContentViewCore::FromWebContents(
201 content::WebContents* web_contents) { 201 content::WebContents* web_contents) {
202 return ContentViewCoreImpl::FromWebContents(web_contents); 202 return ContentViewCoreImpl::FromWebContents(web_contents);
203 } 203 }
204 204
205 // static
206 ContentViewCore* ContentViewCore::GetNativeContentViewCore(JNIEnv* env,
207 jobject obj) {
208 return reinterpret_cast<ContentViewCore*>(
209 Java_ContentViewCore_getNativeContentViewCore(env, obj));
210 }
211
212 ContentViewCoreImpl::ContentViewCoreImpl( 205 ContentViewCoreImpl::ContentViewCoreImpl(
213 JNIEnv* env, 206 JNIEnv* env,
214 jobject obj, 207 jobject obj,
215 WebContents* web_contents, 208 WebContents* web_contents,
216 const base::android::JavaRef<jobject>& view_android_delegate, 209 const base::android::JavaRef<jobject>& view_android_delegate,
217 ui::WindowAndroid* window_android, 210 ui::WindowAndroid* window_android,
218 jobject java_bridge_retained_object_set) 211 jobject java_bridge_retained_object_set)
219 : WebContentsObserver(web_contents), 212 : WebContentsObserver(web_contents),
220 java_ref_(env, obj), 213 java_ref_(env, obj),
221 view_(view_android_delegate), 214 view_(view_android_delegate),
(...skipping 645 matching lines...) Expand 10 before | Expand all | Expand 10 after
867 860
868 const base::android::JavaRef<jobject>& 861 const base::android::JavaRef<jobject>&
869 ContentViewCoreImpl::GetViewAndroidDelegate() const { 862 ContentViewCoreImpl::GetViewAndroidDelegate() const {
870 return view_.GetViewAndroidDelegate(); 863 return view_.GetViewAndroidDelegate();
871 } 864 }
872 865
873 ui::WindowAndroid* ContentViewCoreImpl::GetWindowAndroid() const { 866 ui::WindowAndroid* ContentViewCoreImpl::GetWindowAndroid() const {
874 return view_.GetWindowAndroid(); 867 return view_.GetWindowAndroid();
875 } 868 }
876 869
877 cc::Layer* ContentViewCoreImpl::GetLayer() const {
878 return view_.GetLayer();
879 }
880
881 ui::ViewAndroid* ContentViewCoreImpl::GetViewAndroid() { 870 ui::ViewAndroid* ContentViewCoreImpl::GetViewAndroid() {
882 return &view_; 871 return &view_;
883 } 872 }
884 873
885 874
886 // ---------------------------------------------------------------------------- 875 // ----------------------------------------------------------------------------
887 // Methods called from Java via JNI 876 // Methods called from Java via JNI
888 // ---------------------------------------------------------------------------- 877 // ----------------------------------------------------------------------------
889 878
890 void ContentViewCoreImpl::SelectPopupMenuItems( 879 void ContentViewCoreImpl::SelectPopupMenuItems(
(...skipping 757 matching lines...) Expand 10 before | Expand all | Expand 10 after
1648 return ScopedJavaLocalRef<jobject>(); 1637 return ScopedJavaLocalRef<jobject>();
1649 1638
1650 return view->GetJavaObject(); 1639 return view->GetJavaObject();
1651 } 1640 }
1652 1641
1653 bool RegisterContentViewCore(JNIEnv* env) { 1642 bool RegisterContentViewCore(JNIEnv* env) {
1654 return RegisterNativesImpl(env) && JNI_DragEvent::RegisterNativesImpl(env); 1643 return RegisterNativesImpl(env) && JNI_DragEvent::RegisterNativesImpl(env);
1655 } 1644 }
1656 1645
1657 } // namespace content 1646 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/android/content_view_core_impl.h ('k') | content/browser/android/content_view_render_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698