| OLD | NEW |
| 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 523 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 534 gfx::NativeViewAccessible accessible_parent) { | 534 gfx::NativeViewAccessible accessible_parent) { |
| 535 } | 535 } |
| 536 | 536 |
| 537 gfx::NativeViewId RenderWidgetHostViewGuest::GetParentForWindowlessPlugin() | 537 gfx::NativeViewId RenderWidgetHostViewGuest::GetParentForWindowlessPlugin() |
| 538 const { | 538 const { |
| 539 return NULL; | 539 return NULL; |
| 540 } | 540 } |
| 541 #endif | 541 #endif |
| 542 | 542 |
| 543 void RenderWidgetHostViewGuest::DestroyGuestView() { | 543 void RenderWidgetHostViewGuest::DestroyGuestView() { |
| 544 UnregisterSurfaceNamespaceId(); | 544 // Let our observers know we're going away, since we don't want any event |
| 545 // processing calls coming in after we release host_. |
| 546 NotifyObserversAboutShutdown(); |
| 547 |
| 545 host_->SetView(NULL); | 548 host_->SetView(NULL); |
| 546 host_ = NULL; | 549 host_ = NULL; |
| 547 base::MessageLoop::current()->DeleteSoon(FROM_HERE, this); | 550 base::MessageLoop::current()->DeleteSoon(FROM_HERE, this); |
| 548 } | 551 } |
| 549 | 552 |
| 550 RenderWidgetHostViewBase* | 553 RenderWidgetHostViewBase* |
| 551 RenderWidgetHostViewGuest::GetOwnerRenderWidgetHostView() const { | 554 RenderWidgetHostViewGuest::GetOwnerRenderWidgetHostView() const { |
| 552 return static_cast<RenderWidgetHostViewBase*>( | 555 return static_cast<RenderWidgetHostViewBase*>( |
| 553 guest_->GetOwnerRenderWidgetHostView()); | 556 guest_->GetOwnerRenderWidgetHostView()); |
| 554 } | 557 } |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 640 if (gesture_event.type == blink::WebInputEvent::GestureScrollUpdate && | 643 if (gesture_event.type == blink::WebInputEvent::GestureScrollUpdate && |
| 641 gesture_event.data.scrollUpdate.inertial) { | 644 gesture_event.data.scrollUpdate.inertial) { |
| 642 return; | 645 return; |
| 643 } | 646 } |
| 644 host_->ForwardGestureEvent(gesture_event); | 647 host_->ForwardGestureEvent(gesture_event); |
| 645 return; | 648 return; |
| 646 } | 649 } |
| 647 } | 650 } |
| 648 | 651 |
| 649 } // namespace content | 652 } // namespace content |
| OLD | NEW |