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

Unified Diff: extensions/browser/api/guest_view/guest_view_internal_api.cc

Issue 618823002: GuestView: Move lifetime management out of content (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix extensionoptions cleanup Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
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() {
}

Powered by Google App Engine
This is Rietveld 408576698