Commit 03210167 authored by Darren Shen's avatar Darren Shen Committed by Commit Bot

vk: Delete fullscreen VK mode.

Fullscreen VK was abandoned a long time ago. It seems unlikely to make
a comeback. Let's just delete the dead code.

TBR=benwells@chromium.org

Bug: 845780
Change-Id: I1a31739c21948cc046caa9e8175e28508fe1f489
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1611625
Commit-Queue: Darren Shen <shend@chromium.org>
Reviewed-by: default avatarYuichiro Hanada <yhanada@chromium.org>
Reviewed-by: default avatarOliver Chang <ochang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#661236}
parent 6445aef9
...@@ -396,16 +396,10 @@ TEST_F(AshKeyboardControllerTest, SetContainerType) { ...@@ -396,16 +396,10 @@ TEST_F(AshKeyboardControllerTest, SetContainerType) {
target_bounds.size(), target_bounds.size(),
keyboard_controller()->GetKeyboardWindow()->GetTargetBounds().size()); keyboard_controller()->GetKeyboardWindow()->GetTargetBounds().size());
// Set the container type to kFullscreen.
EXPECT_TRUE(test_client()->SetContainerType(
keyboard::mojom::ContainerType::kFullscreen, base::nullopt));
EXPECT_EQ(keyboard::mojom::ContainerType::kFullscreen,
keyboard_controller()->GetActiveContainerType());
// Setting the container type to the current type should fail. // Setting the container type to the current type should fail.
EXPECT_FALSE(test_client()->SetContainerType( EXPECT_FALSE(test_client()->SetContainerType(
keyboard::mojom::ContainerType::kFullscreen, base::nullopt)); keyboard::mojom::ContainerType::kFloating, base::nullopt));
EXPECT_EQ(keyboard::mojom::ContainerType::kFullscreen, EXPECT_EQ(keyboard::mojom::ContainerType::kFloating,
keyboard_controller()->GetActiveContainerType()); keyboard_controller()->GetActiveContainerType());
} }
......
...@@ -19,8 +19,6 @@ jumbo_component("ui") { ...@@ -19,8 +19,6 @@ jumbo_component("ui") {
"container_floating_behavior.h", "container_floating_behavior.h",
"container_full_width_behavior.cc", "container_full_width_behavior.cc",
"container_full_width_behavior.h", "container_full_width_behavior.h",
"container_fullscreen_behavior.cc",
"container_fullscreen_behavior.h",
"display_util.cc", "display_util.cc",
"display_util.h", "display_util.h",
"drag_descriptor.h", "drag_descriptor.h",
......
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "ash/keyboard/ui/container_fullscreen_behavior.h"
#include "ui/aura/window.h"
namespace keyboard {
ContainerFullscreenBehavior::ContainerFullscreenBehavior(Delegate* delegate)
: ContainerFullWidthBehavior(delegate) {}
ContainerFullscreenBehavior::~ContainerFullscreenBehavior() {}
gfx::Rect ContainerFullscreenBehavior::AdjustSetBoundsRequest(
const gfx::Rect& display_bounds,
const gfx::Rect& requested_bounds_in_screen_coords) {
return display_bounds;
}
void ContainerFullscreenBehavior::SetCanonicalBounds(
aura::Window* container,
const gfx::Rect& display_bounds) {
container->SetBounds(display_bounds);
}
gfx::Rect ContainerFullscreenBehavior::GetOccludedBounds(
const gfx::Rect& visual_bounds_in_screen) const {
return occluded_bounds_;
}
mojom::ContainerType ContainerFullscreenBehavior::GetType() const {
return mojom::ContainerType::kFullscreen;
}
void ContainerFullscreenBehavior::SetOccludedBounds(
const gfx::Rect& occluded_bounds) {
occluded_bounds_ = occluded_bounds;
}
} // namespace keyboard
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef ASH_KEYBOARD_UI_CONTAINER_FULLSCREEN_BEHAVIOR_H_
#define ASH_KEYBOARD_UI_CONTAINER_FULLSCREEN_BEHAVIOR_H_
#include "ash/keyboard/ui/container_full_width_behavior.h"
#include "ash/keyboard/ui/keyboard_export.h"
namespace keyboard {
class KEYBOARD_EXPORT ContainerFullscreenBehavior
: public ContainerFullWidthBehavior {
public:
explicit ContainerFullscreenBehavior(Delegate* controller);
~ContainerFullscreenBehavior() override;
// ContainerFullWidthBehavior overrides
gfx::Rect AdjustSetBoundsRequest(
const gfx::Rect& display_bounds,
const gfx::Rect& requested_bounds_in_screen_coords) override;
void SetCanonicalBounds(aura::Window* container,
const gfx::Rect& display_bounds) override;
mojom::ContainerType GetType() const override;
void SetOccludedBounds(const gfx::Rect& occluded_bounds_in_window) override;
gfx::Rect GetOccludedBounds(
const gfx::Rect& visual_bounds_in_screen) const override;
private:
// The occluded bounds for fullscreen behavior is determined on the IME
// extension side, so it has to be passed here via the extension API.
gfx::Rect occluded_bounds_;
};
} // namespace keyboard
#endif // ASH_KEYBOARD_UI_CONTAINER_FULLSCREEN_BEHAVIOR_H_
...@@ -8,7 +8,6 @@ ...@@ -8,7 +8,6 @@
#include "ash/keyboard/ui/container_floating_behavior.h" #include "ash/keyboard/ui/container_floating_behavior.h"
#include "ash/keyboard/ui/container_full_width_behavior.h" #include "ash/keyboard/ui/container_full_width_behavior.h"
#include "ash/keyboard/ui/container_fullscreen_behavior.h"
#include "ash/keyboard/ui/display_util.h" #include "ash/keyboard/ui/display_util.h"
#include "ash/keyboard/ui/keyboard_controller_observer.h" #include "ash/keyboard/ui/keyboard_controller_observer.h"
#include "ash/keyboard/ui/keyboard_layout_manager.h" #include "ash/keyboard/ui/keyboard_layout_manager.h"
...@@ -731,11 +730,6 @@ void KeyboardController::SetContainerBehaviorInternal( ...@@ -731,11 +730,6 @@ void KeyboardController::SetContainerBehaviorInternal(
case mojom::ContainerType::kFloating: case mojom::ContainerType::kFloating:
container_behavior_ = std::make_unique<ContainerFloatingBehavior>(this); container_behavior_ = std::make_unique<ContainerFloatingBehavior>(this);
break; break;
case mojom::ContainerType::kFullscreen:
container_behavior_ = std::make_unique<ContainerFullscreenBehavior>(this);
break;
default:
NOTREACHED();
} }
} }
...@@ -1055,8 +1049,7 @@ gfx::Rect KeyboardController::GetKeyboardLockScreenOffsetBounds() const { ...@@ -1055,8 +1049,7 @@ gfx::Rect KeyboardController::GetKeyboardLockScreenOffsetBounds() const {
// temporarily overridden by a static field in certain lock screen contexts. // temporarily overridden by a static field in certain lock screen contexts.
// Furthermore, floating keyboard should never affect layout. // Furthermore, floating keyboard should never affect layout.
if (!IsKeyboardOverscrollEnabled() && if (!IsKeyboardOverscrollEnabled() &&
container_behavior_->GetType() != mojom::ContainerType::kFloating && container_behavior_->GetType() != mojom::ContainerType::kFloating) {
container_behavior_->GetType() != mojom::ContainerType::kFullscreen) {
return visual_bounds_in_root_; return visual_bounds_in_root_;
} }
return gfx::Rect(); return gfx::Rect();
......
...@@ -503,32 +503,6 @@ TEST_F(KeyboardControllerTest, DisableKeyboard) { ...@@ -503,32 +503,6 @@ TEST_F(KeyboardControllerTest, DisableKeyboard) {
EXPECT_TRUE(IsKeyboardDisabled()); EXPECT_TRUE(IsKeyboardDisabled());
} }
TEST_F(KeyboardControllerTest, SetOccludedBoundsChangesFullscreenBounds) {
// Keyboard is hidden, so SetContainerType should be synchronous.
controller().SetContainerType(mojom::ContainerType::kFullscreen,
base::nullopt, base::DoNothing());
// KeyboardController only notifies occluded bound changes when the keyboard
// is visible.
ShowKeyboard();
const gfx::Rect test_occluded_bounds(0, 10, 20, 30);
// Expect that setting the occluded bounds raises
// OnKeyboardWorkspaceOccludedBoundsChanged event.
struct MockObserver : public KeyboardControllerObserver {
MOCK_METHOD1(OnKeyboardWorkspaceOccludedBoundsChanged,
void(const gfx::Rect& new_bounds));
} observer;
EXPECT_CALL(observer,
OnKeyboardWorkspaceOccludedBoundsChanged(test_occluded_bounds));
controller().AddObserver(&observer);
controller().SetOccludedBounds(test_occluded_bounds);
controller().RemoveObserver(&observer);
}
class KeyboardControllerAnimationTest : public KeyboardControllerTest { class KeyboardControllerAnimationTest : public KeyboardControllerTest {
public: public:
KeyboardControllerAnimationTest() {} KeyboardControllerAnimationTest() {}
......
...@@ -38,7 +38,7 @@ enum KeyboardEnableFlag { ...@@ -38,7 +38,7 @@ enum KeyboardEnableFlag {
kCommandLineEnabled, kCommandLineEnabled,
}; };
// Container types used to set and identify contaner behavior. Used in UMA // Container types used to set and identify container behavior. Used in UMA
// stats gathering, so values should never be changed or reused. // stats gathering, so values should never be changed or reused.
enum ContainerType { enum ContainerType {
// Corresponds to a ContainerFullWidthBehavior. // Corresponds to a ContainerFullWidthBehavior.
...@@ -48,5 +48,5 @@ enum ContainerType { ...@@ -48,5 +48,5 @@ enum ContainerType {
kFloating = 1, kFloating = 1,
// Corresponds to a ContainerFullscreenBehavior. // Corresponds to a ContainerFullscreenBehavior.
kFullscreen = 2, // kFullscreen = 2, // Deprecated; feature was abandoned.
}; };
...@@ -64,8 +64,6 @@ keyboard::mojom::ContainerType ConvertKeyboardModeToContainerType(int mode) { ...@@ -64,8 +64,6 @@ keyboard::mojom::ContainerType ConvertKeyboardModeToContainerType(int mode) {
return keyboard::mojom::ContainerType::kFullWidth; return keyboard::mojom::ContainerType::kFullWidth;
case keyboard_api::KEYBOARD_MODE_FLOATING: case keyboard_api::KEYBOARD_MODE_FLOATING:
return keyboard::mojom::ContainerType::kFloating; return keyboard::mojom::ContainerType::kFloating;
case keyboard_api::KEYBOARD_MODE_FULLSCREEN:
return keyboard::mojom::ContainerType::kFullscreen;
} }
NOTREACHED(); NOTREACHED();
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
{ {
"id": "KeyboardMode", "id": "KeyboardMode",
"type": "string", "type": "string",
"enum": [ "FULL_WIDTH", "FLOATING", "FULLSCREEN" ], "enum": [ "FULL_WIDTH", "FLOATING" ],
"description": "The value of the virtual keyboard mode to set to." "description": "The value of the virtual keyboard mode to set to."
}, },
{ {
......
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