Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(30)

Side by Side Diff: ui/keyboard/keyboard_controller.cc

Issue 617013002: Remove redundant SetBounds calls to the keyboard window. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/keyboard/keyboard_controller.h" 5 #include "ui/keyboard/keyboard_controller.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 26 matching lines...) Expand all
37 namespace { 37 namespace {
38 38
39 const int kHideKeyboardDelayMs = 100; 39 const int kHideKeyboardDelayMs = 100;
40 40
41 // The virtual keyboard show/hide animation duration. 41 // The virtual keyboard show/hide animation duration.
42 const int kShowAnimationDurationMs = 350; 42 const int kShowAnimationDurationMs = 350;
43 const int kHideAnimationDurationMs = 100; 43 const int kHideAnimationDurationMs = 100;
44 44
45 // The opacity of virtual keyboard container when show animation starts or 45 // The opacity of virtual keyboard container when show animation starts or
46 // hide animation finishes. 46 // hide animation finishes.
47 // TODO(rsadam@): Investigate why setting this to zero crashes. 47 const float kAnimationStartOrAfterHideOpacity = 0;
48 const float kAnimationStartOrAfterHideOpacity = 0.01f;
49 48
50 // Event targeter for the keyboard container. 49 // Event targeter for the keyboard container.
51 class KeyboardContainerTargeter : public wm::MaskedWindowTargeter { 50 class KeyboardContainerTargeter : public wm::MaskedWindowTargeter {
52 public: 51 public:
53 KeyboardContainerTargeter(aura::Window* container, 52 KeyboardContainerTargeter(aura::Window* container,
54 keyboard::KeyboardControllerProxy* proxy) 53 keyboard::KeyboardControllerProxy* proxy)
55 : wm::MaskedWindowTargeter(container), 54 : wm::MaskedWindowTargeter(container),
56 proxy_(proxy) { 55 proxy_(proxy) {
57 } 56 }
58 57
(...skipping 518 matching lines...) Expand 10 before | Expand all | Expand 10 after
577 proxy_->HideKeyboardContainer(container_.get()); 576 proxy_->HideKeyboardContainer(container_.get());
578 } 577 }
579 578
580 void KeyboardController::AddBoundsChangedObserver(aura::Window* window) { 579 void KeyboardController::AddBoundsChangedObserver(aura::Window* window) {
581 aura::Window* target_window = GetFrameWindow(window); 580 aura::Window* target_window = GetFrameWindow(window);
582 if (target_window) 581 if (target_window)
583 window_bounds_observer_->AddObservedWindow(target_window); 582 window_bounds_observer_->AddObservedWindow(target_window);
584 } 583 }
585 584
586 } // namespace keyboard 585 } // namespace keyboard
OLDNEW
« no previous file with comments | « no previous file | ui/keyboard/keyboard_controller_proxy.cc » ('j') | ui/keyboard/keyboard_controller_proxy.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698