Commit e4f9c359 authored by yilkal's avatar yilkal Committed by Commit Bot

Remove KioskNext code from TabletModeController in ChromeOs.

Bug: 977019
Change-Id: I4700f1c0a94951bccf0c521dde1b9790705f5f76
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1676875
Commit-Queue: Yilkal Abe <yilkal@chromium.org>
Reviewed-by: default avatarJames Cook <jamescook@chromium.org>
Reviewed-by: default avatarMichael Giuffrida <michaelpg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#676549}
parent c884b972
...@@ -8,7 +8,6 @@ ...@@ -8,7 +8,6 @@
#include <string> #include <string>
#include <utility> #include <utility>
#include "ash/kiosk_next/kiosk_next_shell_controller_impl.h"
#include "ash/public/cpp/ash_switches.h" #include "ash/public/cpp/ash_switches.h"
#include "ash/public/cpp/fps_counter.h" #include "ash/public/cpp/fps_counter.h"
#include "ash/public/cpp/shell_window_ids.h" #include "ash/public/cpp/shell_window_ids.h"
...@@ -303,8 +302,6 @@ TabletModeController::TabletModeController() ...@@ -303,8 +302,6 @@ TabletModeController::TabletModeController()
base::Unretained(this))); base::Unretained(this)));
} }
Shell::Get()->kiosk_next_shell_controller()->AddObserver(this);
chromeos::PowerManagerClient* power_manager_client = chromeos::PowerManagerClient* power_manager_client =
chromeos::PowerManagerClient::Get(); chromeos::PowerManagerClient::Get();
power_manager_client->AddObserver(this); power_manager_client->AddObserver(this);
...@@ -332,7 +329,6 @@ void TabletModeController::Shutdown() { ...@@ -332,7 +329,6 @@ void TabletModeController::Shutdown() {
tab_drag_in_splitview_count_); tab_drag_in_splitview_count_);
Shell::Get()->RemoveShellObserver(this); Shell::Get()->RemoveShellObserver(this);
Shell::Get()->kiosk_next_shell_controller()->RemoveObserver(this);
if (ShouldInitTabletModeController()) { if (ShouldInitTabletModeController()) {
Shell::Get()->window_tree_host_manager()->RemoveObserver(this); Shell::Get()->window_tree_host_manager()->RemoveObserver(this);
...@@ -618,11 +614,6 @@ void TabletModeController::OnDeviceListsComplete() { ...@@ -618,11 +614,6 @@ void TabletModeController::OnDeviceListsComplete() {
HandlePointingDeviceAddedOrRemoved(); HandlePointingDeviceAddedOrRemoved();
} }
void TabletModeController::OnKioskNextEnabled() {
tablet_mode_behavior_ = kLockInCurrentMode;
AttemptEnterTabletMode();
}
void TabletModeController::OnLayerAnimationStarted( void TabletModeController::OnLayerAnimationStarted(
ui::LayerAnimationSequence* sequence) {} ui::LayerAnimationSequence* sequence) {}
......
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
#include "ash/ash_export.h" #include "ash/ash_export.h"
#include "ash/bluetooth_devices_observer.h" #include "ash/bluetooth_devices_observer.h"
#include "ash/display/window_tree_host_manager.h" #include "ash/display/window_tree_host_manager.h"
#include "ash/kiosk_next/kiosk_next_shell_observer.h"
#include "ash/public/cpp/tablet_mode.h" #include "ash/public/cpp/tablet_mode.h"
#include "ash/session/session_observer.h" #include "ash/session/session_observer.h"
#include "ash/shell_observer.h" #include "ash/shell_observer.h"
...@@ -71,7 +70,6 @@ class ASH_EXPORT TabletModeController ...@@ -71,7 +70,6 @@ class ASH_EXPORT TabletModeController
public WindowTreeHostManager::Observer, public WindowTreeHostManager::Observer,
public SessionObserver, public SessionObserver,
public ui::InputDeviceEventObserver, public ui::InputDeviceEventObserver,
public KioskNextShellObserver,
public ui::LayerAnimationObserver { public ui::LayerAnimationObserver {
public: public:
// Enable or disable using a screenshot for testing as it makes the // Enable or disable using a screenshot for testing as it makes the
...@@ -149,9 +147,6 @@ class ASH_EXPORT TabletModeController ...@@ -149,9 +147,6 @@ class ASH_EXPORT TabletModeController
void OnInputDeviceConfigurationChanged(uint8_t input_device_types) override; void OnInputDeviceConfigurationChanged(uint8_t input_device_types) override;
void OnDeviceListsComplete() override; void OnDeviceListsComplete() override;
// KioskNextShellObserver:
void OnKioskNextEnabled() override;
// ui::LayerAnimationObserver: // ui::LayerAnimationObserver:
void OnLayerAnimationStarted(ui::LayerAnimationSequence* sequence) override; void OnLayerAnimationStarted(ui::LayerAnimationSequence* sequence) override;
void OnLayerAnimationEnded(ui::LayerAnimationSequence* sequence) override; void OnLayerAnimationEnded(ui::LayerAnimationSequence* sequence) override;
......
...@@ -1483,35 +1483,6 @@ TEST_F(TabletModeControllerTest, ...@@ -1483,35 +1483,6 @@ TEST_F(TabletModeControllerTest,
EXPECT_TRUE(Shell::Get()->overview_controller()->StartOverview()); EXPECT_TRUE(Shell::Get()->overview_controller()->StartOverview());
} }
// Test that when OnKioskNextEnabled() is called the UI mode changes into
// TabletMode. Ensure that UI mode keeps staying in Tablet Mode.
TEST_F(TabletModeControllerTest, TestKioskNextModeUI) {
ui::DeviceDataManagerTestApi().SetMouseDevices({});
ui::DeviceDataManagerTestApi().SetTouchpadDevices({});
ui::DeviceDataManagerTestApi().SetKeyboardDevices({});
tablet_mode_controller()->OnKioskNextEnabled();
EXPECT_TRUE(IsTabletModeStarted());
// Attach a mouse. Check that we are still in Tablet Mode.
ui::DeviceDataManagerTestApi().SetMouseDevices(
{ui::InputDevice(0, ui::InputDeviceType::INPUT_DEVICE_USB, "mouse")});
EXPECT_TRUE(IsTabletModeStarted());
ui::DeviceDataManagerTestApi().SetMouseDevices({});
// Attach Touchpad
ui::DeviceDataManagerTestApi().SetTouchpadDevices(
{ui::InputDevice(1, ui::InputDeviceType::INPUT_DEVICE_USB, "touchpad")});
EXPECT_TRUE(IsTabletModeStarted());
ui::DeviceDataManagerTestApi().SetTouchpadDevices({});
// Attach Keyboard
ui::DeviceDataManagerTestApi().SetKeyboardDevices(
{ui::InputDevice(2, ui::InputDeviceType::INPUT_DEVICE_USB, "keyboard")});
EXPECT_TRUE(IsTabletModeStarted());
ui::DeviceDataManagerTestApi().SetKeyboardDevices({});
}
// Test that tablet mode controller does not respond to the input device changes // Test that tablet mode controller does not respond to the input device changes
// during its suspend. // during its suspend.
TEST_F(TabletModeControllerTest, DoNotObserverInputDeviceChangeDuringSuspend) { TEST_F(TabletModeControllerTest, DoNotObserverInputDeviceChangeDuringSuspend) {
......
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