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

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: remove OS_ANDROID from render_widget.cc 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, const base::android::JavaParamRef<jobject>& obj,
333 bool immediate_request, bool monitor_request) {
nasko 2016/07/29 16:26:10 style: Each parameter should be on a separate line
Seigo Nonaka 2016/08/01 02:27:35 Done.
334 RenderWidgetHostImpl* rwhi = GetRenderWidgetHostImpl();
335 if (!rwhi)
336 return;
337 rwhi->Send(new InputMsg_RequestCompositionUpdate(
338 rwhi->GetRoutingID(), immediate_request, monitor_request));
339 }
340
331 bool ImeAdapterAndroid::IsImeThreadEnabled( 341 bool ImeAdapterAndroid::IsImeThreadEnabled(
332 JNIEnv* env, 342 JNIEnv* env,
333 const base::android::JavaParamRef<jobject>&) { 343 const base::android::JavaParamRef<jobject>&) {
334 return base::FeatureList::IsEnabled(features::kImeThread); 344 return base::FeatureList::IsEnabled(features::kImeThread);
335 } 345 }
336 346
337 void ImeAdapterAndroid::ResetImeAdapter(JNIEnv* env, 347 void ImeAdapterAndroid::ResetImeAdapter(JNIEnv* env,
338 const JavaParamRef<jobject>&) { 348 const JavaParamRef<jobject>&) {
339 java_ime_adapter_.reset(); 349 java_ime_adapter_.reset();
340 } 350 }
(...skipping 24 matching lines...) Expand all
365 } 375 }
366 376
367 WebContents* ImeAdapterAndroid::GetWebContents() { 377 WebContents* ImeAdapterAndroid::GetWebContents() {
368 RenderWidgetHostImpl* rwh = GetRenderWidgetHostImpl(); 378 RenderWidgetHostImpl* rwh = GetRenderWidgetHostImpl();
369 if (!rwh) 379 if (!rwh)
370 return nullptr; 380 return nullptr;
371 return WebContents::FromRenderViewHost(RenderViewHost::From(rwh)); 381 return WebContents::FromRenderViewHost(RenderViewHost::From(rwh));
372 } 382 }
373 383
374 } // namespace content 384 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698