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

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

Issue 1889313002: Revert of Browser Side Text Input State Tracking for OOPIF (Manual). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
352 void RenderWidgetHostViewGuest::ImeCancelComposition() { 364 void RenderWidgetHostViewGuest::ImeCancelComposition() {
353 if (!guest_) 365 if (!guest_)
354 return; 366 return;
355 367
356 RenderWidgetHostViewBase* rwhv = GetOwnerRenderWidgetHostView(); 368 RenderWidgetHostViewBase* rwhv = GetOwnerRenderWidgetHostView();
357 if (!rwhv) 369 if (!rwhv)
358 return; 370 return;
359 // Forward the information to embedding RWHV. 371 // Forward the information to embedding RWHV.
360 rwhv->ImeCancelComposition(); 372 rwhv->ImeCancelComposition();
361 } 373 }
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
488 500
489 void RenderWidgetHostViewGuest::UnlockCompositingSurface() { 501 void RenderWidgetHostViewGuest::UnlockCompositingSurface() {
490 NOTIMPLEMENTED(); 502 NOTIMPLEMENTED();
491 } 503 }
492 504
493 void RenderWidgetHostViewGuest::DestroyGuestView() { 505 void RenderWidgetHostViewGuest::DestroyGuestView() {
494 // Let our observers know we're going away, since we don't want any event 506 // Let our observers know we're going away, since we don't want any event
495 // processing calls coming in after we release host_. 507 // processing calls coming in after we release host_.
496 NotifyObserversAboutShutdown(); 508 NotifyObserversAboutShutdown();
497 509
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
502 host_->SetView(NULL); 510 host_->SetView(NULL);
503 host_ = NULL; 511 host_ = NULL;
504 base::MessageLoop::current()->DeleteSoon(FROM_HERE, this); 512 base::MessageLoop::current()->DeleteSoon(FROM_HERE, this);
505 } 513 }
506 514
507 RenderWidgetHostViewBase* 515 RenderWidgetHostViewBase*
508 RenderWidgetHostViewGuest::GetOwnerRenderWidgetHostView() const { 516 RenderWidgetHostViewGuest::GetOwnerRenderWidgetHostView() const {
509 return static_cast<RenderWidgetHostViewBase*>( 517 return static_cast<RenderWidgetHostViewBase*>(
510 guest_->GetOwnerRenderWidgetHostView()); 518 guest_->GetOwnerRenderWidgetHostView());
511 } 519 }
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
597 if (gesture_event.type == blink::WebInputEvent::GestureScrollUpdate && 605 if (gesture_event.type == blink::WebInputEvent::GestureScrollUpdate &&
598 gesture_event.data.scrollUpdate.inertial) { 606 gesture_event.data.scrollUpdate.inertial) {
599 return; 607 return;
600 } 608 }
601 host_->ForwardGestureEvent(gesture_event); 609 host_->ForwardGestureEvent(gesture_event);
602 return; 610 return;
603 } 611 }
604 } 612 }
605 613
606 } // namespace content 614 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698