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

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: Merged 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 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 } else { 341 } else {
342 guest_->SendMessageToEmbedder(new BrowserPluginMsg_SetCursor( 342 guest_->SendMessageToEmbedder(new BrowserPluginMsg_SetCursor(
343 guest_->browser_plugin_instance_id(), cursor)); 343 guest_->browser_plugin_instance_id(), cursor));
344 } 344 }
345 } 345 }
346 346
347 void RenderWidgetHostViewGuest::SetIsLoading(bool is_loading) { 347 void RenderWidgetHostViewGuest::SetIsLoading(bool is_loading) {
348 platform_view_->SetIsLoading(is_loading); 348 platform_view_->SetIsLoading(is_loading);
349 } 349 }
350 350
351 void RenderWidgetHostViewGuest::TextInputStateChanged(
352 const ViewHostMsg_TextInputState_Params& params) {
353 if (!guest_)
354 return;
355
356 RenderWidgetHostViewBase* rwhv = GetOwnerRenderWidgetHostView();
357 if (!rwhv)
358 return;
359 // Forward the information to embedding RWHV.
360 rwhv->TextInputStateChanged(params);
361 }
362
363 void RenderWidgetHostViewGuest::ImeCancelComposition() { 351 void RenderWidgetHostViewGuest::ImeCancelComposition() {
364 if (!guest_) 352 if (!guest_)
365 return; 353 return;
366 354
367 RenderWidgetHostViewBase* rwhv = GetOwnerRenderWidgetHostView(); 355 RenderWidgetHostViewBase* rwhv = GetOwnerRenderWidgetHostView();
368 if (!rwhv) 356 if (!rwhv)
369 return; 357 return;
370 // Forward the information to embedding RWHV. 358 // Forward the information to embedding RWHV.
371 rwhv->ImeCancelComposition(); 359 rwhv->ImeCancelComposition();
372 } 360 }
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
499 487
500 void RenderWidgetHostViewGuest::UnlockCompositingSurface() { 488 void RenderWidgetHostViewGuest::UnlockCompositingSurface() {
501 NOTIMPLEMENTED(); 489 NOTIMPLEMENTED();
502 } 490 }
503 491
504 void RenderWidgetHostViewGuest::DestroyGuestView() { 492 void RenderWidgetHostViewGuest::DestroyGuestView() {
505 // Let our observers know we're going away, since we don't want any event 493 // Let our observers know we're going away, since we don't want any event
506 // processing calls coming in after we release host_. 494 // processing calls coming in after we release host_.
507 NotifyObserversAboutShutdown(); 495 NotifyObserversAboutShutdown();
508 496
497 // The WebContentsImpl should be notified about us so that it will not hold
498 // an invalid text input state which was due to active text on this view.
499 NotifyHostDelegateAboutShutdown();
500
509 host_->SetView(NULL); 501 host_->SetView(NULL);
510 host_ = NULL; 502 host_ = NULL;
511 base::MessageLoop::current()->DeleteSoon(FROM_HERE, this); 503 base::MessageLoop::current()->DeleteSoon(FROM_HERE, this);
512 } 504 }
513 505
514 RenderWidgetHostViewBase* 506 RenderWidgetHostViewBase*
515 RenderWidgetHostViewGuest::GetOwnerRenderWidgetHostView() const { 507 RenderWidgetHostViewGuest::GetOwnerRenderWidgetHostView() const {
516 return static_cast<RenderWidgetHostViewBase*>( 508 return static_cast<RenderWidgetHostViewBase*>(
517 guest_->GetOwnerRenderWidgetHostView()); 509 guest_->GetOwnerRenderWidgetHostView());
518 } 510 }
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
604 if (gesture_event.type == blink::WebInputEvent::GestureScrollUpdate && 596 if (gesture_event.type == blink::WebInputEvent::GestureScrollUpdate &&
605 gesture_event.data.scrollUpdate.inertial) { 597 gesture_event.data.scrollUpdate.inertial) {
606 return; 598 return;
607 } 599 }
608 host_->ForwardGestureEvent(gesture_event); 600 host_->ForwardGestureEvent(gesture_event);
609 return; 601 return;
610 } 602 }
611 } 603 }
612 604
613 } // namespace content 605 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698