Commit 2d19fb11 authored by fsamuel's avatar fsamuel Committed by Commit bot

GuestView: Double clicking a GuestView type in task manager should activate the embedder.

This is a useful debug aid and better matches the behavior of tabs.

BUG=none

Review URL: https://codereview.chromium.org/564933002

Cr-Commit-Position: refs/heads/master@{#294443}
parent 9f749456
......@@ -385,6 +385,22 @@ void GuestViewBase::WebContentsDestroyed() {
delete this;
}
void GuestViewBase::ActivateContents(WebContents* web_contents) {
if (!attached() || !embedder_web_contents()->GetDelegate())
return;
embedder_web_contents()->GetDelegate()->ActivateContents(
embedder_web_contents());
}
void GuestViewBase::DeactivateContents(WebContents* web_contents) {
if (!attached() || !embedder_web_contents()->GetDelegate())
return;
embedder_web_contents()->GetDelegate()->DeactivateContents(
embedder_web_contents());
}
void GuestViewBase::RunFileChooser(WebContents* web_contents,
const content::FileChooserParams& params) {
if (!attached() || !embedder_web_contents()->GetDelegate())
......
......@@ -273,6 +273,9 @@ class GuestViewBase : public content::BrowserPluginGuestDelegate,
virtual void WebContentsDestroyed() OVERRIDE FINAL;
// WebContentsDelegate implementation.
virtual void ActivateContents(content::WebContents* contents) OVERRIDE FINAL;
virtual void DeactivateContents(
content::WebContents* contents) OVERRIDE FINAL;
virtual void RunFileChooser(
content::WebContents* web_contents,
const content::FileChooserParams& params) OVERRIDE;
......
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