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

Unified 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: Using factory function ptr instead of passing object Created 7 years, 12 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 side-by-side diff with in-line comments
Download patch
Index: android_webview/native/aw_contents.cc
diff --git a/android_webview/native/aw_contents.cc b/android_webview/native/aw_contents.cc
index fbdc7105404dc1332c40a633a462cb11fa2320a7..0013f155b6bf0caa8be26a073cb17b836aeae9dc 100644
--- a/android_webview/native/aw_contents.cc
+++ b/android_webview/native/aw_contents.cc
@@ -6,7 +6,9 @@
#include <sys/system_properties.h>
+#include "android_webview/browser/aw_browser_context.h"
boliu_use_chromium_pls 2013/01/04 23:45:43 all the new includes in this file looks not needed
Kristian Monsen 2013/01/05 02:44:58 Done.
#include "android_webview/browser/aw_browser_main_parts.h"
+#include "android_webview/browser/aw_content_browser_client.h"
#include "android_webview/browser/net_disk_cache_remover.h"
#include "android_webview/browser/renderer_host/aw_render_view_host_ext.h"
#include "android_webview/browser/renderer_host/aw_resource_dispatcher_host_delegate.h"
@@ -28,6 +30,7 @@
#include "cc/layer.h"
#include "content/components/navigation_interception/intercept_navigation_delegate.h"
#include "content/public/browser/android/content_view_core.h"
+#include "content/public/browser/browser_context.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/cert_store.h"
#include "content/public/browser/navigation_entry.h"
@@ -647,6 +650,21 @@ bool RegisterAwContents(JNIEnv* env) {
return RegisterNativesImpl(env) >= 0;
}
+void AwContents::GeolocationShowPrompt(int render_process_id,
+ int render_view_id,
+ int bridge_id,
+ const GURL& requesting_frame) {
+ JNIEnv* env = AttachCurrentThread();
+ ScopedJavaLocalRef<jstring> j_requesting_frame(
+ ConvertUTF8ToJavaString(env, requesting_frame.spec()));
+ Java_AwContents_onGeolocationPermissionsShowPrompt(env,
+ java_ref_.get(env).obj(), render_process_id, render_view_id, bridge_id,
+ j_requesting_frame.obj());
+}
+
+void AwContents::GeolocationHidePrompt() {
boliu_use_chromium_pls 2013/01/04 23:45:43 TODO implement?
Kristian Monsen 2013/01/05 02:44:58 Done.
+}
+
jint AwContents::FindAllSync(JNIEnv* env, jobject obj, jstring search_string) {
return GetFindHelper()->FindAllSync(
ConvertJavaStringToUTF16(env, search_string));

Powered by Google App Engine
This is Rietveld 408576698