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

Side by Side Diff: android_webview/native/aw_contents.cc

Issue 11763002: Implementing native chromium GeolocationPermissionContext (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixing clang errors Created 7 years, 11 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 "android_webview/native/aw_contents.h" 5 #include "android_webview/native/aw_contents.h"
6 6
7 #include <sys/system_properties.h> 7 #include <sys/system_properties.h>
8 8
9 #include "android_webview/browser/aw_browser_main_parts.h" 9 #include "android_webview/browser/aw_browser_main_parts.h"
10 #include "android_webview/browser/net_disk_cache_remover.h" 10 #include "android_webview/browser/net_disk_cache_remover.h"
(...skipping 599 matching lines...) Expand 10 before | Expand all | Expand 10 after
610 jboolean private_browsing) { 610 jboolean private_browsing) {
611 AwContents* tab = new AwContents(env, obj, web_contents_delegate, 611 AwContents* tab = new AwContents(env, obj, web_contents_delegate,
612 private_browsing); 612 private_browsing);
613 return reinterpret_cast<jint>(tab); 613 return reinterpret_cast<jint>(tab);
614 } 614 }
615 615
616 bool RegisterAwContents(JNIEnv* env) { 616 bool RegisterAwContents(JNIEnv* env) {
617 return RegisterNativesImpl(env) >= 0; 617 return RegisterNativesImpl(env) >= 0;
618 } 618 }
619 619
620 void AwContents::OnGeolocationShowPrompt(int render_process_id,
621 int render_view_id,
622 int bridge_id,
623 const GURL& requesting_frame) {
624 JNIEnv* env = AttachCurrentThread();
625 ScopedJavaLocalRef<jstring> j_requesting_frame(
626 ConvertUTF8ToJavaString(env, requesting_frame.spec()));
627 Java_AwContents_onGeolocationPermissionsShowPrompt(env,
628 java_ref_.get(env).obj(), render_process_id, render_view_id, bridge_id,
629 j_requesting_frame.obj());
630 }
631
632 void AwContents::OnGeolocationHidePrompt() {
633 // TODO(kristianm): Implement this
634 }
635
620 jint AwContents::FindAllSync(JNIEnv* env, jobject obj, jstring search_string) { 636 jint AwContents::FindAllSync(JNIEnv* env, jobject obj, jstring search_string) {
621 return GetFindHelper()->FindAllSync( 637 return GetFindHelper()->FindAllSync(
622 ConvertJavaStringToUTF16(env, search_string)); 638 ConvertJavaStringToUTF16(env, search_string));
623 } 639 }
624 640
625 void AwContents::FindAllAsync(JNIEnv* env, jobject obj, jstring search_string) { 641 void AwContents::FindAllAsync(JNIEnv* env, jobject obj, jstring search_string) {
626 GetFindHelper()->FindAllAsync(ConvertJavaStringToUTF16(env, search_string)); 642 GetFindHelper()->FindAllAsync(ConvertJavaStringToUTF16(env, search_string));
627 } 643 }
628 644
629 void AwContents::FindNext(JNIEnv* env, jobject obj, jboolean forward) { 645 void AwContents::FindNext(JNIEnv* env, jobject obj, jboolean forward) {
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
839 CHECK_EQ(web_contents_->GetRenderProcessHost()->GetID(), process_id); 855 CHECK_EQ(web_contents_->GetRenderProcessHost()->GetID(), process_id);
840 if (render_view_id != web_contents_->GetRoutingID()) 856 if (render_view_id != web_contents_->GetRoutingID())
841 return; 857 return;
842 858
843 // TODO(leandrogracia): delete when sw rendering uses Ubercompositor. 859 // TODO(leandrogracia): delete when sw rendering uses Ubercompositor.
844 // Invalidation should be provided by the compositor only. 860 // Invalidation should be provided by the compositor only.
845 Invalidate(); 861 Invalidate();
846 } 862 }
847 863
848 } // namespace android_webview 864 } // namespace android_webview
OLDNEW
« no previous file with comments | « android_webview/native/aw_contents.h ('k') | android_webview/native/aw_geolocation_permission_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698