summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbshe@chromium.org <bshe@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-17 03:21:17 +0000
committerbshe@chromium.org <bshe@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-17 03:21:17 +0000
commit3184a8e64ddcf24c694e8bd57dad40d4011991f1 (patch)
tree05331357f46d0e808915eb6e15853a36492c49e1
parenta174d2ec56820f9a5da0e3e818cb7579b8271d99 (diff)
downloadchromium_src-3184a8e64ddcf24c694e8bd57dad40d4011991f1.zip
chromium_src-3184a8e64ddcf24c694e8bd57dad40d4011991f1.tar.gz
chromium_src-3184a8e64ddcf24c694e8bd57dad40d4011991f1.tar.bz2
Polish VK show/hide animation
This CL did: 1. add opacity animation for VK when show/hide 2. reduce animation time to 100 ms BUG=327462 Review URL: https://codereview.chromium.org/114803004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@241130 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/ui/ash/ash_keyboard_controller_proxy.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/chrome/browser/ui/ash/ash_keyboard_controller_proxy.cc b/chrome/browser/ui/ash/ash_keyboard_controller_proxy.cc
index 73c91d0..965772d 100644
--- a/chrome/browser/ui/ash/ash_keyboard_controller_proxy.cc
+++ b/chrome/browser/ui/ash/ash_keyboard_controller_proxy.cc
@@ -39,7 +39,7 @@ namespace {
const char* kVirtualKeyboardExtensionID = "mppnpdlheglhdfmldimlhpnegondlapf";
// The virtual keyboard show/hide animation duration.
-const int kAnimationDurationMs = 1000;
+const int kAnimationDurationMs = 100;
Context::Type TextInputTypeToGeneratedInputTypeEnum(ui::TextInputType type) {
switch (type) {
@@ -173,6 +173,7 @@ void AshKeyboardControllerProxy::ShowKeyboardContainer(
settings.SetTransitionDuration(
base::TimeDelta::FromMilliseconds(kAnimationDurationMs));
container->SetTransform(gfx::Transform());
+ container->layer()->SetOpacity(1.0);
}
// TODO(bshe): Add animation observer and do the workspace resizing after
@@ -200,6 +201,7 @@ void AshKeyboardControllerProxy::HideKeyboardContainer(
gfx::Transform transform;
transform.Translate(0, GetKeyboardWindow()->bounds().height());
container->SetTransform(transform);
+ container->layer()->SetOpacity(0.0);
KeyboardControllerProxy::HideKeyboardContainer(container);
}