Commit 07fbe412 authored by Scott Violet's avatar Scott Violet Committed by Commit Bot

Revert "Fix text input on ARC++ Kiosk apps."

This reverts commit ce37f17d.

Reason for revert: Causes crash, see 903671

Original change's description:
> Fix text input on ARC++ Kiosk apps.
> 
> We changed IsInArcAppWindow() to use the window property,
> aura::client::kAppType, but it's not set for ARC++ Kiosk apps' window.
> It makes text input on ARC++ Kiosk apps stop working.
> This CL adds a temporary workaround for this situation. Ideally,
> IsArcAppWindow() in arc_util.cc should handle windows of ARC++ Kiosk app
> correctly.
> 
> Bug: 891825
> Test: Can type text on Wikipedia kiosk app.
> Change-Id: I594aa5c0730704b9ad922441187297bd707de20a
> Reviewed-on: https://chromium-review.googlesource.com/c/1291289
> Commit-Queue: Yusuke Sato <yusukes@chromium.org>
> Reviewed-by: Yusuke Sato <yusukes@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#601631}

TBR=yusukes@chromium.org,yhanada@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: 891825
Change-Id: Ic50a4bac3af3dfb7f8fd335bb669d3e620a4446a
Reviewed-on: https://chromium-review.googlesource.com/c/1330339Reviewed-by: default avatarScott Violet <sky@chromium.org>
Commit-Queue: Scott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/master@{#607011}
parent 05204431
......@@ -13,7 +13,6 @@
#include "components/arc/arc_browser_context_keyed_service_factory_base.h"
#include "components/arc/arc_util.h"
#include "components/arc/ime/arc_ime_bridge_impl.h"
#include "components/exo/shell_surface.h"
#include "components/exo/wm_helper.h"
#include "ui/aura/env.h"
#include "ui/aura/window.h"
......@@ -32,9 +31,6 @@ namespace arc {
namespace {
// TODO(yhanada): Remove this once IsArcAppWindow is fixed for ARC++ Kiosk app.
constexpr char kArcAppIdPrefix[] = "org.chromium.arc";
base::Optional<double> g_override_default_device_scale_factor;
double GetDefaultDeviceScaleFactor() {
......@@ -53,24 +49,9 @@ class ArcWindowDelegateImpl : public ArcImeService::ArcWindowDelegate {
~ArcWindowDelegateImpl() override = default;
bool IsInArcAppWindow(const aura::Window* window) const override {
aura::Window* active = exo::WMHelper::GetInstance()->GetActiveWindow();
for (; window; window = window->parent()) {
if (IsArcAppWindow(window))
return true;
// IsArcAppWindow returns false for a window of ARC++ Kiosk app, so we
// have to check application id of the active window to cover that case.
// TODO(yhanada): Make IsArcAppWindow support a window of ARC++ Kiosk.
// Specifically, a window of ARC++ Kiosk should have ash::AppType::ARC_APP
// property. Please see implementation of IsArcAppWindow().
if (window == active) {
const std::string* app_id = exo::ShellSurface::GetApplicationId(window);
if (IsArcKioskMode() && app_id &&
base::StartsWith(*app_id, kArcAppIdPrefix,
base::CompareCase::SENSITIVE)) {
return true;
}
}
}
return false;
}
......
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