Index: extensions/browser/api/guest_view/guest_view_internal_api.cc |
diff --git a/extensions/browser/api/guest_view/guest_view_internal_api.cc b/extensions/browser/api/guest_view/guest_view_internal_api.cc |
index 37109dc79c7e81b83073e7832e9eb7aca15498f3..a3971761c6056ac43d45e98f26d698c162ed5e25 100644 |
--- a/extensions/browser/api/guest_view/guest_view_internal_api.cc |
+++ b/extensions/browser/api/guest_view/guest_view_internal_api.cc |
@@ -65,6 +65,27 @@ void GuestViewInternalCreateGuestFunction::CreateGuestCallback( |
SendResponse(true); |
} |
+GuestViewInternalDestroyGuestFunction:: |
+ GuestViewInternalDestroyGuestFunction() { |
+} |
+ |
+GuestViewInternalDestroyGuestFunction:: |
+ ~GuestViewInternalDestroyGuestFunction() { |
+} |
+ |
+bool GuestViewInternalDestroyGuestFunction::RunAsync() { |
+ scoped_ptr<guest_view_internal::DestroyGuest::Params> params( |
+ guest_view_internal::DestroyGuest::Params::Create(*args_)); |
+ EXTENSION_FUNCTION_VALIDATE(params.get()); |
+ GuestViewBase* guest = GuestViewBase::From( |
+ render_view_host()->GetProcess()->GetID(), params->instance_id); |
+ if (!guest) |
+ return false; |
+ guest->Destroy(); |
+ SendResponse(true); |
+ return true; |
+} |
+ |
GuestViewInternalSetAutoSizeFunction:: |
GuestViewInternalSetAutoSizeFunction() { |
} |