Commit 36458f22 authored by Ivan Sandrk's avatar Ivan Sandrk Committed by Commit Bot

[Locked Fullscreen] Disable ARC while in locked fullscreen

Locked fullscreen is supposed to be a secure mode where the user cannot do
anything outside of the current browser window, but ARC apps can currently draw
on top of it.  To fix this, we disable ARC when entering the mode, and we
re-enable it upon exiting the mode.

Bug: 888611
Change-Id: I84cda87a260a42108f1ef6c4767c174bc8b1fb61
Reviewed-on: https://chromium-review.googlesource.com/c/1356813Reviewed-by: default avatarKaran Bhatia <karandeepb@chromium.org>
Commit-Queue: Ivan Šandrk <isandrk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#613254}
parent 2b583157
...@@ -100,6 +100,7 @@ ...@@ -100,6 +100,7 @@
#include "ash/public/cpp/window_pin_type.h" #include "ash/public/cpp/window_pin_type.h"
#include "ash/public/cpp/window_properties.h" #include "ash/public/cpp/window_properties.h"
#include "ash/public/interfaces/window_pin_type.mojom.h" #include "ash/public/interfaces/window_pin_type.mojom.h"
#include "chrome/browser/chromeos/arc/arc_util.h"
#include "chrome/browser/ui/ash/chrome_screenshot_grabber.h" #include "chrome/browser/ui/ash/chrome_screenshot_grabber.h"
#include "chrome/browser/ui/browser_command_controller.h" #include "chrome/browser/ui/browser_command_controller.h"
#include "content/public/browser/devtools_agent_host.h" #include "content/public/browser/devtools_agent_host.h"
...@@ -312,6 +313,11 @@ void SetLockedFullscreenState(Browser* browser, bool locked) { ...@@ -312,6 +313,11 @@ void SetLockedFullscreenState(Browser* browser, bool locked) {
// fullscreen (security concerns). // fullscreen (security concerns).
ui::Clipboard::GetForCurrentThread()->Clear(ui::CLIPBOARD_TYPE_COPY_PASTE); ui::Clipboard::GetForCurrentThread()->Clear(ui::CLIPBOARD_TYPE_COPY_PASTE);
content::DevToolsAgentHost::DetachAllClients(); content::DevToolsAgentHost::DetachAllClients();
// Disable ARC while in the locked fullscreen mode.
Profile* const profile = browser->profile();
if (arc::IsArcAllowedForProfile(profile))
arc::SetArcPlayStoreEnabledForProfile(profile, !locked);
} }
#endif // defined(OS_CHROMEOS) #endif // defined(OS_CHROMEOS)
......
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