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

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

Issue 2460173003: Revert "Allow selection change update before beginBatchEdit" on M54 (Closed)
Patch Set: Created 4 years, 1 month 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 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 bool ImeAdapterAndroid::RequestTextInputStateUpdate( 282 bool ImeAdapterAndroid::RequestTextInputStateUpdate(
283 JNIEnv* env, 283 JNIEnv* env,
284 const JavaParamRef<jobject>&) { 284 const JavaParamRef<jobject>&) {
285 RenderWidgetHostImpl* rwhi = GetRenderWidgetHostImpl(); 285 RenderWidgetHostImpl* rwhi = GetRenderWidgetHostImpl();
286 if (!rwhi) 286 if (!rwhi)
287 return false; 287 return false;
288 rwhi->Send(new InputMsg_RequestTextInputStateUpdate(rwhi->GetRoutingID())); 288 rwhi->Send(new InputMsg_RequestTextInputStateUpdate(rwhi->GetRoutingID()));
289 return true; 289 return true;
290 } 290 }
291 291
292 bool ImeAdapterAndroid::BeginBatchEdit(
293 JNIEnv* env,
294 const JavaParamRef<jobject>&) {
295 RenderWidgetHostImpl* rwhi = GetRenderWidgetHostImpl();
296 if (!rwhi)
297 return false;
298 rwhi->Send(new InputMsg_ImeBatchEdit(rwhi->GetRoutingID(), true));
299 return true;
300 }
301
302 bool ImeAdapterAndroid::EndBatchEdit(
303 JNIEnv* env,
304 const JavaParamRef<jobject>&) {
305 RenderWidgetHostImpl* rwhi = GetRenderWidgetHostImpl();
306 if (!rwhi)
307 return false;
308 rwhi->Send(new InputMsg_ImeBatchEdit(rwhi->GetRoutingID(), false));
309 return true;
310 }
311
312 void ImeAdapterAndroid::RequestCursorUpdate( 292 void ImeAdapterAndroid::RequestCursorUpdate(
313 JNIEnv* env, 293 JNIEnv* env,
314 const base::android::JavaParamRef<jobject>& obj, 294 const base::android::JavaParamRef<jobject>& obj,
315 bool immediate_request, 295 bool immediate_request,
316 bool monitor_request) { 296 bool monitor_request) {
317 RenderWidgetHostImpl* rwhi = GetRenderWidgetHostImpl(); 297 RenderWidgetHostImpl* rwhi = GetRenderWidgetHostImpl();
318 if (!rwhi) 298 if (!rwhi)
319 return; 299 return;
320 rwhi->Send(new InputMsg_RequestCompositionUpdate( 300 rwhi->Send(new InputMsg_RequestCompositionUpdate(
321 rwhi->GetRoutingID(), immediate_request, monitor_request)); 301 rwhi->GetRoutingID(), immediate_request, monitor_request));
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 } 338 }
359 339
360 WebContents* ImeAdapterAndroid::GetWebContents() { 340 WebContents* ImeAdapterAndroid::GetWebContents() {
361 RenderWidgetHostImpl* rwh = GetRenderWidgetHostImpl(); 341 RenderWidgetHostImpl* rwh = GetRenderWidgetHostImpl();
362 if (!rwh) 342 if (!rwh)
363 return nullptr; 343 return nullptr;
364 return WebContents::FromRenderViewHost(RenderViewHost::From(rwh)); 344 return WebContents::FromRenderViewHost(RenderViewHost::From(rwh));
365 } 345 }
366 346
367 } // namespace content 347 } // 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_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698