Commit 9a8de949 authored by James Cook's avatar James Cook Committed by Commit Bot

cros: Remove ash reference from ArcKioskAppLauncher

For mustash (out-of-process ash, see //ash/README.md) code in the
browser process cannot call directly into ash.

Pin the kiosk app window by setting a window property instead of
calling into ash code.

Test:
* Add logging to ArcKioskAppLauncher and deploy to Chromebook
* Enterprise enroll Chromebook to test domain
* Move Chromebook to ARC++ test organizational unit
* Sign in and allow policy to force-push app
* Sign out, observe app auto-launch
* Hit escape, see toast saying app is pinned fullscreen
* Observe logs in /var/log/ui/ui.LATEST

Bug: 756056
Change-Id: I8ac35030bf8b44429096a14ec9a6ad71617e85d8
Reviewed-on: https://chromium-review.googlesource.com/1037775Reviewed-by: default avatarSergey Poromov <poromov@chromium.org>
Commit-Queue: James Cook <jamescook@chromium.org>
Cr-Commit-Position: refs/heads/master@{#555397}
parent 63f65c0a
...@@ -7,7 +7,8 @@ ...@@ -7,7 +7,8 @@
#include <memory> #include <memory>
#include <string> #include <string>
#include "ash/wm/window_util.h" #include "ash/public/cpp/window_properties.h"
#include "ash/public/interfaces/window_pin_type.mojom.h"
#include "chrome/browser/ui/app_list/arc/arc_app_utils.h" #include "chrome/browser/ui/app_list/arc/arc_app_utils.h"
#include "chrome/browser/ui/ash/launcher/arc_app_window_launcher_controller.h" #include "chrome/browser/ui/ash/launcher/arc_app_window_launcher_controller.h"
#include "ui/aura/env.h" #include "ui/aura/env.h"
...@@ -78,7 +79,8 @@ bool ArcKioskAppLauncher::CheckAndPinWindow(aura::Window* const window) { ...@@ -78,7 +79,8 @@ bool ArcKioskAppLauncher::CheckAndPinWindow(aura::Window* const window) {
return false; return false;
// Stop observing as target window is already found. // Stop observing as target window is already found.
StopObserving(); StopObserving();
ash::wm::PinWindow(window, true /* trusted */); window->SetProperty(ash::kWindowPinTypeKey,
ash::mojom::WindowPinType::TRUSTED_PINNED);
if (delegate_) if (delegate_)
delegate_->OnAppWindowLaunched(); delegate_->OnAppWindowLaunched();
return true; return true;
......
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