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

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

Issue 1663013005: [DO NOT REVIEW] Always calling Notify for android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Trying to Fix MAC 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 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 guest_->SendMessageToEmbedder( 337 guest_->SendMessageToEmbedder(
338 new BrowserPluginMsg_SetCursor(guest_->browser_plugin_instance_id(), 338 new BrowserPluginMsg_SetCursor(guest_->browser_plugin_instance_id(),
339 cursor)); 339 cursor));
340 340
341 } 341 }
342 342
343 void RenderWidgetHostViewGuest::SetIsLoading(bool is_loading) { 343 void RenderWidgetHostViewGuest::SetIsLoading(bool is_loading) {
344 platform_view_->SetIsLoading(is_loading); 344 platform_view_->SetIsLoading(is_loading);
345 } 345 }
346 346
347 void RenderWidgetHostViewGuest::TextInputStateChanged(
348 const ViewHostMsg_TextInputState_Params& params) {
349 if (!guest_)
350 return;
351
352 RenderWidgetHostViewBase* rwhv = GetOwnerRenderWidgetHostView();
353 if (!rwhv)
354 return;
355 // Forward the information to embedding RWHV.
356 rwhv->TextInputStateChanged(params);
357 }
358
359 void RenderWidgetHostViewGuest::ImeCancelComposition() { 347 void RenderWidgetHostViewGuest::ImeCancelComposition() {
360 if (!guest_) 348 if (!guest_)
361 return; 349 return;
362 350
363 RenderWidgetHostViewBase* rwhv = GetOwnerRenderWidgetHostView(); 351 RenderWidgetHostViewBase* rwhv = GetOwnerRenderWidgetHostView();
364 if (!rwhv) 352 if (!rwhv)
365 return; 353 return;
366 // Forward the information to embedding RWHV. 354 // Forward the information to embedding RWHV.
367 rwhv->ImeCancelComposition(); 355 rwhv->ImeCancelComposition();
368 } 356 }
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
509 497
510 void RenderWidgetHostViewGuest::UnlockCompositingSurface() { 498 void RenderWidgetHostViewGuest::UnlockCompositingSurface() {
511 NOTIMPLEMENTED(); 499 NOTIMPLEMENTED();
512 } 500 }
513 501
514 void RenderWidgetHostViewGuest::DestroyGuestView() { 502 void RenderWidgetHostViewGuest::DestroyGuestView() {
515 // Let our observers know we're going away, since we don't want any event 503 // Let our observers know we're going away, since we don't want any event
516 // processing calls coming in after we release host_. 504 // processing calls coming in after we release host_.
517 NotifyObserversAboutShutdown(); 505 NotifyObserversAboutShutdown();
518 506
507 // The WebContentsImpl should be notified about us so that it will not hold
508 // an invalid text input state which was due to active text on this view.
509 NotifyHostDelegateAboutShutdown();
510
519 host_->SetView(NULL); 511 host_->SetView(NULL);
520 host_ = NULL; 512 host_ = NULL;
521 base::MessageLoop::current()->DeleteSoon(FROM_HERE, this); 513 base::MessageLoop::current()->DeleteSoon(FROM_HERE, this);
522 } 514 }
523 515
524 RenderWidgetHostViewBase* 516 RenderWidgetHostViewBase*
525 RenderWidgetHostViewGuest::GetOwnerRenderWidgetHostView() const { 517 RenderWidgetHostViewGuest::GetOwnerRenderWidgetHostView() const {
526 return static_cast<RenderWidgetHostViewBase*>( 518 return static_cast<RenderWidgetHostViewBase*>(
527 guest_->GetOwnerRenderWidgetHostView()); 519 guest_->GetOwnerRenderWidgetHostView());
528 } 520 }
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
614 if (gesture_event.type == blink::WebInputEvent::GestureScrollUpdate && 606 if (gesture_event.type == blink::WebInputEvent::GestureScrollUpdate &&
615 gesture_event.data.scrollUpdate.inertial) { 607 gesture_event.data.scrollUpdate.inertial) {
616 return; 608 return;
617 } 609 }
618 host_->ForwardGestureEvent(gesture_event); 610 host_->ForwardGestureEvent(gesture_event);
619 return; 611 return;
620 } 612 }
621 } 613 }
622 614
623 } // namespace content 615 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698