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

Side by Side Diff: content/browser/frame_host/render_widget_host_view_guest.cc

Issue 1652483002: Browser Side Text Input State Tracking for OOPIF. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Moved the Test to web_view_interactive_browsertest.cc Created 4 years, 8 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/frame_host/render_widget_host_view_guest.h" 5 #include "content/browser/frame_host/render_widget_host_view_guest.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind_helpers.h" 9 #include "base/bind_helpers.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 } else { 342 } else {
343 guest_->SendMessageToEmbedder(new BrowserPluginMsg_SetCursor( 343 guest_->SendMessageToEmbedder(new BrowserPluginMsg_SetCursor(
344 guest_->browser_plugin_instance_id(), cursor)); 344 guest_->browser_plugin_instance_id(), cursor));
345 } 345 }
346 } 346 }
347 347
348 void RenderWidgetHostViewGuest::SetIsLoading(bool is_loading) { 348 void RenderWidgetHostViewGuest::SetIsLoading(bool is_loading) {
349 platform_view_->SetIsLoading(is_loading); 349 platform_view_->SetIsLoading(is_loading);
350 } 350 }
351 351
352 void RenderWidgetHostViewGuest::TextInputStateChanged(
353 const ViewHostMsg_TextInputState_Params& params) {
354 if (!guest_)
355 return;
356
357 RenderWidgetHostViewBase* rwhv = GetOwnerRenderWidgetHostView();
358 if (!rwhv)
359 return;
360 // Forward the information to embedding RWHV.
361 rwhv->TextInputStateChanged(params);
362 }
363
364 void RenderWidgetHostViewGuest::ImeCancelComposition() { 352 void RenderWidgetHostViewGuest::ImeCancelComposition() {
365 if (!guest_) 353 if (!guest_)
366 return; 354 return;
367 355
368 RenderWidgetHostViewBase* rwhv = GetOwnerRenderWidgetHostView(); 356 RenderWidgetHostViewBase* rwhv = GetOwnerRenderWidgetHostView();
369 if (!rwhv) 357 if (!rwhv)
370 return; 358 return;
371 // Forward the information to embedding RWHV. 359 // Forward the information to embedding RWHV.
372 rwhv->ImeCancelComposition(); 360 rwhv->ImeCancelComposition();
373 } 361 }
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
500 488
501 void RenderWidgetHostViewGuest::UnlockCompositingSurface() { 489 void RenderWidgetHostViewGuest::UnlockCompositingSurface() {
502 NOTIMPLEMENTED(); 490 NOTIMPLEMENTED();
503 } 491 }
504 492
505 void RenderWidgetHostViewGuest::DestroyGuestView() { 493 void RenderWidgetHostViewGuest::DestroyGuestView() {
506 // Let our observers know we're going away, since we don't want any event 494 // Let our observers know we're going away, since we don't want any event
507 // processing calls coming in after we release host_. 495 // processing calls coming in after we release host_.
508 NotifyObserversAboutShutdown(); 496 NotifyObserversAboutShutdown();
509 497
498 // The WebContentsImpl should be notified about us so that it will not hold
499 // an invalid text input state which was due to active text on this view.
500 NotifyHostDelegateAboutShutdown();
501
510 host_->SetView(NULL); 502 host_->SetView(NULL);
511 host_ = NULL; 503 host_ = NULL;
512 base::MessageLoop::current()->DeleteSoon(FROM_HERE, this); 504 base::MessageLoop::current()->DeleteSoon(FROM_HERE, this);
513 } 505 }
514 506
515 RenderWidgetHostViewBase* 507 RenderWidgetHostViewBase*
516 RenderWidgetHostViewGuest::GetOwnerRenderWidgetHostView() const { 508 RenderWidgetHostViewGuest::GetOwnerRenderWidgetHostView() const {
517 return static_cast<RenderWidgetHostViewBase*>( 509 return static_cast<RenderWidgetHostViewBase*>(
518 guest_->GetOwnerRenderWidgetHostView()); 510 guest_->GetOwnerRenderWidgetHostView());
519 } 511 }
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
605 if (gesture_event.type == blink::WebInputEvent::GestureScrollUpdate && 597 if (gesture_event.type == blink::WebInputEvent::GestureScrollUpdate &&
606 gesture_event.data.scrollUpdate.inertial) { 598 gesture_event.data.scrollUpdate.inertial) {
607 return; 599 return;
608 } 600 }
609 host_->ForwardGestureEvent(gesture_event); 601 host_->ForwardGestureEvent(gesture_event);
610 return; 602 return;
611 } 603 }
612 } 604 }
613 605
614 } // namespace content 606 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698