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

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: Added comment 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;
+ guest->Destroy();
+ SendResponse(true);
+ return true;
+}
+
GuestViewInternalSetAutoSizeFunction::
GuestViewInternalSetAutoSizeFunction() {
}
« no previous file with comments | « extensions/browser/api/guest_view/guest_view_internal_api.h ('k') | extensions/browser/api/web_view/web_view_internal_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698