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; |
lfg
2014/09/30 18:59:27
Maybe should provide feedback to the javascript AP
Fady Samuel
2014/09/30 22:50:03
This code is likely racy at tear down. The embedde
lfg
2014/09/30 23:29:42
Acknowledged.
|
+ guest->Destroy(); |
+ SendResponse(true); |
+ return true; |
+} |
+ |
GuestViewInternalSetAutoSizeFunction:: |
GuestViewInternalSetAutoSizeFunction() { |
} |