• Andrew Xu's avatar
    [Multipaste] Refactoring on the command execution · 513535c0
    Andrew Xu authored
    It is confusing that the count of items in the menu model is different
    from that of the item views in the context menu. In the
    current code, we have to insert the deletion command because
    MenuModelAdapter::ExecuteCommand() checks whether the command to execute
    is contained in the menu model.
    
    In this CL, the special command id (i.e. the item deletion command id)
    is removed. Instead, We use the command id to indicate which menu item
    is activated. When the clipboard history controller is notified of the
    activation, it queries the menu item specified by the command id about
    the action to take.
    
    This CL should not introduce any visual difference
    
    Bug: 1131556
    Change-Id: I51b6c56aea656c1a2c764d756e616823c0bbf850
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2531063
    Commit-Queue: Andrew Xu <andrewxu@chromium.org>
    Reviewed-by: default avatarDavid Black <dmblack@google.com>
    Cr-Commit-Position: refs/heads/master@{#828040}
    513535c0
clipboard_history_controller_impl.h 4.77 KB