diff options
author | joth@chromium.org <joth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-18 19:20:04 +0000 |
---|---|---|
committer | joth@chromium.org <joth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-18 19:20:04 +0000 |
commit | 225af4b19737e703ddca52f46b6b1c105feb9297 (patch) | |
tree | e53c4f9e875f5e3859fb06b55286ce1bc1865f41 /content | |
parent | cbfbbc4226a8770808368f5cef49567421ec778e (diff) | |
download | chromium_src-225af4b19737e703ddca52f46b6b1c105feb9297.zip chromium_src-225af4b19737e703ddca52f46b6b1c105feb9297.tar.gz chromium_src-225af4b19737e703ddca52f46b6b1c105feb9297.tar.bz2 |
Upstreaming ContentViewCore APIs for webview
This should make upstream and downstream API compatible for webview glue layer.
BUG=
Review URL: https://chromiumcodereview.appspot.com/11184034
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@162757 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
3 files changed, 16 insertions, 2 deletions
diff --git a/content/browser/android/content_view_core_impl.cc b/content/browser/android/content_view_core_impl.cc index 9120e66b..9470f40 100644 --- a/content/browser/android/content_view_core_impl.cc +++ b/content/browser/android/content_view_core_impl.cc @@ -18,6 +18,7 @@ #include "content/browser/renderer_host/render_view_host_impl.h" #include "content/browser/renderer_host/render_widget_host_impl.h" #include "content/browser/renderer_host/render_widget_host_view_android.h" +#include "content/browser/ssl/ssl_host_state.h" #include "content/browser/web_contents/navigation_controller_impl.h" #include "content/browser/web_contents/navigation_entry_impl.h" #include "content/browser/web_contents/web_contents_view_android.h" @@ -974,6 +975,12 @@ void ContentViewCoreImpl::ImeUpdateAdapter(int native_ime_adapter, show_ime_if_needed); } +void ContentViewCoreImpl::ClearSslPreferences(JNIEnv* env, jobject obj) { + SSLHostState* state = SSLHostState::GetFor( + web_contents_->GetController().GetBrowserContext()); + state->Clear(); +} + void ContentViewCoreImpl::SetUseDesktopUserAgent( JNIEnv* env, jobject obj, diff --git a/content/browser/android/content_view_core_impl.h b/content/browser/android/content_view_core_impl.h index 338ae87..ba5aa7c 100644 --- a/content/browser/android/content_view_core_impl.h +++ b/content/browser/android/content_view_core_impl.h @@ -156,6 +156,7 @@ class ContentViewCoreImpl : public ContentViewCore, void SetBackgroundColor(JNIEnv* env, jobject obj, jint color); void OnShow(JNIEnv* env, jobject obj); void OnHide(JNIEnv* env, jobject obj); + void ClearSslPreferences(JNIEnv* env, jobject /* obj */); void SetUseDesktopUserAgent(JNIEnv* env, jobject /* obj */, jboolean state, diff --git a/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java b/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java index b077e45..62a7c42 100644 --- a/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java +++ b/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java @@ -987,7 +987,7 @@ public class ContentViewCore implements MotionEventDelegate { * @see View#onAttachedToWindow() */ @SuppressWarnings("javadoc") - protected void onAttachedToWindow() { + public void onAttachedToWindow() { setAccessibilityState(true); } @@ -995,7 +995,7 @@ public class ContentViewCore implements MotionEventDelegate { * @see View#onDetachedFromWindow() */ @SuppressWarnings("javadoc") - protected void onDetachedFromWindow() { + public void onDetachedFromWindow() { setAccessibilityState(false); } @@ -1579,6 +1579,10 @@ public class ContentViewCore implements MotionEventDelegate { } } + public void clearSslPreferences() { + nativeClearSslPreferences(mNativeContentViewCore); + } + /** * @return Whether the native ContentView has crashed. */ @@ -2183,6 +2187,8 @@ public class ContentViewCore implements MotionEventDelegate { boolean enabled, boolean reloadOnChange); private native boolean nativeGetUseDesktopUserAgent(int nativeContentViewCoreImpl); + private native void nativeClearSslPreferences(int nativeContentViewCoreImpl); + private native void nativeAddJavascriptInterface(int nativeContentViewCoreImpl, Object object, String name, boolean requireAnnotation); |