Commit ddac321e authored by François Beaufort's avatar François Beaufort Committed by Commit Bot

Support "Back to tab" for Chrome app windows

This CL makes sure ActivateContents() is implemented for Chrome App
windows so that Back to Tab button in the Picture-in-Picture window
focuses back the window.

Bug: 938250
Change-Id: I4814c52553b8b938bff4005f032a3f83f2e54ce8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1503255Reviewed-by: default avatarDevlin <rdevlin.cronin@chromium.org>
Commit-Queue: François Beaufort <beaufort.francois@gmail.com>
Cr-Commit-Position: refs/heads/master@{#638030}
parent a0a728b5
...@@ -881,6 +881,10 @@ void AppWindow::UpdateNativeAlwaysOnTop() { ...@@ -881,6 +881,10 @@ void AppWindow::UpdateNativeAlwaysOnTop() {
} }
} }
void AppWindow::ActivateContents(WebContents* contents) {
native_app_window_->Activate();
}
void AppWindow::CloseContents(WebContents* contents) { void AppWindow::CloseContents(WebContents* contents) {
native_app_window_->Close(); native_app_window_->Close();
} }
......
...@@ -391,6 +391,7 @@ class AppWindow : public content::WebContentsDelegate, ...@@ -391,6 +391,7 @@ class AppWindow : public content::WebContentsDelegate,
friend class PlatformAppBrowserTest; friend class PlatformAppBrowserTest;
// content::WebContentsDelegate implementation. // content::WebContentsDelegate implementation.
void ActivateContents(content::WebContents* contents) override;
void CloseContents(content::WebContents* contents) override; void CloseContents(content::WebContents* contents) override;
bool ShouldSuppressDialogs(content::WebContents* source) override; bool ShouldSuppressDialogs(content::WebContents* source) override;
content::ColorChooser* OpenColorChooser( content::ColorChooser* OpenColorChooser(
......
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