• Blake O'Hare's avatar
    Add another KeyboardControllerObserver method that aggregates state · 4f8542d8
    Blake O'Hare authored
    This observer method is redundant with the other methods. However it
    seems that some of the implementations are querying multiple aspects of
    the keyboard and performing an action based on that. For example, the
    Arc IME needs to know both changes in availability and the occluded
    bounds at the same time. Using the methods currently provided is
    unviable because it would require tracking state between the two calls
    and then invoking the system call to ARC++ once both calls have
    completed. This is cumbersome.
    
    In addition to this, I'd also like to eliminate direct calls to
    KeyboardController::GetInstance()->keyboard_locked() and so I am
    putting this property into the struct of this notification as well.
    
    There are only a couple of usages where this pattern is necessary and
    so most consumers should simply use the more specific existing methods.
    
    Bug: 786290
    Change-Id: I3e2db92273f0a144c87caef29b860cb6b7f83995
    Reviewed-on: https://chromium-review.googlesource.com/813147Reviewed-by: default avatarYuichiro Hanada <yhanada@chromium.org>
    Commit-Queue: Blake O'Hare <blakeo@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#522375}
    4f8542d8
notification_manager.h 2.25 KB