Commit 5fe6f745 authored by Dave Tapuska's avatar Dave Tapuska Committed by Commit Bot

Remove GuestViewMsg_GuestDetached.

DidDetach wasn't getting called and there was no receiver for the
message anymore. So all of this code is dead. Remove it.

BUG=993189,533069

Change-Id: I71b712fd0f21a89ab60cd1c509afbb6e02604a23
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2505126Reviewed-by: default avatarKen Buchanan <kenrb@chromium.org>
Reviewed-by: default avatarKevin McNee <mcnee@chromium.org>
Reviewed-by: default avatarJames MacLean <wjmaclean@chromium.org>
Commit-Queue: Dave Tapuska <dtapuska@chromium.org>
Cr-Commit-Position: refs/heads/master@{#821839}
parent e0896bf6
......@@ -416,18 +416,6 @@ void GuestViewBase::DidAttach(int guest_proxy_routing_id) {
SendQueuedEvents();
}
// TODO(wjmaclean): Delete this when browser plugin goes away;
// https://crbug.com/533069 .
void GuestViewBase::DidDetach() {
GuestViewManager::FromBrowserContext(browser_context_)->DetachGuest(this);
StopTrackingEmbedderZoomLevel();
owner_web_contents()->GetMainFrame()->GetRenderViewHost()->Send(
new GuestViewMsg_GuestDetached(element_instance_id_));
element_instance_id_ = kInstanceIDNone;
if (ShouldDestroyOnDetach())
Destroy(true);
}
WebContents* GuestViewBase::GetOwnerWebContents() {
return owner_web_contents_;
}
......
......@@ -339,7 +339,6 @@ class GuestViewBase : public content::BrowserPluginGuestDelegate,
// TODO(533069): Remove since BrowserPlugin has been removed.
void DidAttach(int guest_proxy_routing_id);
void DidDetach();
void WillAttach(content::WebContents* embedder_web_contents,
int browser_plugin_instance_id,
bool is_full_page_plugin,
......
......@@ -24,13 +24,6 @@ IPC_MESSAGE_CONTROL2(GuestViewMsg_GuestAttached,
int /* element_instance_id */,
int /* source_routing_id */)
// This IPC tells the browser process to detach the provided
// |element_instance_id| from a GuestViewBase if it is attached to one.
// In other words, routing of input and graphics will no longer flow through
// the container associated with the provided ID.
IPC_MESSAGE_CONTROL1(GuestViewMsg_GuestDetached,
int /* element_instance_id*/)
// Messages sent from the renderer to the browser.
// Sent by the renderer to set initialization parameters of a Browser Plugin
......
......@@ -101,23 +101,4 @@ void GuestViewAttachRequest::HandleResponse(const IPC::Message& message) {
ExecuteCallbackIfAvailable(argc, std::move(argv));
}
GuestViewDetachRequest::GuestViewDetachRequest(
GuestViewContainer* container,
v8::Local<v8::Function> callback,
v8::Isolate* isolate)
: GuestViewRequest(container, callback, isolate) {
}
GuestViewDetachRequest::~GuestViewDetachRequest() {
}
void GuestViewDetachRequest::PerformRequest() {
// TODO(wjmaclean): Remove this function.
}
void GuestViewDetachRequest::HandleResponse(const IPC::Message& message) {
DCHECK(message.type() == GuestViewMsg_GuestDetached::ID);
ExecuteCallbackIfAvailable(0 /* argc */, nullptr);
}
} // namespace guest_view
......@@ -78,23 +78,6 @@ class GuestViewAttachRequest : public GuestViewRequest {
DISALLOW_COPY_AND_ASSIGN(GuestViewAttachRequest);
};
// This class represents a DetachGuest request from Javascript. The Detach
// operation may not execute immediately, if the container is not ready or if
// there are other GuestViewRequests in flight.
class GuestViewDetachRequest : public GuestViewRequest {
public:
GuestViewDetachRequest(GuestViewContainer* container,
v8::Local<v8::Function> callback,
v8::Isolate* isolate);
~GuestViewDetachRequest() override;
void PerformRequest() override;
void HandleResponse(const IPC::Message& message) override;
private:
DISALLOW_COPY_AND_ASSIGN(GuestViewDetachRequest);
};
} // namespace guest_view
#endif // COMPONENTS_GUEST_VIEW_RENDERER_GUEST_VIEW_CONTAINER_H_
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment