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

Side by Side Diff: content/browser/renderer_host/ime_adapter_android.cc

Issue 2210533004: Revert of Do not calculate composition bounds until IME requests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 (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 "content/browser/renderer_host/ime_adapter_android.h" 5 #include "content/browser/renderer_host/ime_adapter_android.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <android/input.h> 8 #include <android/input.h>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 bool ImeAdapterAndroid::RequestTextInputStateUpdate( 321 bool ImeAdapterAndroid::RequestTextInputStateUpdate(
322 JNIEnv* env, 322 JNIEnv* env,
323 const JavaParamRef<jobject>&) { 323 const JavaParamRef<jobject>&) {
324 RenderWidgetHostImpl* rwhi = GetRenderWidgetHostImpl(); 324 RenderWidgetHostImpl* rwhi = GetRenderWidgetHostImpl();
325 if (!rwhi) 325 if (!rwhi)
326 return false; 326 return false;
327 rwhi->Send(new InputMsg_RequestTextInputStateUpdate(rwhi->GetRoutingID())); 327 rwhi->Send(new InputMsg_RequestTextInputStateUpdate(rwhi->GetRoutingID()));
328 return true; 328 return true;
329 } 329 }
330 330
331 void ImeAdapterAndroid::RequestCursorUpdate(
332 JNIEnv* env,
333 const base::android::JavaParamRef<jobject>& obj,
334 bool immediate_request,
335 bool monitor_request) {
336 RenderWidgetHostImpl* rwhi = GetRenderWidgetHostImpl();
337 if (!rwhi)
338 return;
339 rwhi->Send(new InputMsg_RequestCompositionUpdate(
340 rwhi->GetRoutingID(), immediate_request, monitor_request));
341 }
342
343 bool ImeAdapterAndroid::IsImeThreadEnabled( 331 bool ImeAdapterAndroid::IsImeThreadEnabled(
344 JNIEnv* env, 332 JNIEnv* env,
345 const base::android::JavaParamRef<jobject>&) { 333 const base::android::JavaParamRef<jobject>&) {
346 return base::FeatureList::IsEnabled(features::kImeThread); 334 return base::FeatureList::IsEnabled(features::kImeThread);
347 } 335 }
348 336
349 void ImeAdapterAndroid::ResetImeAdapter(JNIEnv* env, 337 void ImeAdapterAndroid::ResetImeAdapter(JNIEnv* env,
350 const JavaParamRef<jobject>&) { 338 const JavaParamRef<jobject>&) {
351 java_ime_adapter_.reset(); 339 java_ime_adapter_.reset();
352 } 340 }
(...skipping 24 matching lines...) Expand all
377 } 365 }
378 366
379 WebContents* ImeAdapterAndroid::GetWebContents() { 367 WebContents* ImeAdapterAndroid::GetWebContents() {
380 RenderWidgetHostImpl* rwh = GetRenderWidgetHostImpl(); 368 RenderWidgetHostImpl* rwh = GetRenderWidgetHostImpl();
381 if (!rwh) 369 if (!rwh)
382 return nullptr; 370 return nullptr;
383 return WebContents::FromRenderViewHost(RenderViewHost::From(rwh)); 371 return WebContents::FromRenderViewHost(RenderViewHost::From(rwh));
384 } 372 }
385 373
386 } // namespace content 374 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/ime_adapter_android.h ('k') | content/browser/renderer_host/render_widget_host_view_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698