Chromium Code Reviews| Index: content/browser/android/content_view_core_impl.cc |
| diff --git a/content/browser/android/content_view_core_impl.cc b/content/browser/android/content_view_core_impl.cc |
| index 52f3f2acf1d95a87ebbdeccc7f98644e2c495beb..5ba83e7315e19a673c03d79be95a973f1ca8646e 100644 |
| --- a/content/browser/android/content_view_core_impl.cc |
| +++ b/content/browser/android/content_view_core_impl.cc |
| @@ -819,25 +819,6 @@ scoped_refptr<cc::Layer> ContentViewCoreImpl::GetLayer() const { |
| // Methods called from Java via JNI |
| // ---------------------------------------------------------------------------- |
| -void ContentViewCoreImpl::SelectPopupMenuItems(JNIEnv* env, jobject obj, |
| - jintArray indices) { |
| - RenderViewHostImpl* rvhi = static_cast<RenderViewHostImpl*>( |
| - web_contents_->GetRenderViewHost()); |
| - DCHECK(rvhi); |
| - if (indices == NULL) { |
| - rvhi->DidCancelPopupMenu(); |
| - return; |
| - } |
| - |
| - int selected_count = env->GetArrayLength(indices); |
| - std::vector<int> selected_indices; |
| - jint* indices_ptr = env->GetIntArrayElements(indices, NULL); |
| - for (int i = 0; i < selected_count; ++i) |
| - selected_indices.push_back(indices_ptr[i]); |
| - env->ReleaseIntArrayElements(indices, indices_ptr, JNI_ABORT); |
| - rvhi->DidSelectPopupMenuItems(selected_indices); |
| -} |
| - |
| void ContentViewCoreImpl::LoadUrl( |
| JNIEnv* env, jobject obj, |
| jstring url, |
| @@ -895,15 +876,6 @@ void ContentViewCoreImpl::LoadUrl( |
| LoadUrl(params); |
| } |
| -ScopedJavaLocalRef<jstring> ContentViewCoreImpl::GetURL( |
| - JNIEnv* env, jobject) const { |
| - return ConvertUTF8ToJavaString(env, GetWebContents()->GetURL().spec()); |
| -} |
| - |
| -jboolean ContentViewCoreImpl::IsIncognito(JNIEnv* env, jobject obj) { |
| - return GetWebContents()->GetBrowserContext()->IsOffTheRecord(); |
| -} |
| - |
| WebContents* ContentViewCoreImpl::GetWebContents() const { |
| return web_contents_; |
| } |
| @@ -1157,33 +1129,6 @@ void ContentViewCoreImpl::MoveCaret(JNIEnv* env, jobject obj, |
| } |
| } |
| -void ContentViewCoreImpl::HideTextHandles(JNIEnv* env, jobject obj) { |
| - if (GetRenderWidgetHostViewAndroid()) |
| - GetRenderWidgetHostViewAndroid()->HideTextHandles(); |
| -} |
| - |
| -void ContentViewCoreImpl::ResetGestureDetection(JNIEnv* env, jobject obj) { |
| - RenderWidgetHostViewAndroid* rwhv = GetRenderWidgetHostViewAndroid(); |
|
Yaron
2014/07/29 00:05:58
Ted, feel free to disagree but I'm thinking to not
AKVT
2014/07/29 04:01:30
@Yaron MoveCaret() requires dpi_scale. I was not s
Ted C
2014/07/30 17:46:58
I agree. For now, only things that directly deal
|
| - if (rwhv) |
| - rwhv->ResetGestureDetection(); |
| -} |
| - |
| -void ContentViewCoreImpl::SetDoubleTapSupportEnabled(JNIEnv* env, |
| - jobject obj, |
| - jboolean enabled) { |
| - RenderWidgetHostViewAndroid* rwhv = GetRenderWidgetHostViewAndroid(); |
| - if (rwhv) |
| - rwhv->SetDoubleTapSupportEnabled(enabled); |
| -} |
| - |
| -void ContentViewCoreImpl::SetMultiTouchZoomSupportEnabled(JNIEnv* env, |
| - jobject obj, |
| - jboolean enabled) { |
| - RenderWidgetHostViewAndroid* rwhv = GetRenderWidgetHostViewAndroid(); |
| - if (rwhv) |
| - rwhv->SetMultiTouchZoomSupportEnabled(enabled); |
| -} |
| - |
| void ContentViewCoreImpl::ClearHistory(JNIEnv* env, jobject obj) { |
| // TODO(creis): Do callers of this need to know if it fails? |
| if (web_contents_->GetController().CanPruneAllButLastCommitted()) |
| @@ -1502,56 +1447,11 @@ void ContentViewCoreImpl::ExtractSmartClipData(JNIEnv* env, |
| GetWebContents()->GetRoutingID(), rect)); |
| } |
| -void ContentViewCoreImpl::ResumeResponseDeferredAtStart(JNIEnv* env, |
| - jobject obj) { |
| - static_cast<WebContentsImpl*>(GetWebContents())-> |
| - ResumeResponseDeferredAtStart(); |
| -} |
| - |
| -void ContentViewCoreImpl::SetHasPendingNavigationTransitionForTesting( |
| - JNIEnv* env, |
| - jobject obj) { |
| - RenderFrameHost* frame = static_cast<WebContentsImpl*>(GetWebContents())-> |
| - GetMainFrame(); |
| - BrowserThread::PostTask( |
| - BrowserThread::IO, |
| - FROM_HERE, |
| - base::Bind( |
| - &TransitionRequestManager::SetHasPendingTransitionRequest, |
| - base::Unretained(TransitionRequestManager::GetInstance()), |
| - frame->GetProcess()->GetID(), |
| - frame->GetRoutingID(), |
| - true)); |
| -} |
| - |
| jint ContentViewCoreImpl::GetCurrentRenderProcessId(JNIEnv* env, jobject obj) { |
| return GetRenderProcessIdFromRenderViewHost( |
| web_contents_->GetRenderViewHost()); |
| } |
| -void ContentViewCoreImpl::SetBackgroundOpaque(JNIEnv* env, jobject jobj, |
| - jboolean opaque) { |
| - if (GetRenderWidgetHostViewAndroid()) |
| - GetRenderWidgetHostViewAndroid()->SetBackgroundOpaque(opaque); |
| -} |
| - |
| -void ContentViewCoreImpl::RequestTextSurroundingSelection( |
| - int max_length, |
| - const base::Callback< |
| - void(const base::string16& content, int start_offset, int end_offset)>& |
| - callback) { |
| - DCHECK(!callback.is_null()); |
| - RenderFrameHost* focused_frame = web_contents_->GetFocusedFrame(); |
| - if (!focused_frame) |
| - return; |
| - if (GetRenderWidgetHostViewAndroid()) { |
| - GetRenderWidgetHostViewAndroid()->SetTextSurroundingSelectionCallback( |
| - callback); |
| - focused_frame->Send(new FrameMsg_TextSurroundingSelectionRequest( |
| - focused_frame->GetRoutingID(), max_length)); |
| - } |
| -} |
| - |
| void ContentViewCoreImpl::DidDeferAfterResponseStarted( |
| const scoped_refptr<net::HttpResponseHeaders>& headers, |
| const GURL& url) { |