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

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

Issue 2121953002: Do not calculate composition bounds until IME requests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix test failures 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 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 bool ImeAdapterAndroid::RequestTextInputStateUpdate( 322 bool ImeAdapterAndroid::RequestTextInputStateUpdate(
323 JNIEnv* env, 323 JNIEnv* env,
324 const JavaParamRef<jobject>&) { 324 const JavaParamRef<jobject>&) {
325 RenderWidgetHostImpl* rwhi = GetRenderWidgetHostImpl(); 325 RenderWidgetHostImpl* rwhi = GetRenderWidgetHostImpl();
326 if (!rwhi) 326 if (!rwhi)
327 return false; 327 return false;
328 rwhi->Send(new InputMsg_RequestTextInputStateUpdate(rwhi->GetRoutingID())); 328 rwhi->Send(new InputMsg_RequestTextInputStateUpdate(rwhi->GetRoutingID()));
329 return true; 329 return true;
330 } 330 }
331 331
332 void ImeAdapterAndroid::RequestCursorUpdate(
333 JNIEnv* env,
334 const base::android::JavaParamRef<jobject>& obj,
335 bool immediate_request,
336 bool monitor_request) {
337 RenderWidgetHostImpl* rwhi = GetRenderWidgetHostImpl();
338 if (!rwhi)
339 return;
340 rwhi->Send(new InputMsg_RequestCompositionUpdate(
341 rwhi->GetRoutingID(), immediate_request, monitor_request));
342 }
343
332 bool ImeAdapterAndroid::IsImeThreadEnabled( 344 bool ImeAdapterAndroid::IsImeThreadEnabled(
333 JNIEnv* env, 345 JNIEnv* env,
334 const base::android::JavaParamRef<jobject>&) { 346 const base::android::JavaParamRef<jobject>&) {
335 return base::FeatureList::IsEnabled(features::kImeThread); 347 return base::FeatureList::IsEnabled(features::kImeThread);
336 } 348 }
337 349
338 void ImeAdapterAndroid::ResetImeAdapter(JNIEnv* env, 350 void ImeAdapterAndroid::ResetImeAdapter(JNIEnv* env,
339 const JavaParamRef<jobject>&) { 351 const JavaParamRef<jobject>&) {
340 java_ime_adapter_.reset(); 352 java_ime_adapter_.reset();
341 } 353 }
(...skipping 24 matching lines...) Expand all
366 } 378 }
367 379
368 WebContents* ImeAdapterAndroid::GetWebContents() { 380 WebContents* ImeAdapterAndroid::GetWebContents() {
369 RenderWidgetHostImpl* rwh = GetRenderWidgetHostImpl(); 381 RenderWidgetHostImpl* rwh = GetRenderWidgetHostImpl();
370 if (!rwh) 382 if (!rwh)
371 return nullptr; 383 return nullptr;
372 return WebContents::FromRenderViewHost(RenderViewHost::From(rwh)); 384 return WebContents::FromRenderViewHost(RenderViewHost::From(rwh));
373 } 385 }
374 386
375 } // namespace content 387 } // 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